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