[Fix] NextUp Updates Require Restart (#1280)
Some checks failed
Build 🔨 / Build 🔨 (Swiftfin tvOS) (push) Has been cancelled
Build 🔨 / Build 🔨 (Swiftfin) (push) Has been cancelled

* Refreshable

* https://github.com/jellyfin/Swiftfin/pull/1280#pullrequestreview-2375921432

* Local: let maxNextUp = Defaults[.Customization.Home.maxNextUp]
This commit is contained in:
Joe 2024-10-17 14:56:14 -06:00 committed by GitHub
parent 50e0cfef73
commit edf56e7fee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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"))
}
@ -31,6 +28,7 @@ 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
@ -38,7 +36,7 @@ final class NextUpLibraryViewModel: PagingLibraryViewModel<BaseItemDto> {
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