-
-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS & tvOS] Add 'Enable Rewatching' and ' Max days' to Next Up #1258
Conversation
This is up to date, merge-able on Main now, and cleaned up with only the new PR items. I have a single outstanding issue: This works, but the Ok/Done button is always the number??? I don't set that anywhere and I've been screwing around with this trying to fix it to no avail. I'm going to try this again with some fresh eyes later in the week. Unless @LePips, are you aware of what is going on here? It's only impacting tvOS. Other than the tvOS Alert Button, I think all other changes are ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the tvOS issue of dismissal in #1212 (comment), that happens in the simulator for me when I use return
on the keyboard and works as expected when I use the on-screen remote.
Per the additional button on tvOS with the alert, that looks like a SwiftUI bug and probably nothing we can do about it.
Shared/ViewModels/LibraryViewModel/NextUpLibraryViewModel.swift
Outdated
Show resolved
Hide resolved
Swiftfin tvOS/Views/SettingsView/CustomizeViewsSettings/Components/Sections/HomeSection.swift
Outdated
Show resolved
Hide resolved
Swiftfin tvOS/Views/SettingsView/CustomizeViewsSettings/Components/Sections/HomeSection.swift
Show resolved
Hide resolved
Don't use the property wrappers in non-view contexts. While they technically can still work, use the subscript instead at the usage sites. Use the dayInterval(0 ... 1000) format instead, then we don't need maxNextUpDays.
Swiftfin tvOS/Views/SettingsView/CustomizeViewsSettings/Components/Sections/HomeSection.swift
Outdated
Show resolved
Hide resolved
Swiftfin/Views/SettingsView/CustomizeViewsSettings/Components/Sections/HomeSection.swift
Outdated
Show resolved
Hide resolved
Swiftfin tvOS/Views/SettingsView/CustomizeViewsSettings/Components/Sections/HomeSection.swift
Show resolved
Hide resolved
I've updated this with the last outstanding changes from the review. There is a TODO for the weird tvOS Alert Button bug(?) and I've merge in missing changes on Main. Let me know if there is anything else needed! Otherwise, I think this is ready. |
I'm not a developer so this is probably a dumb question, but why not use a simple text field that only accepts numbers for this? That should work on iOS and tvOS, there is even a simple number one I think? (Although that might be 18.x only, I've only recently seen that for the first time) |
I might be mistaken but this IS using the default TextField:
The primary item we are discussing is the delivery method for this. The popup is an 'alert' which is working fine on both iOS and tvOS but for whatever reason, the ok button that all alerts just have by default is showing the wrong text on tvOS. The alert presents the TextField where edits are made without taking the user to a new screen or covering up the existing screen (see below). This is either something not working correctly with the tvOS emulator for XCode or SwiftUI itself. Since we're a ways away from a tvOS build on TestFlight (NOT a statement just my assumption), I'd argue this is worth revisiting at a later point instead of engineering 2 separate solutions to account for functionality that should just work in SwiftUI. I intend on keeping an eye on this and, as a build is available for tvOS, I can confirm if this issue is present on a non-emulator and make changes accordingly! |
Oops, I got the notes wrong. A new build should be up shortly. |
Context
Resolves: #1211
This is a rework #1212 where I DIDN'T try to rebase on Main, resulting in a git nightmare.
Summary
This PR enables a feature found on Jellyfin-Web that limits the number of items in the 'Next Up' section. To further mirror Jellyfin-Web, this feature uses 0 as disabled (All items are shown in Next Up) and only includes the parameter for NextUpDateCutoff when this is greater than 0.
While I was in there, realized that Jellyfin-Web had an option for EnableRewatching so included that in this PR. I was basing my Parameters off of this section of Jellyfin-Web: https://github.com/jellyfin/jellyfin-web/blob/master/src/components/homesections/sections/nextUp.ts
Screenshots
iOS
New Settings (Disabled)
New Settings (1 Day)
New Settings (Multiple Days)
tvOS
New Settings (Location)
New Settings (Disabled)
New Settings (1 Day)
New Settings (Multiple Days)
New Settings (Subtitle Update)