Skip to content
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

Add setting to enable rewatching in the "Next Up" section #1792

Merged
merged 4 commits into from
Jul 21, 2024

Conversation

Johnscaban
Copy link
Contributor

@Johnscaban Johnscaban commented May 1, 2024

Changes

Add setting to User Interface->General to enable the rewatching of episodes in the "Next Up" section.
Add translation strings for setting.

Issues

Fixes #1778

@Johnscaban Johnscaban requested a review from a team as a code owner May 1, 2024 19:40
@jellyfin-bot jellyfin-bot added this to In progress in Ongoing development May 1, 2024
@jellyfin-bot
Copy link
Contributor

This pull request has been inactive for 21 days and will be automatically closed in 7 days if there is no further activity.

@jellyfin-bot jellyfin-bot added the stale This issue/PR has gone stale. label May 23, 2024
@Johnscaban
Copy link
Contributor Author

Johnscaban commented May 28, 2024

Should this pull request be converted to a draft until it can get reviewed so that it doesn't get closed?

@cewert cewert removed the stale This issue/PR has gone stale. label May 29, 2024
@jellyfin-bot
Copy link
Contributor

This pull request has been inactive for 21 days and will be automatically closed in 7 days if there is no further activity.

@jellyfin-bot jellyfin-bot added the stale This issue/PR has gone stale. label Jun 19, 2024
@jellyfin-bot
Copy link
Contributor

This pull request has been closed because it has been inactive for 28 days. You may submit a new pull request if desired.

Ongoing development automation moved this from In progress to Done Jun 27, 2024
@Johnscaban
Copy link
Contributor Author

Should I submit a new pull request?

@cewert cewert reopened this Jul 19, 2024
Ongoing development automation moved this from Done to In progress Jul 19, 2024
@cewert cewert added new-setting A new user setting. and removed stale This issue/PR has gone stale. labels Jul 19, 2024
@cewert
Copy link
Member

cewert commented Jul 19, 2024

Sorry this one slipped through the cracks. No need to remake

@Johnscaban
Copy link
Contributor Author

No problem. Thanks!

Copy link
Member

@cewert cewert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great.

Would you mind changing the user setting so that it uses the web client setting by default? The goal is to have all user settings use web client by default with options to override client side.

Ongoing development automation moved this from In progress to Review in progress Jul 20, 2024
@Johnscaban
Copy link
Contributor Author

How should this be done? I'm currently not at my PC, but I would like to get an idea of how to implement your requested changes.

@cewert
Copy link
Member

cewert commented Jul 20, 2024

First step is figuring out how to access web client setting. I don't know for sure but I think the web client setting for rewatched should already be saved to the global session in either m.global.session.user.Policy or m.global.session.user.Configuration.

Then you'd need to modify the user setting to a radio selector instead of a bool. That way you can add a third option to the setting - Use web client setting(default), enabled, and disabled.

Then you would have to tweak your code to use the web client setting from m.global.session.user as needed based on the user setting.

Does that make sense?

@Johnscaban
Copy link
Contributor Author

Okay, so I searched in both m.global.session.user.Policy and m.global.session.user.Configuration when they get printed to the console when a user logs in, and there is no field for the rewatched setting. Am I looking in the right place?

@cewert
Copy link
Member

cewert commented Jul 20, 2024

I forgot the display settings come from a different API endpoint and aren't saved to the session var https://github.com/jellyfin/jellyfin-roku/blob/master/source/utils/session.bs#L232

but there still isn't a setting for rewatched so it looks like we don't have access to the web client setting :(

jellyfin-api-user-displayprefs-

settings/settings.json Outdated Show resolved Hide resolved
settings/settings.json Outdated Show resolved Hide resolved
Co-authored-by: Charles Ewert <cewert@gmail.com>
@jellyfin-bot jellyfin-bot moved this from Review in progress to In progress in Ongoing development Jul 20, 2024
locale/en_US/translations.ts Outdated Show resolved Hide resolved
Ongoing development automation moved this from In progress to Review in progress Jul 21, 2024
@jellyfin-bot jellyfin-bot moved this from Review in progress to In progress in Ongoing development Jul 21, 2024
@Johnscaban
Copy link
Contributor Author

Johnscaban commented Jul 21, 2024

Sorry I forgot about the translations.

Ongoing development automation moved this from In progress to Reviewer approved Jul 21, 2024
Copy link
Member

@cewert cewert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@cewert cewert merged commit 91a6c70 into jellyfin:master Jul 21, 2024
11 checks passed
Ongoing development automation moved this from Reviewer approved to Done Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-setting A new user setting.
Projects
Development

Successfully merging this pull request may close these issues.

Enable Rewatching in "Next Up"
3 participants