Jump to content

Work around for NFO generation errors


Recommended Posts

Posted

Emby needs _NEEDS_ a way to purge the metadata for items at a set path. I've got a case where I remove an folder of movies (All Creatures Great and Small, 1978) from emby, delete the nfo files, add them back in with the correct tmdbid ( 7406-all-creastures-great-and-small), and Emby reliably reidentifies the "new" content as "The Zimmern List" (74067-the-zimmern-list). The generated NFO file misidentifies "The Zimmern List" with tmdbid=7406. This is, of course, wrong!

We need something like the following:
1. Use this commandline tool to generate the NFO files.
2. Emby just respects the NFO files.

 

Happy2Play
Posted (edited)

I don't follow but adding id to naming scheme resolves all misidentification.

Movie Naming | Emby Documentation

As what you are describing sounds like provider miss-matching but need complete info for example/library provider order/naming scheme/logs.

May need the nfo file also as I have never seen a single digit resolve incorrectly as you just described 7406 vs 74067.

NFO for your example from TMDB

Spoiler

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<tvshow>
  <plot><![CDATA[The trials and misadventures of the staff at a country veterinary office in Yorkshire. James Herriot, a young animal surgeon, moves to a small Yorkshire town to begin his first job.]]></plot>
  <outline><![CDATA[The trials and misadventures of the staff at a country veterinary office in Yorkshire. James Herriot, a young animal surgeon, moves to a small Yorkshire town to begin his first job.]]></outline>
  <lockdata>false</lockdata>
  <dateadded>2025-12-21 08:55:20</dateadded>
  <title>All Creatures Great and Small</title>
  <originaltitle>All Creatures Great and Small</originaltitle>
  <actor>
    <name>Lynda Bellingham</name>
    <role>Helen Herriot</role>
    <type>Actor</type>
    <tmdbid>174724</tmdbid>
  </actor>
  <actor>
    <name>Robert Hardy</name>
    <role>Siegfried Farnon</role>
    <type>Actor</type>
    <tmdbid>23076</tmdbid>
  </actor>
  <actor>
    <name>Christopher Timothy</name>
    <role>James Herriot</role>
    <type>Actor</type>
    <tmdbid>184990</tmdbid>
  </actor>
  <actor>
    <name>Carol Drinkwater</name>
    <role>Helen Herriot</role>
    <type>Actor</type>
    <tmdbid>145875</tmdbid>
  </actor>
  <actor>
    <name>Peter Davison</name>
    <role>Tristan Farnon</role>
    <type>Actor</type>
    <tvdbid>313429</tvdbid>
    <tmdbid>47513</tmdbid>
  </actor>
  <actor>
    <name>Jean Heywood</name>
    <role>Mrs Alton</role>
    <type>Actor</type>
    <tmdbid>481</tmdbid>
  </actor>
  <rating>7.756</rating>
  <year>1978</year>
  <sorttitle>All Creatures Great and Small</sorttitle>
  <mpaa>TV-PG</mpaa>
  <imdb_id>tt0075472</imdb_id>
  <tmdbid>7406</tmdbid>
  <premiered>1978-01-07</premiered>
  <releasedate>1978-01-07</releasedate>
  <enddate>1990-11-16</enddate>
  <runtime>60</runtime>
  <genre>Comedy</genre>
  <genre>Drama</genre>
  <studio>BBC One</studio>
  <uniqueid type="tmdb">7406</uniqueid>
  <uniqueid type="imdb">tt0075472</uniqueid>
  <uniqueid type="tvrage">2554</uniqueid>
  <tvrageid>2554</tvrageid>
  <uniqueid type="tvdb">78289</uniqueid>
  <tvdbid>78289</tvdbid>
  <episodeguide>{"tmdb":"7406","imdb":"tt0075472","tvrage":"2554","tvdb":"78289"}</episodeguide>
  <id>78289</id>
  <season>-1</season>
  <episode>-1</episode>
  <displayorder>aired</displayorder>
  <status>Ended</status>
</tvshow>

 

Edited by Happy2Play
  • Agree 2
Happy2Play
Posted (edited)

I see the issue as it is a TVDB issue with bad data. 

The Zimmerman List with All Creatures Great and Small providerid.

image.thumb.png.848df3f381281f1fe0d00f371440a427.png

 

Edited by Happy2Play
  • Like 2
Happy2Play
Posted (edited)

FYI updated TVDB with correct linked providerids.

Edited by Happy2Play
  • Like 1
Posted
2 minutes ago, Happy2Play said:

FYI updated TVDB with correct linked providerids.

+ that would server the whole community.

Posted

Thank you for finding the issue... however note that I gave emby "tmdbid", and it gave incorrect results because of "tvdb". The point I'm making is we can avoid "I'm going to guess what you mean" foot guns by exposing a little tool that looks like this:
 

emby-identify set /media/movies/Dune\ \(2021\) --tmdb 438631
emby-identify set /media/tv/Andor --tmdb 83867

BAM!

DONE!

There's 100s of benefits to this:

  1. Such a tool as well defined inputs and outputs. Easy to write, and easy to get right.
  2. Because the tool is predictable, the end-user experiences... predictability.
  3. People can write scripts to solve problems you've never thought of.

 

Posted

I'm currently writing a wrapper script around `tinyMediaManager` to do this. The hoop jumping is a function of design debt: 2nd guessing what the user wants, and not providing access to the underlying tools to let the user 1st guess what they want. So `tinyMediaManager` wants to set it up as a daemon that scans and auto-identifies movies. (Features always sound so GREAT!!!) Okay, thankfully they have a CLI, so that I can:

  1. set up a fake movie database with the desired movie/tv-show hardlinked somewhere in the content directory.
  2. set up fake cache/data/log directories.
  3. run `tinyMediaManger` once to download the `nfo` and `jpg` files.
  4. copy the `nfo` and `jpg` files back into my database.

All of this is, of course, brittle and annoying to do. And it's reinventing the wheel. And it's a product of not appreciating the usefulness of small purpose-built tools.

Happy2Play
Posted

Well that is the issue as your provider order is the key here as you provided a providerid that was used on a different provider and got bad info do to wrong info on their site so querying TMDBID=7406 on TVDB returned The Zimmerman List.

You have to provide all relevant info as your provider order tells us the overall issue. 

Happy2Play
Posted

But since I updated provider, this should not be reproduceable minus provider cache data in cache folder.

Posted

Hi, the directory name is `All Creatures Great and Small (1978) [tmdbid=7406]`. Why would it use tvdb as a provider?

Happy2Play
Posted
1 minute ago, amichaux said:

Hi, the directory name is `All Creatures Great and Small (1978) [tmdbid=7406]`. Why would it use tvdb as a provider?

What is your Library Metadata Downloader Provider order?

Just because you provide an id does not mean that provider is directly used.

Posted

I see. I learned something about how emby works.

Happy2Play
Posted

Here is the actual query for your example assuming your provider order has TVDB first.

2025-12-21 09:52:03.467 Debug App: Running TvdbSeriesProvider for E:\Media\TV Shows - nfo\All Creatures Great and Small (1978) [tmdbid=7406]
2025-12-21 09:52:03.471 Info HttpClient: GET https://api4.thetvdb.com/v4/search?type=series&q=7406&remote_id=7406
2025-12-21 09:52:03.559 Info HttpClient: Http response 200 from https://api4.thetvdb.com/v4/search?type=series&q=7406&remote_id=7406 after 88ms

So before the change I made it would have returned "The Zimmerman List" due to bad item metadata.

Posted (edited)

There's too much going on behind your back here. The status quo is me poking through all my library menus and "setting state" (the provider order), and remembering to do that forever whenever I create a new library. And noticing when things go wrong.

If we had an `emby-identity` like tool, we could generate the NFOs and emby  _show you_ what it is doing, without poking around for log files. The user tells emby the id and provider, emby looks it up, emby generates the NFO,, the user sees that it is correct. Scriptable dramatically widens the usefulness.

I wrote my `tinyMediaManager` wrapper, and it works. It's frustrating that we have to resort to such tricks, and not everyone can do it.

Edited by amichaux
Happy2Play
Posted

That is the thing as TMM only gives you TMDB as a provider option for Free.  Where Emby is giving you TVDB/TMDB/OMBD and the given order will determine the primary metadata received.

But yes I think it has been mentioned somewhere where Identify should only query the provider that the id is provided for instead of library provider order (ie Externalids) as it creates this slight confusion.

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...