mirror of
https://github.com/Jellify-Music/App.git
synced 2026-05-01 07:59:55 -05:00
16 lines
536 B
TypeScript
16 lines
536 B
TypeScript
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
|
|
} |