Database Settings for FileBot vs AMC

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
HarryMuscle
Posts: 34
Joined: 06 Jan 2022, 22:40

Database Settings for FileBot vs AMC

Post by HarryMuscle »

I'm trying to switch over to using TMDB for TV shows instead of the default TVDB and I just want to make sure I understand things correctly. First I tried to tell FileBot to use the TMDB for series by running

Code: Select all

filebot -script fn:properties --def series.db=TheMovieDB::TV
but the AMC script was still retrieving its data from TVDB. So then I added the following to the statement that invokes the AMC script

Code: Select all

--def seriesDB="TheMovieDB::TV"
and now it looks like AMC is using TMDB for the artwork.

So does that mean that there are two separate settings that control which database is used, one for FileBot and one for the AMC script?

However, AMC is still using TVDB for the NFO file according to the log

Code: Select all

[amc] Fetching series artwork for [TheMovieDB::TV::19885 / Season 1] to [/TV Shows/Sherlock (2010)/Season 01]
[amc] Generate Series NFO: Sherlock [TheTVDB::176941]
How do I go about changing the database used by AMC for the NFO file?

Thanks,
Harry
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Database Settings for FileBot vs AMC

Post by rednoah »

1.
The default series database is used by -rename that don't specify --db:

Code: Select all

filebot -script fn:properties --def series.db=TheMovieDB::TV

2.
The series.db setting has no effect on the amc script, because it'll alway specify TheTVDB explicitly for internal rename() calls. If you use --def seriesDB then it'll use that database instead. Either way, it'll never use the default.


3.
The htpc library script that is used by the amc script will always use TheTVDB for NFO file information regardless of which --db you use for renaming:
https://github.com/filebot/scripts/blob ... tpc.groovy



tl;dr you cannot change the database that is used by the --def artwork=y feature



EDIT:

:idea: However, the --apply nfo post-processing feature also generates NFO files but happens to use TheMovieDB information for NFO generation regardless of your selected database. So you could try that instead.
:idea: Please read the FAQ and How to Request Help.
HarryMuscle
Posts: 34
Joined: 06 Jan 2022, 22:40

Re: Database Settings for FileBot vs AMC

Post by HarryMuscle »

rednoah wrote: 03 Feb 2022, 01:04 1.
The default series database is used by -rename that don't specify --db:

Code: Select all

filebot -script fn:properties --def series.db=TheMovieDB::TV

2.
The series.db setting has no effect on the amc script, because it'll alway specify TheTVDB explicitly for internal rename() calls. If you use --def seriesDB then it'll use that database instead. Either way, it'll never use the default.


3.
The htpc library script that is used by the amc script will always use TheTVDB for NFO file information regardless of which --db you use for renaming:
https://github.com/filebot/scripts/blob ... tpc.groovy



tl;dr you cannot change the database that is used by the --def artwork=y feature



EDIT:

:idea: However, the --apply nfo post-processing feature also generates NFO files but happens to use TheMovieDB information for NFO generation regardless of your selected database. So you could try that instead.
Interesting. Any plans to update the htpc script to have it respect the selected database like the rest of the AMC script does when using the --def seriesDB argument?

Thanks,
Harry
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Database Settings for FileBot vs AMC

Post by rednoah »

Not planned due to concerns about backwards-compatibility. So we'd need a really good reason to switch to TheMovieDB::TV (for everything regardless of selected database) such as Plex confirmed no longer working with TheTVDB sourced NFO files.


:idea: The new nfo script is written database-agnostic from the start though, so that one will work with any database, for better or worse, i.e. not at all for AniDB and TVmaze.



EDIT:

:!: There's also major differences in what kind of artwork is available. I think that was the main reason why the --def artwork=y feature just can't work with TheMovieDB::TV, without significant loss of functionality anyway.
:idea: Please read the FAQ and How to Request Help.
HarryMuscle
Posts: 34
Joined: 06 Jan 2022, 22:40

Re: Database Settings for FileBot vs AMC

Post by HarryMuscle »

rednoah wrote: 03 Feb 2022, 04:46 Not planned due to concerns about backwards-compatibility. So we'd need a really good reason to switch to TheMovieDB::TV (for everything regardless of selected database) such as Plex confirmed no longer working with TheTVDB sourced NFO files.


:idea: The new nfo script is written database-agnostic from the start though, so that one will work with any database, for better or worse, i.e. not at all for AniDB and TVmaze.
Since a good amount of the functionality of the AMC script is now incorporated into FileBot itself, would you consider writing an AMC 2.0 script that is fully database agnostic and takes advantage of all of the overlapping functionality by calling FileBot for it instead? No easy task probably but would be a great future proofing feature for FileBot.

Thanks,
Harry
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Database Settings for FileBot vs AMC

Post by rednoah »

HarryMuscle wrote: 03 Feb 2022, 04:55 Since a good amount of the functionality of the AMC script is now incorporated into FileBot itself
--def artwork=y is a very small amount. We could make it even smaller by replacing the Groovy code with calling into the closed-source built-in feature instead, but then you definitely can't customize anything anymore. The XML template / artwork selection should be open-source so that users can see the code and modify it to their needs. Few do, but it's possible for those who need that level of customization.


:idea: Being able to use TheMovieDB as episode list source but TheTVDB as source for --def artwork=y is a feature in many ways, and I'm not convinced we'd come up positive overall if we change the current behaviour.



EDIT:

You can certainly fork your own though, and then let us know how you fare. You can trivially get database-agonist series NFO files with minor changes, but database-parity for artwork will give you a headache.

:idea: On that note, we could roll database-agnostic series nfo generation into the new nfo script. Though at that point the nfo script would have to make assumptions about how you have organized your files. The more a script grows in complexity, the less modifiable / configurable to newcomers it will become.
:idea: Please read the FAQ and How to Request Help.
HarryMuscle
Posts: 34
Joined: 06 Jan 2022, 22:40

Re: Database Settings for FileBot vs AMC

Post by HarryMuscle »

rednoah wrote: 03 Feb 2022, 05:19 :idea: Being able to use TheMovieDB as episode list source but TheTVDB as source for --def artwork=y is a feature in many ways, and I'm not convinced we'd come up positive overall if we change the current behaviour.

snip

:idea: On that note, we could roll database-agnostic series nfo generation into the new nfo script. Though at that point the nfo script would have to make assumptions about how you have organized your files. The more a script grows in complexity, the less modifiable / configurable to newcomers it will become.
I see where you're coming from. Historically TMDB has had better artwork and TVDB better episode lists. My only gripe really with using TVDB for the NFO info is that TVDB only provides guest actors for each episode and since it's going the paid route, it's not like I can query it to get the rest of the actors (from the season or series level) and add them to the NFO via a script (that is assuming I understood your response to one of my other posts about using the SeriesInfo class to retrieve actors only being possible for episodes (which from TVDB doesn't include regulars) or movies and not for the series or season).

That's an interesting idea to add general NFO file creation to the nfo.groovy script.

Thanks,
Harry
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Database Settings for FileBot vs AMC

Post by rednoah »

Well, the guest actors are in the episode nfo and the series actors are in the series nfo.

Getting cast and crew typically requires extra requests, so that's information we wouldn't include by default. Most users don't care, or rather Plex and friends take care of adding the information the users wants to see.

I've added series nfo cast & crew to new nfo script for now.
:idea: Please read the FAQ and How to Request Help.
HarryMuscle
Posts: 34
Joined: 06 Jan 2022, 22:40

Re: Database Settings for FileBot vs AMC

Post by HarryMuscle »

rednoah wrote: 03 Feb 2022, 09:35 Well, the guest actors are in the episode nfo and the series actors are in the series nfo.

Getting cast and crew typically requires extra requests, so that's information we wouldn't include by default. Most users don't care, or rather Plex and friends take care of adding the information the users wants to see.

I've added series nfo cast & crew to new nfo script for now.
Ok, I think I'm finally wrapping my head around all of this. I was under the mistaken impression that FileBot natively wasn't able to retrieve the crew for the series cause looking at the API docs that's what it looks like (and I thought I would need to get this info myself) but looking at the changes you made to the nfo.groovy script, I see that the SeriesInfo class has a details property which contains a crew property. None of this is in the current API docs so I'm guessing it's new to 4.9.5. It all makes a lot more sense now. Thanks for answering all my questions. Much appreciated.

Thanks,
Harry
Post Reply