mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 12:30:12 +02:00
add song infinite carousel (#1464)
This commit is contained in:
@@ -364,6 +364,18 @@ export const queryKeys: Record<
|
||||
|
||||
return [serverId, 'songs', 'detail'] as const;
|
||||
},
|
||||
infiniteList: (serverId: string, query?: SongListQuery) => {
|
||||
const { filter, pagination } = splitPaginatedQuery(query);
|
||||
if (query && pagination) {
|
||||
return [serverId, 'songs', 'infiniteList', filter, pagination] as const;
|
||||
}
|
||||
|
||||
if (query) {
|
||||
return [serverId, 'songs', 'infiniteList', filter] as const;
|
||||
}
|
||||
|
||||
return [serverId, 'songs', 'infiniteList'] as const;
|
||||
},
|
||||
list: (serverId: string, query?: SongListQuery) => {
|
||||
const { filter, pagination } = splitPaginatedQuery(query);
|
||||
if (query && pagination) {
|
||||
@@ -383,14 +395,6 @@ export const queryKeys: Record<
|
||||
lyricsByRemoteId: (searchQuery: { remoteSongId: string; remoteSource: LyricSource }) => {
|
||||
return ['song', 'lyrics', 'remote', searchQuery] as const;
|
||||
},
|
||||
remoteLyrics: (serverId: string, query?: LyricsQuery) => {
|
||||
if (query) return [serverId, 'song', 'lyrics', 'remote', query] as const;
|
||||
return [serverId, 'song', 'lyrics', 'remote'] as const;
|
||||
},
|
||||
serverLyrics: (serverId: string, query?: LyricsQuery) => {
|
||||
if (query) return [serverId, 'song', 'lyrics', 'server', query] as const;
|
||||
return [serverId, 'song', 'lyrics', 'server'] as const;
|
||||
},
|
||||
lyricsSearch: (query?: LyricSearchQuery) => {
|
||||
if (query) return ['lyrics', 'search', query] as const;
|
||||
return ['lyrics', 'search'] as const;
|
||||
@@ -399,7 +403,15 @@ export const queryKeys: Record<
|
||||
if (query) return [serverId, 'songs', 'randomSongList', query] as const;
|
||||
return [serverId, 'songs', 'randomSongList'] as const;
|
||||
},
|
||||
remoteLyrics: (serverId: string, query?: LyricsQuery) => {
|
||||
if (query) return [serverId, 'song', 'lyrics', 'remote', query] as const;
|
||||
return [serverId, 'song', 'lyrics', 'remote'] as const;
|
||||
},
|
||||
root: (serverId: string) => [serverId, 'songs'] as const,
|
||||
serverLyrics: (serverId: string, query?: LyricsQuery) => {
|
||||
if (query) return [serverId, 'song', 'lyrics', 'server', query] as const;
|
||||
return [serverId, 'song', 'lyrics', 'server'] as const;
|
||||
},
|
||||
similar: (serverId: string, query?: SimilarSongsQuery) => {
|
||||
if (query) return [serverId, 'song', 'similar', query] as const;
|
||||
return [serverId, 'song', 'similar'] as const;
|
||||
|
||||
Reference in New Issue
Block a user