mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
Update fetchers to support search
This commit is contained in:
parent
01608fa875
commit
f8ecb3fc53
8 changed files with 69 additions and 38 deletions
|
|
@ -1033,14 +1033,14 @@ export type InternetProviderLyricResponse = {
|
|||
artist: string;
|
||||
lyrics: string;
|
||||
name: string;
|
||||
source: string;
|
||||
source: LyricSource;
|
||||
};
|
||||
|
||||
export type InternetProviderLyricSearchResponse = {
|
||||
artist: string;
|
||||
id: string;
|
||||
name: string;
|
||||
source: string;
|
||||
source: LyricSource;
|
||||
};
|
||||
|
||||
export type SynchronizedLyricMetadata = {
|
||||
|
|
@ -1048,12 +1048,12 @@ export type SynchronizedLyricMetadata = {
|
|||
remote: boolean;
|
||||
} & Omit<InternetProviderLyricResponse, 'lyrics'>;
|
||||
|
||||
export type UnsyhchronizedLyricMetadata = {
|
||||
export type UnsynchronizedLyricMetadata = {
|
||||
lyrics: string;
|
||||
remote: boolean;
|
||||
} & Omit<InternetProviderLyricResponse, 'lyrics'>;
|
||||
|
||||
export type FullLyricsMetadata = SynchronizedLyricMetadata | UnsyhchronizedLyricMetadata;
|
||||
export type FullLyricsMetadata = SynchronizedLyricMetadata | UnsynchronizedLyricMetadata;
|
||||
|
||||
export type LyricOverride = Omit<InternetProviderLyricResponse, 'lyrics'>;
|
||||
|
||||
|
|
@ -1065,3 +1065,15 @@ export type LyricSearchQuery = {
|
|||
artist: string;
|
||||
name: string;
|
||||
};
|
||||
|
||||
export type LyricGetQuery = {
|
||||
remoteSongId: string;
|
||||
remoteSource: LyricSource;
|
||||
};
|
||||
|
||||
export enum LyricSource {
|
||||
GENIUS = 'Genius',
|
||||
NETEASE = 'NetEase',
|
||||
}
|
||||
|
||||
export type LyricsOverride = Omit<FullLyricsMetadata, 'lyrics'> & { id: string };
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { useLyricsSettings, useSettingsStoreActions } from '/@/renderer/store';
|
|||
import { MultiSelect, MultiSelectProps, NumberInput, Switch } from '/@/renderer/components';
|
||||
import isElectron from 'is-electron';
|
||||
import styled from 'styled-components';
|
||||
import { LyricSource } from '/@/renderer/types';
|
||||
import { LyricSource } from '/@/renderer/api/types';
|
||||
|
||||
const localSettings = isElectron() ? window.electron.localSettings : null;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { create } from 'zustand';
|
|||
import { devtools, persist } from 'zustand/middleware';
|
||||
import { immer } from 'zustand/middleware/immer';
|
||||
import { shallow } from 'zustand/shallow';
|
||||
import { LibraryItem } from '/@/renderer/api/types';
|
||||
import { LibraryItem, LyricSource } from '/@/renderer/api/types';
|
||||
import { AppRoute } from '/@/renderer/router/routes';
|
||||
import { AppTheme } from '/@/renderer/themes/types';
|
||||
import {
|
||||
|
|
@ -19,7 +19,6 @@ import {
|
|||
PlaybackType,
|
||||
TableType,
|
||||
Platform,
|
||||
LyricSource,
|
||||
} from '/@/renderer/types';
|
||||
|
||||
export type SidebarItemType = {
|
||||
|
|
|
|||
|
|
@ -176,8 +176,3 @@ export type GridCardData = {
|
|||
playButtonBehavior: Play;
|
||||
route: CardRoute;
|
||||
};
|
||||
|
||||
export enum LyricSource {
|
||||
GENIUS = 'Genius',
|
||||
NETEASE = 'NetEase',
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue