mirror of
https://github.com/Jellify-Music/App.git
synced 2026-05-04 01:29:27 -05:00
getting recent tracks to play?
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
|
||||
import { JellifyTrack } from "../types/JellifyTrack";
|
||||
import { JellifyServer } from "../types/JellifyServer";
|
||||
import { TrackType } from "react-native-track-player";
|
||||
import { Api } from "@jellyfin/sdk";
|
||||
|
||||
export function mapDtoToTrack(api: Api, item: BaseItemDto) {
|
||||
return {
|
||||
url: `${api.basePath}/Audio/${item.Id!}/universal`,
|
||||
type: TrackType.HLS,
|
||||
headers: {
|
||||
"X-Emby-Token": api.accessToken
|
||||
|
||||
}
|
||||
} as JellifyTrack
|
||||
}
|
||||
Reference in New Issue
Block a user