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

Move NFO series season name parsing to own local provider #11719

Merged

Conversation

Shadowghost
Copy link
Contributor

@Shadowghost Shadowghost commented May 18, 2024

Removes all the hackery around season name parsing on series level and moves it to a dedicated NFO reader. This should prevent any conflicts with actual season metadata providers.

Additionally, we now set the path for season folders if the folder was recognized as season folder. This allows proper updating of local season metadata because the logic depends on a media type check which will always fail without a path.

Changes

  • Move NFO series season name parsing to own local provider
  • Set the path for season folders

Issues
Fixes #11706
Fixes #11656
Fixes #11709 (potentially)

@Shadowghost Shadowghost added the stable backport Backport into the next stable release label May 18, 2024
@revam
Copy link
Contributor

revam commented May 18, 2024

Also, can confirm it works as expected during local testing conducted with @Shadowghost.

@gnattu gnattu mentioned this pull request May 21, 2024
var seasonPath = info.Path;
if (seasonPath is not null)
{
var path = Path.Combine(seasonPath, "tvshow.nfo");
Copy link
Member

Choose a reason for hiding this comment

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

Kodi doesn't seem to allow tvshow.nfo in the season folder. I kind of prefer doing it like that as well to simplify it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Season path can also be the series folder if the season hasn't their own folder. Though this would also be caught by the next check.
Without having a season path set, you can't refresh metadata from a season though.

@joshuaboniface joshuaboniface merged commit a53ea02 into jellyfin:release-10.9.z Jun 1, 2024
11 of 12 checks passed
joshuaboniface pushed a commit that referenced this pull request Jun 1, 2024
Move NFO series season name parsing to own local provider

Original-merge: a53ea02

Merged-by: joshuaboniface <joshua@boniface.me>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
@jellyfin-bot jellyfin-bot removed the stable backport Backport into the next stable release label Jun 1, 2024
@@ -54,7 +54,8 @@ protected override Season Resolve(ItemResolveArgs args)
{
IndexNumber = seasonParserResult.SeasonNumber,
SeriesId = series.Id,
SeriesName = series.Name
SeriesName = series.Name,
Path = seasonParserResult.IsSeasonFolder ? path : args.Parent.Path
Copy link
Member

Choose a reason for hiding this comment

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

This line is causing issues for folder structures with season names. E.g. /Drive/Show/Season 3 - Season Name will end up with isSeasonDirectory=false. In 10.9.3<= this worked perfectly fine, now is uses the series path causing all episodes to merge into the last season.

You can add [InlineData("/Drive/Show/Season 3 - Season Name", 3, true)] to the SeasonFolderTests to reproduce the issue.

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.

None yet

7 participants