mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-14 04:20:07 +02:00
feat: add artist radio and track radio (in context menu) (#1437)
* Add API support for artist radio and track radio features * Add translation strings and settings UI for artist radio count --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jeffvli <jeffvictorli@gmail.com>
This commit is contained in:
@@ -354,6 +354,19 @@ const similarSongs = z.object({
|
||||
.optional(),
|
||||
});
|
||||
|
||||
const similarSongs2Parameters = z.object({
|
||||
count: z.number().optional(),
|
||||
id: z.string(),
|
||||
});
|
||||
|
||||
const similarSongs2 = z.object({
|
||||
similarSongs2: z
|
||||
.object({
|
||||
song: z.array(song),
|
||||
})
|
||||
.optional(),
|
||||
});
|
||||
|
||||
export enum SubsonicExtensions {
|
||||
FORM_POST = 'formPost',
|
||||
INDEX_BASED_QUEUE = 'indexBasedQueue',
|
||||
@@ -724,6 +737,7 @@ export const ssType = {
|
||||
search3: search3Parameters,
|
||||
setRating: setRatingParameters,
|
||||
similarSongs: similarSongsParameters,
|
||||
similarSongs2: similarSongs2Parameters,
|
||||
structuredLyrics: structuredLyricsParameters,
|
||||
topSongsList: topSongsListParameters,
|
||||
updateInternetRadioStation: updateInternetRadioStationParameters,
|
||||
@@ -775,6 +789,7 @@ export const ssType = {
|
||||
serverInfo,
|
||||
setRating,
|
||||
similarSongs,
|
||||
similarSongs2,
|
||||
song,
|
||||
structuredLyrics,
|
||||
topSongsList,
|
||||
|
||||
@@ -1313,6 +1313,15 @@ export enum LyricSource {
|
||||
NETEASE = 'NetEase',
|
||||
}
|
||||
|
||||
export type ArtistRadioArgs = BaseEndpointArgs & {
|
||||
query: ArtistRadioQuery;
|
||||
};
|
||||
|
||||
export type ArtistRadioQuery = {
|
||||
artistId: string;
|
||||
count?: number;
|
||||
};
|
||||
|
||||
export type ControllerEndpoint = {
|
||||
addToPlaylist: (args: AddToPlaylistArgs) => Promise<AddToPlaylistResponse>;
|
||||
authenticate: (
|
||||
@@ -1338,6 +1347,7 @@ export type ControllerEndpoint = {
|
||||
getAlbumListCount: (args: AlbumListCountArgs) => Promise<number>;
|
||||
getArtistList: (args: ArtistListArgs) => Promise<ArtistListResponse>;
|
||||
getArtistListCount: (args: ArtistListCountArgs) => Promise<number>;
|
||||
getArtistRadio: (args: ArtistRadioArgs) => Promise<Song[]>;
|
||||
getDownloadUrl: (args: DownloadArgs) => string;
|
||||
getFolder: (args: FolderArgs) => Promise<FolderResponse>;
|
||||
getGenreList: (args: GenreListArgs) => Promise<GenreListResponse>;
|
||||
@@ -1458,6 +1468,7 @@ export type InternalControllerEndpoint = {
|
||||
// getArtistInfo?: (args: any) => void;
|
||||
getArtistList: (args: ReplaceApiClientProps<ArtistListArgs>) => Promise<ArtistListResponse>;
|
||||
getArtistListCount: (args: ReplaceApiClientProps<ArtistListCountArgs>) => Promise<number>;
|
||||
getArtistRadio: (args: ReplaceApiClientProps<ArtistRadioArgs>) => Promise<Song[]>;
|
||||
getDownloadUrl: (args: ReplaceApiClientProps<DownloadArgs>) => string;
|
||||
getFolder: (args: ReplaceApiClientProps<FolderArgs>) => Promise<FolderResponse>;
|
||||
getGenreList: (args: ReplaceApiClientProps<GenreListArgs>) => Promise<GenreListResponse>;
|
||||
|
||||
Reference in New Issue
Block a user