You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
152 lines
2.6 KiB
152 lines
2.6 KiB
3 years ago
|
export enum Server {
|
||
|
Subsonic = 'subsonic',
|
||
|
Jellyfin = 'jellyfin',
|
||
|
}
|
||
|
|
||
3 years ago
|
export enum Item {
|
||
|
Album = 'album',
|
||
|
Artist = 'artist',
|
||
|
Folder = 'folder',
|
||
|
Genre = 'genre',
|
||
|
Music = 'music',
|
||
|
Playlist = 'playlist',
|
||
|
}
|
||
3 years ago
|
|
||
3 years ago
|
export type ServerType = Server.Subsonic | Server.Jellyfin;
|
||
3 years ago
|
|
||
|
export type APIEndpoints =
|
||
|
| 'getPlaylist'
|
||
|
| 'getPlaylists'
|
||
|
| 'getStarred'
|
||
|
| 'getAlbum'
|
||
|
| 'getAlbums'
|
||
|
| 'getRandomSongs'
|
||
|
| 'getArtist'
|
||
|
| 'getArtists'
|
||
|
| 'getArtistInfo'
|
||
|
| 'getArtistSongs'
|
||
|
| 'startScan'
|
||
|
| 'getScanStatus'
|
||
|
| 'star'
|
||
|
| 'unstar'
|
||
|
| 'batchStar'
|
||
|
| 'batchUnstar'
|
||
|
| 'setRating'
|
||
|
| 'getSimilarSongs'
|
||
|
| 'updatePlaylistSongs'
|
||
|
| 'updatePlaylistSongsLg'
|
||
|
| 'deletePlaylist'
|
||
|
| 'createPlaylist'
|
||
|
| 'updatePlaylist'
|
||
|
| 'updatePlaylistSongsLg'
|
||
|
| 'deletePlaylist'
|
||
|
| 'createPlaylist'
|
||
|
| 'updatePlaylist'
|
||
|
| 'clearPlaylist'
|
||
|
| 'getGenres'
|
||
|
| 'getSearch'
|
||
|
| 'scrobble'
|
||
|
| 'getIndexes'
|
||
|
| 'getMusicFolders'
|
||
|
| 'getMusicDirectory'
|
||
|
| 'getMusicDirectorySongs'
|
||
|
| 'getDownloadUrl';
|
||
3 years ago
|
|
||
|
export interface Album {
|
||
|
id: string;
|
||
|
title: string;
|
||
|
isDir?: boolean;
|
||
|
albumId: string;
|
||
|
artist?: string;
|
||
|
artistId?: string;
|
||
|
songCount: number;
|
||
|
duration: number;
|
||
|
created: string;
|
||
|
year?: number;
|
||
|
genre?: string;
|
||
|
image: string;
|
||
|
starred?: string;
|
||
|
type: Item.Album;
|
||
|
uniqueId: string;
|
||
|
song?: Song[];
|
||
|
}
|
||
|
|
||
|
export interface Artist {
|
||
|
id: string;
|
||
|
title: string;
|
||
|
albumCount: number;
|
||
|
image: string;
|
||
|
starred?: string;
|
||
|
type: Item.Artist;
|
||
|
uniqueId: string;
|
||
|
album: Album[];
|
||
|
}
|
||
|
|
||
|
export interface ArtistInfo {
|
||
|
biography?: string;
|
||
|
lastFmUrl?: string;
|
||
|
imageUrl?: string;
|
||
|
similarArtist?: Artist[];
|
||
|
}
|
||
|
export interface Folder {
|
||
|
id: string;
|
||
|
title: string;
|
||
|
isDir?: boolean;
|
||
|
image: string;
|
||
|
type: Item.Folder;
|
||
|
uniqueId: string;
|
||
|
}
|
||
|
|
||
|
export interface Genre {
|
||
|
id: string;
|
||
|
title: string;
|
||
|
songCount?: number;
|
||
|
albumCount?: number;
|
||
|
type: Item.Genre;
|
||
|
uniqueId: string;
|
||
|
}
|
||
|
|
||
|
export interface Playlist {
|
||
|
id: string;
|
||
|
title: string;
|
||
|
comment?: string;
|
||
3 years ago
|
owner?: string;
|
||
3 years ago
|
public?: boolean;
|
||
3 years ago
|
songCount?: number;
|
||
3 years ago
|
duration: number;
|
||
3 years ago
|
created?: string;
|
||
|
changed?: string;
|
||
3 years ago
|
image: string;
|
||
|
type: Item.Playlist;
|
||
|
uniqueId: string;
|
||
|
song?: Song[];
|
||
|
}
|
||
|
|
||
|
export interface Song {
|
||
|
id: string;
|
||
|
parent?: string;
|
||
|
title: string;
|
||
|
isDir?: boolean;
|
||
|
album: string;
|
||
|
albumId?: string;
|
||
|
artist: string;
|
||
|
artistId?: string;
|
||
|
track?: number;
|
||
|
year?: number;
|
||
|
genre?: string;
|
||
|
size: number;
|
||
|
contentType?: string;
|
||
|
suffix?: string;
|
||
|
duration?: number;
|
||
|
bitRate?: number;
|
||
|
path?: string;
|
||
|
playCount?: number;
|
||
|
discNumber?: number;
|
||
|
created: string;
|
||
|
streamUrl: string;
|
||
|
image: string;
|
||
|
starred?: string;
|
||
|
type: Item.Music;
|
||
|
uniqueId: string;
|
||
|
}
|