mirror of
https://github.com/Jellify-Music/App.git
synced 2026-04-28 14:39:33 -05:00
87393f1f08
Separating Queuing and Player logic, please report bugs if you experience playback issues or queue irregularities Fetching additional track metadata for use in later features, utilizing transcoding URLs reported by Jellyfin Disable NowPlaying in CarPlay on startup - this should be navigable yet in the CarPlay interface
21 lines
579 B
TypeScript
21 lines
579 B
TypeScript
import { PlaybackInfoResponse } from '@jellyfin/sdk/lib/generated-client/models'
|
|
import Client from '../../../api/client'
|
|
import { getAudioApi, getMediaInfoApi } from '@jellyfin/sdk/lib/utils/api'
|
|
|
|
export async function fetchMediaInfo(itemId: string): Promise<PlaybackInfoResponse> {
|
|
return new Promise((resolve, reject) => {
|
|
getMediaInfoApi(Client.api!)
|
|
.getPlaybackInfo({
|
|
itemId,
|
|
userId: Client.user?.id,
|
|
})
|
|
.then(({ data }) => {
|
|
console.debug('Received media info response')
|
|
resolve(data)
|
|
})
|
|
.catch((error) => {
|
|
reject(error)
|
|
})
|
|
})
|
|
}
|