mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
clean up old logs
This commit is contained in:
@@ -100,7 +100,7 @@ export async function getLyricsBySongId(url: string): Promise<null | string> {
|
|||||||
try {
|
try {
|
||||||
result = await axios.get<string>(url, { responseType: 'text' });
|
result = await axios.get<string>(url, { responseType: 'text' });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Genius lyrics request got an error!', e);
|
console.error('Genius lyrics request got an error!', (e as Error)?.message);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ export async function getSearchResults(
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Genius search request got an error!', e);
|
console.error('Genius search request got an error!', (e as Error)?.message);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,13 +163,11 @@ export async function query(
|
|||||||
): Promise<InternetProviderLyricResponse | null> {
|
): Promise<InternetProviderLyricResponse | null> {
|
||||||
const response = await getSongId(params);
|
const response = await getSongId(params);
|
||||||
if (!response) {
|
if (!response) {
|
||||||
console.error('Could not find the song on Genius!');
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const lyrics = await getLyricsBySongId(response.id);
|
const lyrics = await getLyricsBySongId(response.id);
|
||||||
if (!lyrics) {
|
if (!lyrics) {
|
||||||
console.error('Could not get lyrics on Genius!');
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,7 +192,7 @@ async function getSongId(
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Genius search request got an error!', e);
|
console.error('Genius search request got an error!', (e as Error)?.message);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export async function getLyricsBySongId(songId: string): Promise<null | string>
|
|||||||
try {
|
try {
|
||||||
result = await axios.get<LrcLibTrackResponse>(`${FETCH_URL}/${songId}`);
|
result = await axios.get<LrcLibTrackResponse>(`${FETCH_URL}/${songId}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('LrcLib lyrics request got an error!', e);
|
console.error('LrcLib lyrics request got an error!', (e as Error)?.message);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ export async function getSearchResults(
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('LrcLib search request got an error!', e);
|
console.error('LrcLib search request got an error!', (e as Error)?.message);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,14 +102,13 @@ export async function query(
|
|||||||
timeout: TIMEOUT_MS,
|
timeout: TIMEOUT_MS,
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('LrcLib search request got an error!', e);
|
console.error('LrcLib search request got an error!', (e as Error).message);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const lyrics = result.data.syncedLyrics || result.data.plainLyrics || null;
|
const lyrics = result.data.syncedLyrics || result.data.plainLyrics || null;
|
||||||
|
|
||||||
if (!lyrics) {
|
if (!lyrics) {
|
||||||
console.error(`Could not get lyrics on LrcLib!`);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -141,13 +141,11 @@ export async function query(
|
|||||||
): Promise<InternetProviderLyricResponse | null> {
|
): Promise<InternetProviderLyricResponse | null> {
|
||||||
const lyricsMatch = await getMatchedLyrics(params);
|
const lyricsMatch = await getMatchedLyrics(params);
|
||||||
if (!lyricsMatch) {
|
if (!lyricsMatch) {
|
||||||
console.error('Could not find the song on NetEase!');
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const lyrics = await getLyricsBySongId(lyricsMatch.id);
|
const lyrics = await getLyricsBySongId(lyricsMatch.id);
|
||||||
if (!lyrics) {
|
if (!lyrics) {
|
||||||
console.error('Could not get lyrics on NetEase!');
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -126,7 +126,9 @@ const installExtensions = async () => {
|
|||||||
type: 'info',
|
type: 'info',
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(console.error);
|
.catch(() => {
|
||||||
|
// Ignore
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -281,9 +281,7 @@ export const MpvPlayerEngine = (props: MpvPlayerEngineProps) => {
|
|||||||
onPlayerPlay: () => {
|
onPlayerPlay: () => {
|
||||||
replaceMpvQueue(transcode);
|
replaceMpvQueue(transcode);
|
||||||
},
|
},
|
||||||
onQueueCleared: () => {
|
onQueueCleared: () => {},
|
||||||
console.log('queue cleared');
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
[transcode],
|
[transcode],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -124,7 +124,6 @@ export const LibraryHeader = forwardRef(
|
|||||||
<div
|
<div
|
||||||
className={styles.imageSection}
|
className={styles.imageSection}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
console.log('openImage');
|
|
||||||
openImage();
|
openImage();
|
||||||
}}
|
}}
|
||||||
onKeyDown={(event) =>
|
onKeyDown={(event) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user