mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
Add LrcLib Fetcher (#136)
* lrclib, do not show search/clear buttons if no fetchers configured
This commit is contained in:
parent
d7ca25525c
commit
d6e628099c
5 changed files with 141 additions and 5 deletions
|
|
@ -1064,7 +1064,9 @@ export const instanceOfCancellationError = (error: any) => {
|
|||
};
|
||||
|
||||
export type LyricSearchQuery = {
|
||||
album?: string;
|
||||
artist?: string;
|
||||
duration?: number;
|
||||
name?: string;
|
||||
};
|
||||
|
||||
|
|
@ -1075,6 +1077,7 @@ export type LyricGetQuery = {
|
|||
|
||||
export enum LyricSource {
|
||||
GENIUS = 'Genius',
|
||||
LRCLIB = 'lrclib.net',
|
||||
NETEASE = 'NetEase',
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ interface LyricsActionsProps {
|
|||
export const LyricsActions = ({ onRemoveLyric, onSearchOverride }: LyricsActionsProps) => {
|
||||
const currentSong = useCurrentSong();
|
||||
const { setSettings } = useSettingsStoreActions();
|
||||
const { delayMs } = useLyricsSettings();
|
||||
const { delayMs, sources } = useLyricsSettings();
|
||||
|
||||
const handleLyricOffset = (e: number) => {
|
||||
setSettings({
|
||||
|
|
@ -34,7 +34,7 @@ export const LyricsActions = ({ onRemoveLyric, onSearchOverride }: LyricsActions
|
|||
|
||||
return (
|
||||
<>
|
||||
{isDesktop ? (
|
||||
{isDesktop && sources.length ? (
|
||||
<Button
|
||||
uppercase
|
||||
disabled={isActionsDisabled}
|
||||
|
|
@ -76,7 +76,7 @@ export const LyricsActions = ({ onRemoveLyric, onSearchOverride }: LyricsActions
|
|||
>
|
||||
<RiAddFill />
|
||||
</Button>
|
||||
{isDesktop ? (
|
||||
{isDesktop && sources.length ? (
|
||||
<Button
|
||||
uppercase
|
||||
disabled={isActionsDisabled}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue