type hooks

This commit is contained in:
2026-04-30 04:08:56 +03:00
parent 2589b695f1
commit a332293e83
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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
+3 -3
View File
@@ -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