mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
[enhancement]: allow downloading individual tracks for external use
This commit is contained in:
parent
10fca2dc12
commit
c4677a63f6
10 changed files with 91 additions and 6 deletions
|
|
@ -54,6 +54,7 @@ import {
|
|||
SimilarSongsArgs,
|
||||
Song,
|
||||
MoveItemArgs,
|
||||
DownloadArgs,
|
||||
} from '/@/renderer/api/types';
|
||||
import { jfApiClient } from '/@/renderer/api/jellyfin/jellyfin-api';
|
||||
import { jfNormalize } from './jellyfin-normalize';
|
||||
|
|
@ -1043,6 +1044,12 @@ const movePlaylistItem = async (args: MoveItemArgs): Promise<void> => {
|
|||
}
|
||||
};
|
||||
|
||||
const getDownloadUrl = (args: DownloadArgs) => {
|
||||
const { apiClientProps, query } = args;
|
||||
|
||||
return `${apiClientProps.server?.url}/items/${query.id}/download?api_key=${apiClientProps.server?.credential}`;
|
||||
};
|
||||
|
||||
export const jfController = {
|
||||
addToPlaylist,
|
||||
authenticate,
|
||||
|
|
@ -1055,6 +1062,7 @@ export const jfController = {
|
|||
getAlbumDetail,
|
||||
getAlbumList,
|
||||
getArtistList,
|
||||
getDownloadUrl,
|
||||
getGenreList,
|
||||
getLyrics,
|
||||
getMusicFolderList,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue