Jump to content

Emby not listing all seasons of a TV series


svdasein
Go to solution Solved by svdasein,

Recommended Posts

svdasein

I have a couple of cases I've identified and re-created a couple times wherein emby seems not to recognized all of seasons in a television series.  I have tried deleting all metadata for these shows and rescanning he library.  Even having done that, emby doesn't seem to know they're there.  The file names are right. And in fact I'm pretty sure that for some time the missing seasons were in fact listed.  But at some point "something happened". 

What information do you need from me to diagnose this?

Link to comment
Share on other sites

Happy2Play
2 minutes ago, svdasein said:

I have a couple of cases I've identified and re-created a couple times wherein emby seems not to recognized all of seasons in a television series.  I have tried deleting all metadata for these shows and rescanning he library.  Even having done that, emby doesn't seem to know they're there.  The file names are right. And in fact I'm pretty sure that for some time the missing seasons were in fact listed.  But at some point "something happened". 

What information do you need from me to diagnose this?

Can you go over a specific example to include structure and naming scheme.

If you were to select Refresh - search for missing, are these items found?  But there are a couple other topics with the exact same issue and some are resolved by Refreshing metadata.

Link to comment
Share on other sites

svdasein

Along with deleting and recreating metadata, I have tried refreshing metadata with and without replace all, and I've tried rescanning the library files.  Nothing seems to help.

The structure for each of the series in question is a single folder.  The file names follow the form

Show Name - S05E01 - Title Of Episode WEBDL-1080p.mkv

Permissions for all files are  identical.

I PMd Luke asking about options for sharing data - he said I could attach it to the PM if you guys asked for it.  I'd rather not share it here.  That said if you want the database and directory listings I'll put them in a tarball and attach to that PM.

[edit] I should mention that I did upgrade to the latest version just yesterday.  I was hoping that'd fix it (it did not).

Edited by svdasein
Link to comment
Share on other sites

svdasein

Each TV series has a directory.  There are no subdirectories beneath that.  The files are all named as I indicated above.

More generally, there is a TV directory under which there are show directories.  The TV library configuration points to the TV directory.

 

TV/Show (YYYY)/Show Name - S##E## - Title Of Episode SOURCE INFO-resolution.mkv

Link to comment
Share on other sites

svdasein

Yes I am - if I use the search feature and search for an episode title I'll get that  episode in the result set.  When I attempt to play that result, some (but not all) are complaining that "no compatible streams" were found.  Some *do* play properly.  I check subsequent to the successful searches - they're still not showing up in the show's main page - neither the episode nore the season, and the metadata browser does not include the missing seasons / eps.

Link to comment
Share on other sites

Happy2Play

Some users haver reported only a refresh at library level was resolving this issue.  But basically the information only appears to be partially in the database.  I am guessing they are unplayable do to not showing any media info.

  • Like 1
Link to comment
Share on other sites

svdasein

I have tried library level refreshes - I'll start one again now just to be sure. It has not helped in the past however.  What do you mean by "due to not showing any media info"?

 

[edit] Is it possible there is some artifact in the database that is affecting the library scan logic such that it will no longer add "certain things"?

Edited by svdasein
Link to comment
Share on other sites

Happy2Play
13 minutes ago, svdasein said:

I have tried library level refreshes - I'll start one again now just to be sure. It has not helped in the past however.  What do you mean by "due to not showing any media info"?

 

[edit] Is it possible there is some artifact in the database that is affecting the library scan logic such that it will no longer add "certain things"?

Can you post a server log.

Link to comment
Share on other sites

17 hours ago, svdasein said:

Each TV series has a directory.  There are no subdirectories beneath that.  The files are all named as I indicated above.

More generally, there is a TV directory under which there are show directories.  The TV library configuration points to the TV directory.

 

TV/Show (YYYY)/Show Name - S##E## - Title Of Episode SOURCE INFO-resolution.mkv

Can we please look at a concrete example rather than a general example? Thanks.

Link to comment
Share on other sites

svdasein

Ok - some additional information - interesting:

Subsequent to a full library refresh, one of the episodes in one of the two series I've identified as having the problem showed up within a season container in the UI.  It was specifically an episode which I was able to play after doing a search for the title.  Ones which I was not able to play did not "self repair" after the search-play-refresh library sequence.  Only the one that did in fact play properly. 

So - one of my two test cases now actually shows a season that was previously missing, but only lists the one episode that I was able to play after a manual search.

I'll attach the most recent log file in the PM I started with Luke.

 

Link to comment
Share on other sites

Are you doing a library scan or refresh?

Scan finds files, refresh update meta-data info of existing files.

Depending on your situation you may need to do both but I just wanted to bring to your attention these are different things.

Link to comment
Share on other sites

svdasein

cayars  yes I've tried both multiple times.  I suspect the sequence of events that caused one episode to actually show up probably gets really close to the problem. 

  1. Search for title of missing episode in missing season (it is found)
  2. Play the found episode (after this the season is still missing from the show)
  3. Scan entire library (Season shows up inside show with a single episode - the watched one)
Link to comment
Share on other sites

svdasein

Some additional detail:

I tried this sequence again to be sure I got it right. I searched for another episode which was found and was playable.  Subsequent to playing it, I note that an .nfo file was written or updated in the season's directory.  And - the missing episode does in fact show up in the (now visible) season.  So I'm not completely certain of the role that library scan in making the season itself visible. I will try this with the other example show (the one which so far I've been unable to play episodes from even when found by search).

Link to comment
Share on other sites

svdasein

Another test sequence:

  1. Search for episode in the series that has episodes that show up in search but do not play.
  2. Attempted to play - "no compatible streams"
  3. I note that there is an NFO file there. I deleted it and rescanned just that series.  NFO did not reappear, season and ep still missing
  4. Scanned the TV library -  NFO did not reappear, season and ep not showing in UI
  5. Full library scan (not sure if this completed - there's a 64% indicator in the TV library's entry in the libraries section of admin but I see no corresponding activity in the log) - NFO did not reappear, season and ep not showing in UI.
  6. Search for missing metadata in the series. No nfo, season, ep. 
  7. Replace all metadata.  No nfo, season, ep.

I'm  attaching updated server log and directory listing to that same PM.

Link to comment
Share on other sites

svdasein

I noticed there were some ISO files in the second one. Nuked those and rescanned files, reloaded metadata, no joy.

Link to comment
Share on other sites

2 hours ago, Luke said:

Can we please look at a concrete example rather than a general example? Thanks.

 

Link to comment
Share on other sites

  • Solution
svdasein

The solution to this problem was to alter the structure of the incomplete show directories such that each season has its own sub folder using the pattern "Season #" where # is non-zero-padded integer.  On a rescan of the library this forces emby to delete all the existing episode records and re-create everything.

Root cause was elusive, but possibly due to something in the string of database updates as emby software updates were applied.  That is just a guess.  Regardless, changing the structure of that one show fixed the problem.

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Hi, I recently came across the same problem as well. This only happens to my TV shows type library, and in the same library, some will show season row, and some don't, so it's a mixed situation where some shows don't have the season showing. Using "Scan Library Files" or "Refresh Metadata" does nothing to improve the situation. Upon inspection, I realized for the shows not showing seasons, it usually would have the "Season #" structure mentioned above, and inside that directory, a "season.nfo" would be missing for the show that are problematic, and quite consistent for the dozens of shows that has the same problem compare to the dozens of shows that are okay. So as a test, I manually created an empty "season.nfo" file under the "Season 1" directory of the show where the show is not showing seasons, and upon a metadata refresh within Emby for that show, Emby populated the "season.nfo" file successfully, and the season row showed up in emby almost immediately. Here is part of the logs that sees the empty "season.nfo" file and error out after I clicked "Scan Library Files" on the show, then populates it: 

************************************ Beginning of quote ***************************************

2022-06-01 11:07:32.097 Info LibraryMonitor: Season 1 (/mnt/Video/sonarr/Spy X Family/Season 1) will be refreshed.
2022-06-01 11:07:32.182 Error App: Error in Nfo
        *** Error Report ***
        Version: 4.7.1.0
        Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
        Operating system: Linux version 5.15.43-Unraid (root@Develop) (gcc (GCC) 11.2.0, GNU ld version 2.37-slack15) #1 SMP Wed May 25 11:54:05 PDT 2022
        Framework: .NET 6.0.2
        OS/Process: x64/x64
        Runtime: system/System.Private.CoreLib.dll
        Processor count: 16
        Data path: /config
        Application path: /system
        System.Xml.XmlException: System.Xml.XmlException: Root element is missing.
           at System.Xml.XmlTextReaderImpl.Throw(Exception e)
           at System.Xml.XmlTextReaderImpl.ParseDocumentContentAsync_ReadData(Boolean needMoreChars)
           at System.Xml.AsyncHelper.CallBoolTaskFuncWhenFinishCoreAsync[TArg](Task task, Func`2 func, TArg arg)
           at System.Xml.XmlReader.MoveToContentAsync()
           at NfoMetadata.Parsers.BaseNfoParser`1.Fetch(MetadataResult`1 item, String metadataFile, XmlReaderSettings settings, CancellationToken cancellationToken)
           at NfoMetadata.Providers.BaseNfoProvider`1.GetMetadata(ItemInfo info, LibraryOptions libraryOptions, IDirectoryService directoryService, CancellationToken cancellationToken)
           at Emby.Providers.Manager.MetadataService`2.RefreshWithProviders(MetadataResult`1 metadata, TIdType id, MetadataRefreshMode metadataRefreshMode, MetadataRefreshOptions options, LibraryOptions libraryOptions, List`1 providers, ItemImageProvider imageService, CancellationToken cancellationToken)
        Source: System.Private.Xml
        TargetSite: Void Throw(System.Exception)

2022-06-01 11:07:32.184 Info HttpClient: GET https://api.themoviedb.org/3/tv/120089/season/1?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=images,keywords,external_ids,credits,videos&language=zh-CN&include_image_language=zh-CN,zh,null,en
2022-06-01 11:08:06.063 Info Server: http/1.1 POST http://‌‍‍192.168.0.23‌:8096/emby/Sync/data. UserAgent: okhttp/4.9.2
2022-06-01 11:08:06.064 Info Server: http/1.1 Response 200 to ‌‍‍192.168.50.234‌. Time: 1ms. http://‌‍‍192.168.0.23:8096/emby/Sync/data

*********************************** End of quote ***********************************

I also repeated this process for a couple of more shows that are not showing seasons as well, and result is very consistent. As soon as the season.nfo is populated by Emby, the season which the file created in will show up in Emby immediately. So in my personal case, I would conclude that the missing/permission of "season.nfo" seems to be the root cause. I'd assume this is also somewhat consistent with svdasein's finding, which would force the season.nfo to be created as the directory structure is then new to Emby. How the file is not created automatically in an existing path by EmbyServer might require some look into. A catch-all I can recommand is to have a stronger enforcement of the creation and population of that "season.nfo" under each season folder, if possible. 

I'm not trying to raise a question or anything, just hope this information helps. 

 

Update: 

Here are the command I used that fixed my entire library. Please change the permission and owner that matches your own setup. 

cd to where your tv show library is, and run the below 3 commands: 

find . -type d -name Season* -exec touch {}/season.nfo \; 

find . -name season.nfo -exec chmod 666 {} \;

find . -name season.nfo -exec chown nobody:users {} \;

Now my problem is all solved. ;) Hope this can help. 

Edited by Pan
Adding the commands I used to solve the problem
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...