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

Fix season handling ("Season Unknown" / unneccesary empty seasons) #12240

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

nielsvanvelzen
Copy link
Member

@nielsvanvelzen nielsvanvelzen commented Jul 8, 2024

Reverts a part of #12050.

Changes

Starting with 10.9.7, when refreshing metadata or scanning a series it would reset the virtual season to "Season Unknown". Reverting a part of the 10.9.7 related to season lookups fixed this.

Probably needs more testing for non-virtual season usages.

Issues

Fixes #12208 (confirmed via forum)

@nielsvanvelzen nielsvanvelzen changed the title Fix "Season Unknown" Fix season handling ("Season Unknown" / unneccesary empty seasons) Jul 9, 2024
@nielsvanvelzen nielsvanvelzen added the stable backport Backport into the next stable release label Jul 9, 2024
@nielsvanvelzen nielsvanvelzen requested a review from a team July 10, 2024 12:56
@Shadowghost
Copy link
Contributor

@sjorge please take a look

@sjorge
Copy link

sjorge commented Jul 10, 2024

@Shadowghost still havent figured out how to build jellyfin myself. I can certainly retest once thus hits the next release.

@fernvenue
Copy link

Hi, I just tested this version, it works perfectly fine on my device, and the unneccesary empty seasons doesn't show anymore :)

@X012C
Copy link

X012C commented Jul 13, 2024

I deleted the NFO files and it caused an unknown season to appear. Now I can't delete these non-existent error messages.

@crobibero crobibero merged commit c1f7ccb into jellyfin:release-10.9.z Jul 15, 2024
12 of 13 checks passed
@nielsvanvelzen nielsvanvelzen deleted the season-unknown branch July 15, 2024 12:29
joshuaboniface pushed a commit that referenced this pull request Jul 21, 2024
Fix season handling ("Season Unknown" / unneccesary empty seasons)

Original-merge: c1f7ccb

Merged-by: crobibero <cody@robibe.ro>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
@jellyfin-bot jellyfin-bot removed the stable backport Backport into the next stable release label Jul 21, 2024
@JamsRepos
Copy link

JamsRepos commented Jul 21, 2024

Hi, I just tested this version, it works perfectly fine on my device, and the unneccesary empty seasons doesn't show anymore :)

How did you manage to test it no longer appearing? I'm on the latest release which this seems to be included in and I don't see any indication of it being fixed. I still have blank seasons and specials, after refreshing metadata to make them disappear, then they re-appear on a library scan.

EDIT: I've restarted the server since upgrading and tried again, seems to be working. I'll test further.

@sjorge
Copy link

sjorge commented Jul 21, 2024

@Shadowghost sadly #11575 is broken again, seasons are no longer created when 'Display specials within seasons they are aired' is unchecked.

Exit: is it safe to downgrade? There are no new migrations in the .8 release right?

@sjorge
Copy link

sjorge commented Jul 21, 2024

Even worse, with the work around of enabling the option a lot of other weirdness is happening now.

All shows that are completed, now show 1 empty blue dot indicator.

image
image
image

I'm just going to run the risk of a downgrade breaking everything and try and roll back.

@fernvenue
Copy link

How did you manage to test it no longer appearing?

Hi @JamsRepos, I manually ran the branch nielsvanvelzen:season-unknown, and it performed well during testing. I have also upgraded to the latest version on my server, restarted the service, and after rescanning the library, there is no longer an issue with unknown seasons.

EDIT: I've restarted the server since upgrading and tried again, seems to be working. I'll test further.

Great, I think it would be better to have more people test it :)

Exit: is it safe to downgrade? There are no new migrations in the .8 release right?

Hi @sjorge, not sure about that, give it a snapshot before you downgrade will be better maybe?

@Shadowghost
Copy link
Contributor

Shadowghost commented Jul 21, 2024

@sjorge it's safe to downgrade, no database migrations in 10.9.8. We only had one in 10.9.4
@nielsvanvelzen seems like this PR did break the logic again (as mentioned in the original ticket there is a bug in the ancestor calculation somewhere), so we need to find another way to fix this.

@sjorge
Copy link

sjorge commented Jul 21, 2024

Ok downgrade went fine, am traveling so was way harder to do than usual as I did not make a vm backup before upgrading.

10.9.8: regressed to #11575 behavior, but the workaround of having the option checked no longer works. the partial revert seems to have made worse to what we had pre-10.9.7.
10.9.7: creates seasons fine with the option checked or unchecked. I'm not getting additional ghost seasons, what the partial revert tried to address.

I did the testing by dropping a .ignore in a show folder, triggering 2 full rescans, removing the .ignore and triggering 1 full rescan.

Additional 10.9.8 seems to now also have a new weird issue after a full rescan were it marked all series level entries a unwatched if it only contains virtual seasons that are watched.

Maybe the entire previous PR should be reverted? I can live with the workaround until 19.10 release. So this can be properly addressed in master.

Bit hard to provide full logs on my phone though. If need be I can make fresh ones in ~1 week when I get home.

@sjorge
Copy link

sjorge commented Jul 21, 2024

@nielsvanvelzen seems like this PR did break the logic again (as mentioned in the original ticket there is a bug in the ancestor calculation somewhere), so we need to find another way to fix this.

Broken ancestry would also explain the weird new unwatched status issue I think.

Edit: I wonder if there is different behavior between series -> season -> episode ancestry when season level is: a) all virtual (me), b) all physical, c) mix of physical and virtual

That could explain the different results.

@Shadowghost
Copy link
Contributor

If I remember correctly from my debugging, ancestry is borked only for virtual seasons because those are created on-demand after scanning. In this case we need to recalculate the episode ancestors but that is somewhat broken.

@KimPig
Copy link
Contributor

KimPig commented Jul 21, 2024

Even after the update, virtual seasons still exist. Scanning all the libraries and restarting the server both didn't help me.

@p37307
Copy link

p37307 commented Jul 21, 2024

Even after the update, virtual seasons still exist. Scanning all the libraries and restarting the server both didn't help me.

Same. I rescanned, restarted, rescanned. restarted. Windows 10 JF 10.9.8

I even did a couple series on their own.

Anything special we need to do? I added a reply to the forum post. Not sure where people want to discuss this issue. https://forum.jellyfin.org/t-how-to-disable-empty-seasons-missing-episode-fetcher?pid=30445#pid30445

@theguymadmax
Copy link
Contributor

You need to scan your library and select replace all metadata to remove the virtual seasons from your library.

@p37307
Copy link

p37307 commented Jul 22, 2024

You need to scan your library and select replace all metadata to remove the virtual seasons from your library.

Thanks for your response, but I don't want to replace all my metadata.

After reading your response, I created a batch file that created "Specials" folders in the root of all my series folders, manually ran a scan for new and updated. That created an actual path to the folder in the system instead of it being virtual. Afterwards, I then reversed my batch script and deleted the "Specials" folders to get rid of them. Luckily, all my real specials were in "Season 00" folders so I could get away with this. Looks like the issue is resolved.

As a side product of doing this, it appears a few library issues I was having has been solved as it picked up several items it should have had in the library but for whatever reason, weren't there.

@Suzaru
Copy link

Suzaru commented Jul 22, 2024

You need to scan your library and select replace all metadata to remove the virtual seasons from your library.

Hey, sadly this didn't fix the virutal seasons for me. I'm trying to fix this, but they re-appear everytime. I tried full replace, deleting images, restarting, everything. Any ideas?

Edit: nvm I fixed it. It was the NFO file in each folder :/ sadly it didn't get deleted when rescanning. So I guess I have to do it manually.

Edit2: aaaand they are back, magically. Idk. I guess I give up.

Edit3: Can confirm that the issue is fixed after fully deleting a series and rebuilding it. But this will be an absolute PITA.

@KimPig
Copy link
Contributor

KimPig commented Jul 22, 2024

Is there any other solution? I don't want to receive the metadata again because I have modified it.

@sjorge
Copy link

sjorge commented Jul 22, 2024

Probably wait until the ancestry is properly fixed, I would expect a normal scan to then notice there is a virtual season with no episodes and removes it.

@Suzaru
Copy link

Suzaru commented Jul 22, 2024

So I tried everything and this is definitely not fixed fully, sadly. Future seasons for example will show up, when sonarr has them too. I deactivated everything I could, but there is just nothing else left to do. Even rebuilding series fully isn't working. The empty seasons will reappear eventually.

Guess we have to wait. Don't waste ~18h trying to fix it, like I did. Not worth it.

@jotpunktopunkt
Copy link

i can only add that the issue persists - but haven't completely rebuilt my library, as i would like to avoid that work

the question i have is: is there actually still an issue (and was it acknowledged by the dev team?) or is the (lasting) solution to rebuild the library?

@sjorge
Copy link

sjorge commented Jul 24, 2024 via email

@nielsvanvelzen
Copy link
Member Author

This PR reverted the part that made my set-up work again and it was then confirmed by multiple other users that it also fixed their problems. It's important to know that this change does not magically fix the extra seasons. You'll need to go to the individual series and use the "search for missing metadata" option (or replace all). It does not fix anything when doing a library scan.

From the reports it's obvious there are still more issues to be solved. I'd ask everyone to please make a proper issue for that instead of commenting on this pull request.

@jotpunktopunkt

This comment was marked as off-topic.

@nielsvanvelzen

This comment was marked as off-topic.

@RandomNamer

This comment was marked as off-topic.

@Aydonger

This comment was marked as off-topic.

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.