Problem with the {tmdb-$id} or the {tvdb-$id}

All about user-defined episode / movie / file name format expressions
Post Reply
Yellowbird
Posts: 19
Joined: 10 Apr 2020, 06:02

Problem with the {tmdb-$id} or the {tvdb-$id}

Post by Yellowbird »

How can I know what the $id will give me back. Will it be the $id from the tvdb or the tmdb ?
Is it possible to control the outcome and so that I can choose exactly what I want ?
Because one person prefers the tvdb and the other the tmdb.
Or can there be more than $id and the omdb.imdbId, also be a tvdbId and a tmdbId ?

I cannot use the {plex.id}, because it uses "TV Shows" in the naming and my structure is "tv"

Code: Select all

{drive}/{"media"}/{"tv"}/{n}{" {tmdb-$id}"}/{'Season '+s.pad(2)}/
I need to use the FileBot - hardlink - copy way and with a lot of structure already done for me by using the Episode Format.
And I have to find a way to get the source and the destination named correctly.
I am using the new Plex-Agent: Plex TV Series and I chose the database "The Movie Database"
Yellowbird
Posts: 19
Joined: 10 Apr 2020, 06:02

Re: Problem with the {tmdb-$id} or the {tvdb-$id}

Post by Yellowbird »

Hi rednoah,

Probably when I chose the Movie/TV Show here, I created the problem.
Does the $id get filled here ?
Image
Being one screen before and where the user chooses the proper Movie/TV Show.

Here FileBot said "Failed to identify some of the following files:".
Would it be possible to have a column with the $id ?
If I was able to see the tvdbid as well as the tmdbid that would be great.
Probably like {tvdb-259866} or {tmdb-1423}, depending on the contents you are showing.
In this list at this moment I only see the tmdb as a result to choose from, because when I hover over it I can see the contents and the Id:1423, but
the one from the tvdb is missing in this list and I am not able to choose this one and it does exist (tvdb-259866)
Why is it not showing this one from tvdb in the results ?

Does FileBot look in the path name and use this info to fill the $id or could FileBot do that in a future version ?

BTW: I love your program :ugeek: and it is certainly the best out there.
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Problem with the {tmdb-$id} or the {tvdb-$id}

Post by rednoah »

Yellowbird wrote: 22 Oct 2022, 17:42 I cannot use the {plex.id}, because it uses "TV Shows" in the naming and my structure is "tv"

Code: Select all

{drive}/{"media"}/{"tv"}/{n}{" {tmdb-$id}"}/{'Season '+s.pad(2)}/
:arrow: You can use the {plex} format and you can use bits and pieces as needed:
rednoah wrote: 12 Sep 2016, 10:03 e.g. Avatar (2009)/Avatar (2009)

Code: Select all

{ ~plex }
e.g. Avatar (2009) {tmdb-19995}/Avatar (2009) {tmdb-19995}

Code: Select all

{ ~plex.id }
e.g.

Code: Select all

{drive}/media/tv/{ ~plex.id }
:idea: Please read the FAQ and How to Request Help.
Yellowbird
Posts: 19
Joined: 10 Apr 2020, 06:02

Re: Problem with the {tmdb-$id} or the {tvdb-$id}

Post by Yellowbird »

Yes, I know that there are a lot of possibilities. But the problem-part is the $id.
And on how it gets filled.
I hope you will answer that one too.
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Problem with the {tmdb-$id} or the {tvdb-$id}

Post by rednoah »

Yellowbird wrote: 22 Oct 2022, 17:42 I am using the new Plex-Agent: Plex TV Series and I chose the database "The Movie Database"
Your files are named and numbered according to TheTVDB. The {tvdb-12345} is shorthand for TheTVDB Series ID 12345 specifically, and not "some ID from some TV series database" generically. If you select TheMovieDB to re-organize your files (as you should, because that's how your Plex is configured) then all information you see (including the ID in the series details mouse-over popup) will be from your preferred database.


:?: In this particular case, I'd find comparing numbers a bit user hostile, no? I'd just select the first option, or whichever one seems about right, as you have done by picking the one that says "Ray Donovan", and then see what happens. You can always retry with a different series, if the one you have selected the first time around doesn't match your files. Do you have another use case / screenshot where picking the correct series is not easy and actually requires you to painstakingly compare ID numbers to make the correct decision?


:arrow: Please try the latest beta and see if it works better for your use case. Support for cross-database {database-id} tags has been added some months ago I believe. The best solution is to not ask for user input at all.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Problem with the {tmdb-$id} or the {tvdb-$id}

Post by rednoah »

Yellowbird wrote: 23 Oct 2022, 06:22 But the problem-part is the $id. And on how it gets filled.
{id} is the series ID for the series for the given Episode match. The series ID is specific to and unique within the context of your selected database. It gets filled like any other piece of information, {n}, {s00e00}, {t}, etc from the information received by your selected database. {id} is different depending on which database you have chosen. If you choose TheMovieDB/TV then {id} will be the TheMovieDB/TV ID.


:idea: {plex.id} will thus give you different tags for different databases and series entries - {tmdb-1423} or {tvdb-259866} or {tvmaze-152} - depending on which database you have selected.
:idea: Please read the FAQ and How to Request Help.
Yellowbird
Posts: 19
Joined: 10 Apr 2020, 06:02

Re: Problem with the {tmdb-$id} or the {tvdb-$id}

Post by Yellowbird »

Aha, I overlooked something terribly important and I (mis)used the Smart-mode with Automatic for this instead of the normal database picking. So, my mistake there and that clearifies it. ;)

But now I chose the TheTVDB and it also needs my help to find the proper one. So it doesn't help if the {tvdb-259866} is in the path.
Image
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Problem with the {tmdb-$id} or the {tvdb-$id}

Post by rednoah »

I see. If you use Smart Mode: Automatic then FileBot will use the default database for each content type, which has changed over time, and can be configured like so:
viewtopic.php?t=12306


:idea: Smart Mode: Automatic is useful if you're processing a mixed set of files that contains movies, episodes, music, etc all at once all in the same selection. If you already know that you're only processing episodes, then you'll want to use Episode Mode. It'll be faster, and you will know exactly what you're doing.



Yellowbird wrote: 23 Oct 2022, 07:44 But now I chose the TheTVDB and it also needs my help to find the proper one. So it doesn't help if the {tvdb-259866} is in the path.
:arrow: Please try the latest beta and see if it works better for your use case. Support for cross-database {database-id} tags has been added some months ago I believe.
:idea: Please read the FAQ and How to Request Help.
mpegman
Posts: 19
Joined: 11 Feb 2023, 13:38

Re: Problem with the {tmdb-$id} or the {tvdb-$id}

Post by mpegman »

I had the same problem. I solved it following way.

Code: Select all

var =  any { if (db.AniDB.id) '[anidb-'+{db.AniDB.id}+']' } {'[tvdbid-'+db.TheTVDB.id+']'} {'[tmdb-'+tmdbid+']'} 
now I still have a question. When I search using tmdb, can I still retrieve in some way the tvdb id for the series?

thanks!
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Problem with the {tmdb-$id} or the {tvdb-$id}

Post by rednoah »

mpegman wrote: 06 Mar 2023, 16:50 When I search using tmdb, can I still retrieve in some way the tvdb id for the series?
Yes, you are already doing it:

Code: Select all

{'[tvdbid-'+db.TheTVDB.id+']'}
The {db} binding allows you to cross-reference between databases. This may or may not be possible depending on the series and database at hand.


:?: Is it not working? If it's not working, please paste file paths, so we can know which specific series it's not working for.
:idea: Please read the FAQ and How to Request Help.
mpegman
Posts: 19
Joined: 11 Feb 2023, 13:38

Re: Problem with the {tmdb-$id} or the {tvdb-$id}

Post by mpegman »

An example of this is :

Code: Select all

Wheeler Dealers (2003) [tmdb-10710]/Season 11/Wheeler Dealers - S11E15 - Archive Show - EN - [Audio - 2.0 AAC [EN]] [Video - MICROHD 1080P H264 8 BIT [NOSUB] ].mkv	{"@type":"Episode","seriesName":"Wheeler Dealers","season":11,"episode":15,"title":"Archive Show","absolute":142,"airdate":{"year":2014,"month":10,"day":13},"id":1013282,"group":"Season 11","seriesInfo":{"database":"TheMovieDB::TV","order":"Airdate","language":"en-US","type":"Reality","id":10710,"name":"Wheeler Dealers","aliasNames":["Bilfikserne","Affari a quattro ruote","Autókereskedők","Die Gebrauchtwagen Profis","Joias Sobre Rodas","Joyas sobre ruedas","Những Nhà Buôn Ô Tô","Obchodníci s autami","Occasions à Saisir","Tamirat Tadilat","Махинаторы"],"certification":"TV-PG","startDate":{"year":2003,"month":10,"day":5},"genres":["Reality"],"spokenLanguages":["en"],"network":"Discovery","rating":7.33,"ratingCount":44,"runtime":45,"status":"Returning Series"}}
Wheeler Dealers (2003) [tmdb-10710]/Season 12/Wheeler Dealers - S12E19 - Noble M12 GTO 2.5 - EN - [Audio - 2.0 AAC [EN]] [Video - MICROHD 1080P X264 8 BIT [NOSUB] ].mp4	{"@type":"Episode","seriesName":"Wheeler Dealers","season":12,"episode":19,"title":"Noble M12 GTO 2.5","absolute":161,"airdate":{"year":2015,"month":10,"day":19},"id":1131224,"group":"Season 12","seriesInfo":{"database":"TheMovieDB::TV","order":"Airdate","language":"en-US","type":"Reality","id":10710,"name":"Wheeler Dealers","aliasNames":["Bilfikserne","Affari a quattro ruote","Autókereskedők","Die Gebrauchtwagen Profis","Joias Sobre Rodas","Joyas sobre ruedas","Những Nhà Buôn Ô Tô","Obchodníci s autami","Occasions à Saisir","Tamirat Tadilat","Махинаторы"],"certification":"TV-PG","startDate":{"year":2003,"month":10,"day":5},"genres":["Reality"],"spokenLanguages":["en"],"network":"Discovery","rating":7.33,"ratingCount":44,"runtime":45,"status":"Returning Series"}}
Wheeler Dealers (2003) [tmdb-10710]/Season 12/Wheeler Dealers - S12E20 - Best of - EN - [Audio - 2.0 AAC [EN]] [Video - MICROHD 1080P X264 8 BIT [NOSUB] ].mp4	{"@type":"Episode","seriesName":"Wheeler Dealers","season":12,"episode":20,"title":"Best of","absolute":162,"airdate":{"year":2015,"month":10,"day":26},"id":1361497,"group":"Season 12","seriesInfo":{"database":"TheMovieDB::TV","order":"Airdate","language":"en-US","type":"Reality","id":10710,"name":"Wheeler Dealers","aliasNames":["Bilfikserne","Affari a quattro ruote","Autókereskedők","Die Gebrauchtwagen Profis","Joias Sobre Rodas","Joyas sobre ruedas","Những Nhà Buôn Ô Tô","Obchodníci s autami","Occasions à Saisir","Tamirat Tadilat","Махинаторы"],"certification":"TV-PG","startDate":{"year":2003,"month":10,"day":5},"genres":["Reality"],"spokenLanguages":["en"],"network":"Discovery","rating":7.33,"ratingCount":44,"runtime":45,"status":"Returning Series"}}
Wheeler Dealers (2003) [tmdb-10710]/Season 13/Wheeler Dealers - S13E17 - 1916 Cadillac V8 - unknown - [Audio - 2.0 AAC ] [Video - MICROHD 1080P H264 8 BIT [NOSUB] ].mkv	{"@type":"Episode","seriesName":"Wheeler Dealers","season":13,"episode":17,"title":"1916 Cadillac V8","absolute":179,"airdate":{"year":2017,"month":1,"day":16},"id":1244372,"group":"Season 13","seriesInfo":{"database":"TheMovieDB::TV","order":"Airdate","language":"en-US","type":"Reality","id":10710,"name":"Wheeler Dealers","aliasNames":["Bilfikserne","Affari a quattro ruote","Autókereskedők","Die Gebrauchtwagen Profis","Joias Sobre Rodas","Joyas sobre ruedas","Những Nhà Buôn Ô Tô","Obchodníci s autami","Occasions à Saisir","Tamirat Tadilat","Махинаторы"],"certification":"TV-PG","startDate":{"year":2003,"month":10,"day":5},"genres":["Reality"],"spokenLanguages":["en"],"network":"Discovery","rating":7.33,"ratingCount":44,"runtime":45,"status":"Returning Series"}}
Wheeler Dealers (2003) [tmdb-10710]/Season 13/Wheeler Dealers - S13E18 - Best Of #2 - EN - [Audio - 2.0 AAC [EN]] [Video - HDTV 1080P X264 8 BIT [NOSUB] ] -[skorpion].mp4	{"@type":"Episode","seriesName":"Wheeler Dealers","season":13,"episode":18,"title":"Best Of #2","absolute":180,"airdate":{"year":2017,"month":1,"day":23},"id":1244373,"group":"Season 13","seriesInfo":{"database":"TheMovieDB::TV","order":"Airdate","language":"en-US","type":"Reality","id":10710,"name":"Wheeler Dealers","aliasNames":["Bilfikserne","Affari a quattro ruote","Autókereskedők","Die Gebrauchtwagen Profis","Joias Sobre Rodas","Joyas sobre ruedas","Những Nhà Buôn Ô Tô","Obchodníci s autami","Occasions à Saisir","Tamirat Tadilat","Махинаторы"],"certification":"TV-PG","startDate":{"year":2003,"month":10,"day":5},"genres":["Reality"],"spokenLanguages":["en"],"network":"Discovery","rating":7.33,"ratingCount":44,"runtime":45,"status":"Returning Series"}}
Wheeler Dealers (2003) [tmdb-10710]/Season 13/Wheeler Dealers - S13E18 - Best Of #2 - EN - [Audio - 2.0 AAC [EN]] [Video - HDTV 1080P X264 8 BIT [NOSUB] ] -[skorpion].nfo	{"@type":"Episode","seriesName":"Wheeler Dealers","season":13,"episode":18,"title":"Best Of #2","absolute":180,"airdate":{"year":2017,"month":1,"day":23},"id":1244373,"group":"Season 13","seriesInfo":{"database":"TheMovieDB::TV","order":"Airdate","language":"en-US","type":"Reality","id":10710,"name":"Wheeler Dealers","aliasNames":["Bilfikserne","Affari a quattro ruote","Autókereskedők","Die Gebrauchtwagen Profis","Joias Sobre Rodas","Joyas sobre ruedas","Những Nhà Buôn Ô Tô","Obchodníci s autami","Occasions à Saisir","Tamirat Tadilat","Махинаторы"],"certification":"TV-PG","startDate":{"year":2003,"month":10,"day":5},"genres":["Reality"],"spokenLanguages":["en"],"network":"Discovery","rating":7.33,"ratingCount":44,"runtime":45,"status":"Returning Series"}}
Wheeler Dealers (2003) [tmdb-10710]/Season 19/Wheeler Dealers - S19E03 - Saab's Your Uncle - unknown - [Audio - 2.0 AAC ] [Video - MICROHD 1080P X264 8 BIT [NOSUB] ].mp4	{"@type":"Episode","seriesName":"Wheeler Dealers","season":19,"episode":3,"title":"Saab's Your Uncle","absolute":228,"airdate":{"year":2020,"month":9,"day":9},"id":2518018,"group":"Season 19","seriesInfo":{"database":"TheMovieDB::TV","order":"Airdate","language":"en-US","type":"Reality","id":10710,"name":"Wheeler Dealers","aliasNames":["Bilfikserne","Affari a quattro ruote","Autókereskedők","Die Gebrauchtwagen Profis","Joias Sobre Rodas","Joyas sobre ruedas","Những Nhà Buôn Ô Tô","Obchodníci s autami","Occasions à Saisir","Tamirat Tadilat","Махинаторы"],"certification":"TV-PG","startDate":{"year":2003,"month":10,"day":5},"genres":["Reality"],"spokenLanguages":["en"],"network":"Discovery","rating":7.33,"ratingCount":44,"runtime":45,"status":"Returning Series"}}

The series exists on both tmdb and tvdb, the episode exists only on tmdb
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Problem with the {tmdb-$id} or the {tvdb-$id}

Post by rednoah »

I see. Unfortunately {db} only works for Anime that have 3-way mapping information, so it won't work for non-AniDB / non-Anime series. {db} also won't work if episodes don't map well, even if you happen to only use the series ID in your custom code later on.



EDIT:

:arrow: You can use this snippet to map from TheMovieDB::TV to TheTVDB:

Code: Select all

{ series.externalIds.tvdb_id }
e.g.

Code: Select all

$ filebot -list --q 10710 --db TheMovieDB::TV --format "{id} | {series.externalIds.tvdb_id} | {episode}"
10710 | 81320 | Wheeler Dealers - 1x01 - Porsche 924 (Part 1)
...
:idea: Please read the FAQ and How to Request Help.
mpegman
Posts: 19
Joined: 11 Feb 2023, 13:38

Re: Problem with the {tmdb-$id} or the {tvdb-$id}

Post by mpegman »

thank you rednoah you are a star!
Post Reply