type hooks
This commit is contained in:
@@ -33,7 +33,7 @@ export function useNewReleaseNotifications(enabled: boolean) {
|
||||
recursive: true,
|
||||
includeItemTypes: ['Movie', 'Series'],
|
||||
fields: ['DateCreated'],
|
||||
} as any)
|
||||
})
|
||||
const items = res.data.Items || []
|
||||
const newOnes = items.filter(it => {
|
||||
const created = it.DateCreated
|
||||
|
||||
@@ -41,7 +41,7 @@ export function usePrebuffer(item: BaseItemDto | null | undefined, armed: boolea
|
||||
playbackInfoDto: {
|
||||
UserId: jellyfinClient.getAuthState()!.userId,
|
||||
MaxStreamingBitrate: 140_000_000,
|
||||
DeviceProfile: browserDeviceProfile() as any,
|
||||
DeviceProfile: browserDeviceProfile(),
|
||||
AutoOpenLiveStream: true,
|
||||
EnableDirectPlay: true,
|
||||
EnableDirectStream: true,
|
||||
@@ -49,7 +49,7 @@ export function usePrebuffer(item: BaseItemDto | null | undefined, armed: boolea
|
||||
AllowVideoStreamCopy: true,
|
||||
AllowAudioStreamCopy: true,
|
||||
},
|
||||
} as any)
|
||||
})
|
||||
return res.data
|
||||
},
|
||||
staleTime: 60_000,
|
||||
@@ -57,7 +57,7 @@ export function usePrebuffer(item: BaseItemDto | null | undefined, armed: boolea
|
||||
if (cancelled || !playbackInfo) return
|
||||
const auth = jellyfinClient.getAuthState()
|
||||
if (!auth) return
|
||||
const source: any = (playbackInfo as any).MediaSources?.[0]
|
||||
const source = playbackInfo.MediaSources?.[0]
|
||||
if (!source) return
|
||||
// Build the stream URL the way PlayerPage does and request the
|
||||
// first kilobyte. For direct-play this primes the HTTP cache; for
|
||||
|
||||
Reference in New Issue
Block a user