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

[tvOS][Bug] Fixes season selector only showing a single season. #950

Merged
merged 4 commits into from
Jan 17, 2024

Conversation

nokeeo
Copy link
Contributor

@nokeeo nokeeo commented Jan 13, 2024

Upon initial view load, only the first season is loaded into menuSections when the episode list is resolved.

This change stores the list of all seasons, which contain their display name. When changing the series selector, menuSections is updated with season details.

Also when changing seasons in the picker, the containing scroll view scrolled to the top of the page. This was jarring. This change also removes that behavior.

Upon initial view load, only the first season is loaded into `menuSections` when the episode list is resolved.

This change stores the list of all seasons, which contain their display name.  When changing the series selector, `menuSections` is updated with season details.

Also when changing seasons in the picker, the containing scroll view scrolled to the top of the page.  This was jarring.  This change also removes that behavior.
Copy link
Member

@LePips LePips left a comment

Choose a reason for hiding this comment

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

I seem to have broken this in: https://github.com/jellyfin/Swiftfin/pull/883/files#diff-1462c1160e5edfcfdbf96fa2622aeaead21bbc319987b8bfb6ace9cd32e66382L145

We shouldn't create a new variable to hold what seasons are there, that's what keys for the menuSections dictionary are. For now, what we should do is mimic the work that was done before where we instead set an empty array to each season before we get the episodes for the first season and when a season is selected and if it is empty, get the episodes for the season.

I have done work in #905 that lays the foundation for an eventual refactor of this entire view model so that episodes can be lazily loaded, mainly for the case of large seasons (eg: FMAB is one season with ~60 episodes).

@nokeeo
Copy link
Contributor Author

nokeeo commented Jan 14, 2024

Thanks for the review! PTAL.

@nokeeo nokeeo requested a review from LePips January 14, 2024 02:51
@nokeeo
Copy link
Contributor Author

nokeeo commented Jan 16, 2024

Done. PTAL.

@nokeeo nokeeo requested a review from LePips January 16, 2024 02:43
@nokeeo
Copy link
Contributor Author

nokeeo commented Jan 16, 2024

Thanks! Updated. PTAL.

@LePips LePips merged commit e72c516 into jellyfin:main Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants