WORKAROUND FOUND: Unable to retrieve metadata for a particular show (Star Trek: Short Treks)

Context / Logs

Server Version#: 1.19.2.2702 (776106bc6)
Player Version#: not relevant; applicable to all player platforms, including Android, Roku, and web

Plex Media Server Logs_2020-04-24_11-00-19.zip (4.9 MB)

Summary

At some point, in TheTVDB, the “Star Trek Short Treks” specials were moved out of Star Trek: Discovery and into their own first-class show, Star Trek: Short Treks. I changed the filenames and directory structure accordingly in my filesystem.

No amount of refreshing metadata, running library scans, emptying trash, deleting caches, etc has allowed PMS to acquire the metadata. It’s been months since I moved around the files, and other episodes (and even entirely new shows) are able to acquire metadata just fine, while Star Trek: Short Treks remains empty.

EDIT: Workaround (HT @pshanew)

In this particular case, it seems there’s a hiccup around automatic matching (and even finding a manual match). Here is the workaround. (It’s not marked as a “Solution” because the actual solution would be fixing the matching algorithms PMS uses.)

The manifestation of this matching bug is probably specific to the circumstances surrounding Star Trek: Discovery and Star Trek: Short Treks, so it is not addressable through any of the traditional metadata refresh techniques described in this thread.

Details

File Structure

Here’s the relevant part of the file structure in the TV directory that’s in my library:

Star Trek Short Treks
├── Season 1
│   ├── Star Trek Short Treks - s01e01 - Runaway.mkv
│   ├── Star Trek Short Treks - s01e02 - Calypso.mkv
│   ├── Star Trek Short Treks - s01e03 - The Brightest Star.mkv
│   └── Star Trek Short Treks - s01e04 - The Escape Artist.mkv
└── Season 2
    ├── Star Trek Short Treks - s02e01 - Q&A.mkv
    ├── Star Trek Short Treks - s02e02 - The Trouble with Edward.mkv
    ├── Star Trek Short Treks - s02e03 - Ask Not.mkv
    ├── Star Trek Short Treks - s02e04 - The Girl Who Made the Stars.mkv
    ├── Star Trek Short Treks - s02e05 - Ephraim and Dot.mkv
    └── Star Trek Short Treks - s02e06 - Children of Mars.mkv

View in Plex Web

Agent Configurations for TV


Scheduled Tasks

These have all run many, many times since I moved the files months ago.

Attempted Resolutions

I tried these in all sorts of different combinations and orders:

  1. restarting PMS
  2. updating PMS
  3. scanning the TV section
  4. clicking on “Refresh Metadata” (on the TV section, the show, the season, and individual episodes)
  5. clicking on “Analyze” at different levels
  6. clicking on “Match…” at the show level (which has no search results)
  7. removing the files, emptying trash, re-adding the files
  8. Clearing Plugin/Channel/Agent HTTP Caches for TheTVDB (then trying all of the above again in creative orders)

TV Shows must be precise - what you have isn’t even close:

Hmm…can you be more specific by what you mean?

I’m very familiar with that document and am maniacal about making sure that all my files are named exactly correctly.

The only exception I see here is the lack of a colon in “Star Trek: Short Treks”, but that seems to work just fine for numerous other shows (such as “Star Trek: Discovery”)!

I have hundreds of TV shows in my library with files I have named according to all the same principles, and this is the only problematic one.

Not sure what document you’ve been reading:

A TV Show Library/
....Star Trek Short Treks/
.......Season 01/
.........Star Trek Short Treks - S01E01.mkv
.........Star Trek Short Treks - S01E02 - Episode Name Optional.mkv
.......Season 02/
.........Star Trek Short Treks - S02E01.mkv
.........Star Trek Short Treks - S02E02 - Episode Name Optional.mkv

Remove show from library
Scan Library
Empty Trash
Clean Bundles

Name and structure like that above

Put show back in Library
Scan Library

Then start fixing your other shows - if any of them matched like you’ve been naming and structuring - it’s a miracle.

I think we’ve had a misunderstanding…

The tree command outputs spaces escaped, which is what I copied-and-pasted into my original post. I’ll go back and fix that momentarily. (None of the filenames have backslashes in them!)

Running tree -N cleans that up, which I guess is what I should have done in the first place.

From there, the only differences from your recommendation are

  • whether one-digit season numbers in the folders are prefixed with a 0, which is not required
  • the capitalization of the episode filenames’ season and episode identifiers (sXXeYY versus SXXEYY), which is optional

Put plainly, you’re missing the show name folder in the listing of your directory hierarchy. Between “TV” and “Season1” you should have “Star Trek Short Treks” (as in @JuiceWSA’s example). Maybe (probably?) it was a copy/paste error when you were grabbing the relevant section.

[Edit]
Never mind, I see you’ve corrected your post.

1 Like

Yup. Copy-and-paste error that I noticed just before you posted your comment! And I already fixed it. (I ran tree from inside the Star Trek Short Treks directory and then failed to clean up the output correctly for my post!)

Okay…so now that we’ve gotten past my bone-headed copy-and-paste mistakes, I promise you that there really is a non-user-error problem here… :slight_smile:

Well, for what it’s worth, I just did a test to see if it would auto-match in my TV library. It did not. Performing manual match does return the correct show, but with a score of only 66; that’s likely below the confidence threshold with which an automatic match is allowed. But, after forcing the match, it does download the correct metadata.

Why the algorithm is scoring a seeming (near-) perfect match so low, I can’t say. But, given this, it’s likely that users performing manual matches will increase the score, over time.

Thanks; I appreciate the effort! Unfortunately, the “Match…” / “Fix Match” flow returns nothing:

But now wait a second…did I just miss choosing a different option under “Auto Match”? Sigh.

Standby…I’m trying cleaning bundles according to The Plex Dance ™ (which @JuiceWSA linked to), which is something I’m not confident I tried a few months back. I’m not sure if it does stuff under the hood that’s different than the manual Clearing Plugin/Channel/Agent HTTP Caches.

Sorry, I should have been more specific. When you do your Match, click the Search Options link and add the release year. That will get you the score 66 match. You should be able to leave everything else as-is.

I also had a complete melt-down in a test (I refuse to change mine from Season 00 of Discovery) of the exact show in question (the ‘new’ one):

Filebot went to TVDB and got those names - and Plex coughed up a hair-ball…
Plex had no choice when I entered the TVDB ID#: 376108 <—in Search Options, in place of the ‘Name’.

1 Like

Ah yes, the old TVDB ID trick. I’ve never had to use that one yet.

I’ve used it a few times, and just now for this one.

Perhaps if I hadn’t had Discovery already matched with the old Short Treks (stubbornly) still aboard Season 00 - the outcome might have been different - or it is a candidate for Match Failures, 'cause that one surely fails with what is supposed to be perfect names and structures…

BTW - even with the ID# it was still at 60something%.
Not sure what’s failing there, but smoke’s rolling out of something somewhere…lol

Woah…ready for this?

So, for starters, cleaning bundles did nothing, which is unsurprising, given the last few comments.

Now, on to manual matching…

  1. Click on “Match…”, “Search Options”, enter in “2018” (which is the actual release year, according to TheTVDB).
  2. Results:
  3. Click on “Search Options”, enter in “2019” (which is not the release year), and we get this:

What!? And how is that a 100% match, when “2018” offers no matches at all?

Anyway, selecting that and waiting for a few metadata refreshes/scans yields the desired result:

Note that I did not have to manually specify TheTVDB ID.

So now, I wonder whether it’s going to sync down my watched status from Trakt.tv, considering that I’ve already had to figure out how to fix my Trakt.tv history for Star Trek: Short Treks when all this happened a few months ago. (Typically, when I already have entries in my Trakt.tv history and later add the show to Plex, it inherits the correct watched status from Trakt.tv.) Anyway, this is totally tangential to my original inquiry, which seems to be resolved…other than the curiosity about the 2018 versus 2019 matching.

I think this “show” is just screwed somehow since they (TVDB) changed horses in mid stream (Season).

I’m not sure - and not going to find out - what would happen if we Plex Danced both shows right now. I suspect there would still be trouble. Somebody try that and get back to us…lol

Nice. Here’s something just as interesting. I just did the same test again, this time adding the (incorrect) release year to the folder name: Star Trek Short Treks (2019). When adding it back, it was automatically matched.

When I originally tested, I tried two ways: With the correct release year (2018) and without. The results were the same either way. Now with 2019 there’s an automatic match.

Super interesting. I wonder where the matching algorithm bug is… And I wonder what else it could be affecting! (I hope that a Plex employee stumbles on this thread!)

Not sure it’s worth the effort sending in the team with the flame throwers - we all have it matched now (one way or another), so it should behave. <— he says with no confidence whatsoever.

I’m going to leave things as they are, in case Picard shows up with some Short Treks and if that happens I suppose I will capitulate - at some point.

Sometimes, for no apparent reason Fix Match must be employed. If I don’t have to do it 50% of the time - I’m good. If I start having to do it more than .01% of the time - not so much.

Since the big TVDB melt-down and API overhaul - Fix Match is very infrequent - we’re still in the tolerance window.

Yeah, I gotcha.

My attitude about my Plex config is to minimize any kind of manual curation. My operative principle is If I had to reinstall Plex from scratch and it had to rebuild my library fresh, I want all metadata to match exactly right without manual intervention. (This is why I’m so maniacal about correct filenames and directory structure, as well as keeping that consistent with TheTVDB, which is what I use as authoritative!)

This is aspirational, not iron-clad, but it’s why I don’t like this “solution”. It’s not a “solution”, so much as it is a workaround. (I have to harp on this distinction at work all the time with engineers who are designing Alexa APIs…)

I found myself wondering whether the year matching logic might be looking at the years of the individual episodes, rather than of the series, but that was no help: The earliest episode was also in 2018, which is the year of the series.

Yup. I sure hope that’s it, and that in the future, this will resolve to a non-issue.

I’m maniacal about FileBot <—'cause it goes to TVDB and gets the name they use <—and if Plex has a problem with that too many times <— I have a problem with Plex.

So far, So good.
with an acceptable fail cake rate.