Skip to content

Commit

Permalink
[Fix] NextUp Updates Require Restart (jellyfin#1280)
Browse files Browse the repository at this point in the history
* Refreshable

* jellyfin#1280 (review)

* Local: let maxNextUp = Defaults[.Customization.Home.maxNextUp]
  • Loading branch information
JPKribs authored Oct 17, 2024
1 parent 50e0cfe commit edf56e7
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ import JellyfinAPI

final class NextUpLibraryViewModel: PagingLibraryViewModel<BaseItemDto> {

let maxNextUp = Defaults[.Customization.Home.maxNextUp]
let resumeNextUp = Defaults[.Customization.Home.resumeNextUp]

init() {
super.init(parent: TitledLibraryParent(displayTitle: L10n.nextUp, id: "nextUp"))
}
Expand All @@ -31,14 +28,15 @@ final class NextUpLibraryViewModel: PagingLibraryViewModel<BaseItemDto> {

private func parameters(for page: Int) -> Paths.GetNextUpParameters {

let maxNextUp = Defaults[.Customization.Home.maxNextUp]
var parameters = Paths.GetNextUpParameters()
parameters.enableUserData = true
parameters.fields = .MinimumFields
parameters.limit = pageSize
if maxNextUp > 0 {
parameters.nextUpDateCutoff = Date.now.addingTimeInterval(-maxNextUp)
}
parameters.enableRewatching = resumeNextUp
parameters.enableRewatching = Defaults[.Customization.Home.resumeNextUp]
parameters.startIndex = page
parameters.userID = userSession.user.id

Expand Down

0 comments on commit edf56e7

Please sign in to comment.