mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +00:00
log -> error, remove unnecesary logs
This commit is contained in:
parent
fb584b35a9
commit
63e3b97bca
10 changed files with 9 additions and 12 deletions
|
|
@ -105,7 +105,7 @@ const createMpv = async (data: {
|
||||||
try {
|
try {
|
||||||
await mpv.start();
|
await mpv.start();
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.log('mpv failed to start', error);
|
console.error('mpv failed to start', error);
|
||||||
} finally {
|
} finally {
|
||||||
await mpv.setMultipleProperties(properties || {});
|
await mpv.setMultipleProperties(properties || {});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ ipcMain.on('update-song', (_event, song: QueueSong | undefined) => {
|
||||||
'xesam:userRating': song.userRating ? song.userRating / 5 : null,
|
'xesam:userRating': song.userRating ? song.userRating / 5 : null,
|
||||||
};
|
};
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ export default class AppUpdater {
|
||||||
protocol.registerSchemesAsPrivileged([{ privileges: { bypassCSP: true }, scheme: 'feishin' }]);
|
protocol.registerSchemesAsPrivileged([{ privileges: { bypassCSP: true }, scheme: 'feishin' }]);
|
||||||
|
|
||||||
process.on('uncaughtException', (error: any) => {
|
process.on('uncaughtException', (error: any) => {
|
||||||
console.log('Error in main process', error);
|
console.error('Error in main process', error);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (store.get('ignore_ssl')) {
|
if (store.get('ignore_ssl')) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ export const authenticationFailure = (currentServer: null | ServerListItem) => {
|
||||||
if (currentServer) {
|
if (currentServer) {
|
||||||
const serverId = currentServer.id;
|
const serverId = currentServer.id;
|
||||||
const token = currentServer.ndCredential;
|
const token = currentServer.ndCredential;
|
||||||
console.log(`token is expired: ${token}`);
|
console.error(`token is expired: ${token}`);
|
||||||
useAuthStore.getState().actions.updateServer(serverId, { ndCredential: undefined });
|
useAuthStore.getState().actions.updateServer(serverId, { ndCredential: undefined });
|
||||||
useAuthStore.getState().actions.setCurrentServer(null);
|
useAuthStore.getState().actions.setCurrentServer(null);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ export const useVirtualTable = <TFilter extends BaseQuery<any>>({
|
||||||
properties.table.pagination.itemsPerPage;
|
properties.table.pagination.itemsPerPage;
|
||||||
event.api?.ensureIndexVisible(currentPageStartIndex, 'top');
|
event.api?.ensureIndexVisible(currentPageStartIndex, 'top');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isSearchParams) {
|
if (isSearchParams) {
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ const RouteErrorBoundary = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const error = useRouteError() as any;
|
const error = useRouteError() as any;
|
||||||
console.log('error', error);
|
console.error('error', error);
|
||||||
|
|
||||||
const handleReload = () => {
|
const handleReload = () => {
|
||||||
navigate(0);
|
navigate(0);
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ export const useSongLyricsBySong = (
|
||||||
apiClientProps: { server, signal },
|
apiClientProps: { server, signal },
|
||||||
query: { songId: song.id },
|
query: { songId: song.id },
|
||||||
})
|
})
|
||||||
.catch((err) => console.log(err));
|
.catch((err) => console.error(err));
|
||||||
|
|
||||||
if (jfLyrics) {
|
if (jfLyrics) {
|
||||||
localLyrics = {
|
localLyrics = {
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ export const PlaylistDetailSongListContent = ({ songs, tableRef }: PlaylistDetai
|
||||||
const currentPageStartIndex = pagination.currentPage * pagination.itemsPerPage;
|
const currentPageStartIndex = pagination.currentPage * pagination.itemsPerPage;
|
||||||
event.api?.ensureIndexVisible(currentPageStartIndex, 'top');
|
event.api?.ensureIndexVisible(currentPageStartIndex, 'top');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
setPagination(playlistId, {
|
setPagination(playlistId, {
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ export const useFastAverageColor = (args: {
|
||||||
return setBackground(color.rgb);
|
return setBackground(color.rgb);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.log('Error fetching average color', e);
|
console.error('Error fetching average color', e);
|
||||||
idRef.current = id;
|
idRef.current = id;
|
||||||
return setBackground('rgba(0, 0, 0, 0)');
|
return setBackground('rgba(0, 0, 0, 0)');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,6 @@ export const AppOutlet = () => {
|
||||||
const setFallback = useSetPlayerFallback();
|
const setFallback = useSetPlayerFallback();
|
||||||
const authState = useServerAuthenticated();
|
const authState = useServerAuthenticated();
|
||||||
|
|
||||||
console.log(authState);
|
|
||||||
|
|
||||||
const isActionsRequired = useMemo(() => {
|
const isActionsRequired = useMemo(() => {
|
||||||
const isServerRequired = !currentServer;
|
const isServerRequired = !currentServer;
|
||||||
|
|
||||||
|
|
@ -57,7 +55,6 @@ export const AppOutlet = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isActionsRequired || authState === AuthState.INVALID) {
|
if (isActionsRequired || authState === AuthState.INVALID) {
|
||||||
console.log('required', isActionsRequired);
|
|
||||||
return (
|
return (
|
||||||
<Navigate
|
<Navigate
|
||||||
replace
|
replace
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue