mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +00:00
provide transcoding support
This commit is contained in:
parent
da95a644c8
commit
528bef01f0
24 changed files with 347 additions and 69 deletions
|
|
@ -59,6 +59,7 @@ import type {
|
|||
ShareItemResponse,
|
||||
MoveItemArgs,
|
||||
DownloadArgs,
|
||||
TranscodingArgs,
|
||||
} from '/@/renderer/api/types';
|
||||
import { DeletePlaylistResponse, RandomSongListArgs } from './types';
|
||||
import { ndController } from '/@/renderer/api/navidrome/navidrome-controller';
|
||||
|
|
@ -102,6 +103,7 @@ export type ControllerEndpoint = Partial<{
|
|||
getSongList: (args: SongListArgs) => Promise<SongListResponse>;
|
||||
getStructuredLyrics: (args: StructuredLyricsArgs) => Promise<StructuredLyric[]>;
|
||||
getTopSongs: (args: TopSongListArgs) => Promise<TopSongListResponse>;
|
||||
getTranscodingUrl: (args: TranscodingArgs) => string;
|
||||
getUserList: (args: UserListArgs) => Promise<UserListResponse>;
|
||||
movePlaylistItem: (args: MoveItemArgs) => Promise<void>;
|
||||
removeFromPlaylist: (args: RemoveFromPlaylistArgs) => Promise<RemoveFromPlaylistResponse>;
|
||||
|
|
@ -152,6 +154,7 @@ const endpoints: ApiController = {
|
|||
getSongList: jfController.getSongList,
|
||||
getStructuredLyrics: undefined,
|
||||
getTopSongs: jfController.getTopSongList,
|
||||
getTranscodingUrl: jfController.getTranscodingUrl,
|
||||
getUserList: undefined,
|
||||
movePlaylistItem: jfController.movePlaylistItem,
|
||||
removeFromPlaylist: jfController.removeFromPlaylist,
|
||||
|
|
@ -194,6 +197,7 @@ const endpoints: ApiController = {
|
|||
getSongList: ndController.getSongList,
|
||||
getStructuredLyrics: ssController.getStructuredLyrics,
|
||||
getTopSongs: ssController.getTopSongList,
|
||||
getTranscodingUrl: ssController.getTranscodingUrl,
|
||||
getUserList: ndController.getUserList,
|
||||
movePlaylistItem: ndController.movePlaylistItem,
|
||||
removeFromPlaylist: ndController.removeFromPlaylist,
|
||||
|
|
@ -233,6 +237,7 @@ const endpoints: ApiController = {
|
|||
getSongList: undefined,
|
||||
getStructuredLyrics: ssController.getStructuredLyrics,
|
||||
getTopSongs: ssController.getTopSongList,
|
||||
getTranscodingUrl: ssController.getTranscodingUrl,
|
||||
getUserList: undefined,
|
||||
scrobble: ssController.scrobble,
|
||||
search: ssController.search3,
|
||||
|
|
@ -568,6 +573,15 @@ const getDownloadUrl = (args: DownloadArgs) => {
|
|||
)?.(args);
|
||||
};
|
||||
|
||||
const getTranscodingUrl = (args: TranscodingArgs) => {
|
||||
return (
|
||||
apiController(
|
||||
'getTranscodingUrl',
|
||||
args.apiClientProps.server?.type,
|
||||
) as ControllerEndpoint['getTranscodingUrl']
|
||||
)?.(args);
|
||||
};
|
||||
|
||||
export const controller = {
|
||||
addToPlaylist,
|
||||
authenticate,
|
||||
|
|
@ -594,6 +608,7 @@ export const controller = {
|
|||
getSongList,
|
||||
getStructuredLyrics,
|
||||
getTopSongList,
|
||||
getTranscodingUrl,
|
||||
getUserList,
|
||||
movePlaylistItem,
|
||||
removeFromPlaylist,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue