mirror of
https://github.com/jellyfin/Swiftfin.git
synced 2024-11-27 00:00:37 +00:00
[Fix] NextUp Updates Require Restart (#1280)
* Refreshable * https://github.com/jellyfin/Swiftfin/pull/1280#pullrequestreview-2375921432 * Local: let maxNextUp = Defaults[.Customization.Home.maxNextUp]
This commit is contained in:
parent
50e0cfef73
commit
edf56e7fee
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user