type hooks
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user