TVDB policy regarding out of order series

Talk about the Ultimate Question of Life, The Universe, and Everything
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

TVDB policy regarding out of order series

Post by cheaters »

Last year season 47 of NOVA was shown out of series order. Meaning shows that were supposed to air later aired earlier or vice versa. This happens once in awhile and NOVA isn't the only series.

TVDB has a policy that all shows on their site are listed in Aired Order which is fine, but then they modify the Episode numbers of the show to fit the aired order instead of using the original season and episode numbers! This is causing a conflict when looking up the name of shows based on Season and Episode in FileBot. Meaning shows are renamed to match an incorrect episode number that TVDB has created to match the aired order.

This was my convo with a person at TVDB regarding this issue:
Hi,
This season the episodes numbers shouldn't be in order if the dates are in order because they were shown out of sequence.

This is the Airdate order and the correct Episode numbers. This is how they should appear but they don't because the wrong Episode numbers are associated to the Episodes.

NOVA - S47E01 - Polar Extremes - 2/5/2020
NOVA - S47E02 - Dog Tales - 2/12/2020
NOVA - S47E03 - Cat Tales - 2/19/2020
NOVA - S47E04 - Mysteries of Sleep - 2/26/2020
NOVA - S47E05 - Cuba's Cancer Hope - 4/1/2020
NOVA - S47E06 - The Truth About Fat - 4/8/2020
NOVA - S47E10 - Decoding COVID-19 - 5/13/2020
NOVA - S47E07 - Eagle Power - 5/20/2020
NOVA - S47E11 - Human Nature - 9/9/2020
NOVA - S47E12 - Secret Mind of Slime - 9/16/2020
NOVA - S47E13 - A to Z - The First Alphabet - 9/23/2020
NOVA - S47E14 - A to Z - How Writing Changed the World - 9/30/2020
NOVA - S47E09 - Nature's Fear Factor - 10/14/2020
NOVA - S47E15 - Touching The Asteroid - 10/21/2020
NOVA - S47E16 - Can We Cool The Planet - 10/28/2020
NOVA - S47E08 - Saving Notre Dame - 11/25/2020
Hi John,

I understand what you mean now.

Unfortunately we cannot rename the episode numbers in the far left column so we would either have to list the episodes out of aired order, or in aired order with the incorrect episode numbers.

As our policy is to list episodes in the order that they aired on TV, this is the correct order that they should be listed on The TVDB as per our rules.

It's an unfortunate consequence of the network airing the episodes out of order.

Thanks
You can still list them in aired order and correct the errors on the episode numbers. This has repercussions for many devices that look up information based on season and episode number. They keep renaming the episodes incorrectly.
Hi John,

Unfortunately we physically don't have the option to correct the episode numbers. The episode number is linked to the episode itself in the database. So when the episode moves in the order, the episode number automatically moves with it.

If this is causing an issue with a third party application then that would need to be investigated by their support team.

Thanks
This policy conflicts with providing accurate information.
You can't create fake episode numbers for series without causing all kinds of downstream issues. This policy needs to be revisited.
Hi John,

We'll certainly take your feedback on board, however this is a longstanding TVDB policy which we currently have no intention of changing.

Thanks

:?: Since they refuse to stop fabricating Episode information and are complicit in propagating it :evil: - how do we work around this when renaming files that look up series information based on Season and Episode numbers?
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: TVDB policy regarding out of order series

Post by kim »

The best way is make your life easier and just accept the order ;)

BUT if you must, rednoah needs to add support for e.g.

order by productionCode (I do not see it in episode info either ?)

Code: Select all

{"id":7687477,"airedSeason":47,"airedSeasonID":1812366,"airedEpisodeNumber":7,"episodeName":"Decoding COVID-19","firstAired":"2020-05-13","guestStars":[],"directors":[],"writers":[],"overview":"The coronavirus SARS-CoV-2 has upended life as we know it in a matter of mere months. But at the same time, an unprecedented global effort to understand and contain the virus?and find a treatment for the disease it causes?is underway. Join the doctors on the front lines of the fight against COVID-19 as they strategize to stop the spread, and meet the researchers racing to develop treatments and vaccines. Along the way, discover how this devastating disease emerged, what it does to the human body, and why it exploded into a pandemic.","language":{"episodeName":"en","overview":"en"},"productionCode":"4710","showUrl":"","lastUpdated":1607906464,"dvdDiscid":"","dvdSeason":null,"dvdEpisodeNumber":null,"dvdChapter":null,"absoluteNumber":null,"filename":"series/76119/episodes/5e94ed05be2f6.jpg","seriesId":76119,"lastUpdatedBy":170905,"airsAfterSeason":null,"airsBeforeSeason":null,"airsBeforeEpisode":null,"imdbId":"","contentRating":null,"thumbAuthor":129599,"thumbAdded":"2020-04-13 22:51:49","thumbWidth":"640","thumbHeight":"360","siteRating":0,"siteRatingCount":0,"isMovie":0}

Code: Select all

{seriesName=NOVA, airdate=2020-05-13, anime=false, special=null, title=Decoding COVID-19, class=class net.filebot.web.Episode, absolute=null, episode=7, id=7687477, season=47, regular=true, seriesInfo=TheTVDB::76119, seriesNames=[NOVA, Новая звезда]}
API v3 https://api.thetvdb.com/swagger#!/Episo ... pisodes_id
API v4 https://thetvdb.github.io/v4-api/#/Epis ... deExtended

maybe you can use the "mapper" with a local or online database ?

also themoviedb has support for custom lists

btw:
NOVA Episode numbering issues
https://forums.thetvdb.com/viewtopic.php?f=18&t=34543
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: TVDB policy regarding out of order series

Post by cheaters »

To be clear… The files I am getting are already named with the correct season and episode (from NOVA). They are then mapped by TVDB to the incorrect episodes when renaming with FileBot.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: TVDB policy regarding out of order series

Post by kim »

If you don't care about the order you can use

Match by Episode Title
viewtopic.php?t=6136

Trying to rename Forensic Files episodes via the episode title
viewtopic.php?p=55854#p55854
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: TVDB policy regarding out of order series

Post by cheaters »

Thank you I’ll look at that when I get back. I use an AMC Script and rarely have to use the GUI.
What I want is for Plex to show them properly. Proper name and proper season and episode are required. As it stands it’s less than automatic. I have to rename the files before FileBot gets a hold of them, then process them afterwards.

Sort of ruins the automation since one never knows when episodes numbers are going to be tampered with over at TVDB.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: TVDB policy regarding out of order series

Post by kim »

You can use the CLI like this:

Code: Select all

filebot -rename *.mp4 --db TheTVDB -non-strict --format "{plex.name}" --mapper "episode.number(null)" --filter "s == 47" --action TEST --log INFO
MetricCascade(SeasonEpisode, AirDate, Title) 0.0000 => [D:\test\NOVA - S47E10 - Decoding COVID-19.mp4, NOVA - Polar Extremes <=> NOVA - 47x01 - Polar Extremes]
MetricCascade(SeasonEpisode, AirDate, Title) 0.0000 => [D:\test\NOVA - S47E10 - Decoding COVID-19.mp4, NOVA - Dog Tales <=> NOVA - 47x02 - Dog Tales]
MetricCascade(SeasonEpisode, AirDate, Title) 0.0000 => [D:\test\NOVA - S47E10 - Decoding COVID-19.mp4, NOVA - Cat Tales <=> NOVA - 47x03 - Cat Tales]
MetricCascade(SeasonEpisode, AirDate, Title) 0.0000 => [D:\test\NOVA - S47E10 - Decoding COVID-19.mp4, NOVA - Mysteries of Sleep <=> NOVA - 47x04 - Mysteries of Sleep]
MetricCascade(SeasonEpisode, AirDate, Title) 0.0000 => [D:\test\NOVA - S47E10 - Decoding COVID-19.mp4, NOVA - Cuba's Cancer Hope <=> NOVA - 47x05 - Cuba's Cancer Hope]
MetricCascade(SeasonEpisode, AirDate, Title) 0.0000 => [D:\test\NOVA - S47E10 - Decoding COVID-19.mp4, NOVA - The Truth About Fat <=> NOVA - 47x06 - The Truth About Fat]
MetricCascade(SeasonEpisode, AirDate, Title) 1.0000 => [D:\test\NOVA - S47E10 - Decoding COVID-19.mp4, NOVA - Decoding COVID-19 <=> NOVA - 47x07 - Decoding COVID-19]
MetricCascade(SeasonEpisode, AirDate, Title) 0.0000 => [D:\test\NOVA - S47E10 - Decoding COVID-19.mp4, NOVA - Eagle Power <=> NOVA - 47x08 - Eagle Power]
MetricCascade(SeasonEpisode, AirDate, Title) 0.0000 => [D:\test\NOVA - S47E10 - Decoding COVID-19.mp4, NOVA - Human Nature <=> NOVA - 47x09 - Human Nature]
MetricCascade(SeasonEpisode, AirDate, Title) 0.0000 => [D:\test\NOVA - S47E10 - Decoding COVID-19.mp4, NOVA - Secret Mind of Slime <=> NOVA - 47x10 - Secret Mind of Slime]
MetricCascade(SeasonEpisode, AirDate, Title) 0.0000 => [D:\test\NOVA - S47E10 - Decoding COVID-19.mp4, NOVA - A to Z: The First Alphabet <=> NOVA - 47x11 - A to Z: The First Alphabet]
MetricCascade(SeasonEpisode, AirDate, Title) 0.0000 => [D:\test\NOVA - S47E10 - Decoding COVID-19.mp4, NOVA - A to Z: How Writing Changed the World <=> NOVA - 47x12 - A to Z: How Writing Changed the World]
MetricCascade(SeasonEpisode, AirDate, Title) 0.0000 => [D:\test\NOVA - S47E10 - Decoding COVID-19.mp4, NOVA - Nature's Fear Factor <=> NOVA - 47x13 - Nature's Fear Factor]
MetricCascade(SeasonEpisode, AirDate, Title) 0.0000 => [D:\test\NOVA - S47E10 - Decoding COVID-19.mp4, NOVA - Touching the Asteroid <=> NOVA - 47x14 - Touching the Asteroid]
MetricCascade(SeasonEpisode, AirDate, Title) 0.0000 => [D:\test\NOVA - S47E10 - Decoding COVID-19.mp4, NOVA - Can We Cool the Planet? <=> NOVA - 47x15 - Can We Cool the Planet?]
MetricCascade(SeasonEpisode, AirDate, Title) 0.0000 => [D:\test\NOVA - S47E10 - Decoding COVID-19.mp4, NOVA - Saving Notre Dame <=> NOVA - 47x16 - Saving Notre Dame]
[TEST] from [D:\test\NOVA - S47E10 - Decoding COVID-19.mp4] to [D:\test\NOVA - S47E07 - Decoding COVID-19.mp4]
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: TVDB policy regarding out of order series

Post by rednoah »

jprokos wrote: 02 Nov 2021, 00:00 What I want is for Plex to show them properly.
That makes things easy. You must follow the TheTVDB (or whichever database agent you have select in Plex) default SxE numbers. Plex will use the SxE number to identify the episode file. We first need to focus on Plex matching episodes to the correct online episode information, and only then can we worry about how to configure Plex to display those episodes in one order or another. Perhaps Plex can display episodes in Production Order. That's a Plex question that I don't have an answer for though.


:arrow: This means that your files have "incorrect" (for the sake of our purpose of renaming files for Plex) SxE numbers but correct episode titles. So we'll want FileBot to ignore the SxE numbers in the file name and match files / online episodes solely based on the episode title information, and then rename files with that, thus changing the SxE numbers in the file name. The Match by Episode Title technique will allow you to do that in either GUI or CLI.

Image
:idea: Please read the FAQ and How to Request Help.
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: TVDB policy regarding out of order series

Post by cheaters »

I haven't worked much with my presets and with my advancing years that means much has been forgotten :?

I have a shell script that works 99% of the time unless there is a misnamed file. Occasionally it's due to an incorrect year in a movie file name (off by 1 because of a release date discrepancy), but the TVDB fabricated series number issue is the biggest culprit for FileBot mixups.

Below is my GUI preset expression for series when my AMC shell script fails. I usually remove the file from the Plex HD by going into FileBot History and "Reverting" it, and then reprocess it using the FileBot GUI and this preset. However, with my current preset and "misnamed" files I always have to manually match. So editing it as you suggest should help.

:?: Where do I add {order.airdate.sxe}?

Code: Select all

/Volumes/SeedDrive/PlexServer_2/{plex.derive{' {thetvdb-'}{id}{'}'}{' - ['+allOf{tags}{vf}{vs}{crc32}.join(' ')}{']'}}{if (dc > 1) '.'+di}
:idea: If you would please add the code in the correct location. Copy and paste will save me a week of frustration.
Last edited by cheaters on 03 Nov 2021, 21:16, edited 2 times in total.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: TVDB policy regarding out of order series

Post by kim »

First time I tried this :)
It took a bit of time to get working because no "Absolute Airdate Order" but you need to use "Date and Title"

maybe update page ;)
viewtopic.php?t=6136

Code: Select all

/Volumes/SeedDrive/PlexServer_2/{order.airdate.plex.derive{' {thetvdb-'}{id}{'}'}{' - ['+allOf{tags}{vf}{vs}{crc32}.join(' ')}{']'}}{if (dc > 1) '.'+di}
output:

Code: Select all

/Volumes/SeedDrive/PlexServer_2/TV Shows/NOVA/Season 47/NOVA - S47E07 - Decoding COVID-19 {thetvdb-76119} - [00000000]
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: TVDB policy regarding out of order series

Post by cheaters »

kim wrote: 03 Nov 2021, 20:25 First time I tried this :)
It took a bit of time to get working because no "Absolute Airdate Order" but you need to use "Date and Title"

maybe update page ;)
viewtopic.php?t=6136
THANKS! Much appreciation. I will give that a shot.

How are you are testing this without actual files.... I presume you're creating dummy files and running the script on those?

I can't update that page... not my post. Maybe Red will get around to it. I'd be happy to supply updated screenshots.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: TVDB policy regarding out of order series

Post by kim »

yes, dummy files
hint [00000000] ;)

It's a job for rednoah
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: TVDB policy regarding out of order series

Post by rednoah »

I see. The screenshots there were a bit outdated. No worries. Fixed. The text has been updated already. "Absolute Airdate Order" are the same thing "Date and Title". Just got renamed at some point to include the keyword "Title".
:idea: Please read the FAQ and How to Request Help.
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: TVDB policy regarding out of order series

Post by cheaters »

Kim,

This is my modified AMC script. I believe I added the mapper option correctly - please check. I also prepended order.airdate. to my series format definition. Is there something I am missing...

Code: Select all

{
  /usr/local/bin/filebot -script fn:amc --output "/Volumes/PlexMedia/PlexServer_1" \
--action copy \
--conflict index -non-strict \              ##is non-strict REQUIRED when not using season & episode
--mapper "episode.number(null)" \           ##added this line...
--log-file amc.log \
--def minFileSize=10000000 \
--def minLengthMS=300000 \
--def "ut_kind"="multi" \
--def "ut_title"="${1}" \
--def "ut_label"="${2}" \
--def "ut_dir"="${3}" \
--def "ut_rpath"="${4}" \
--def "ut_spath"="${5}" \
--def "ut_files"="${6}" \
--def "ut_bytes"="${7}" \
--def "ut_track"="${8}" \
--def "ut_info"="${9}" \
--def "ut_tags"="${10}" \
--def excludeList="/Users/john/.filebot/amc_excludes.txt" \
--def pushover=removed \
--def unsorted=y \
--def music=y \
--def skipExtract=y \
--def movieDB=TheMovieDB seriesDB=TheTVDB animeDB=AniDB musicDB=ID3 \
--def seriesFormat="/Volumes/SeedDrive/PlexServer_2/{order.airdate.plex.derive{' {thetvdb-'}{id}{'}'}{' - ['+allOf{tags}{vf}{vs}{crc32}.join(' ')}{']'}}{if (dc > 1) '.'+di}" \
--def movieFormat="/Volumes/PlexMedia/PlexServer_1/{plex.derive{' {imdb-'}{imdbid}{'}'}{' ['+allOf{tags}{audio.language}{if ('Documentary' in genres)'[doc]'}{info:video[0].displayAspectRatioString.colon('"∶"').replace('?', '')}{ws}{vf}{vs}{vc}{crc32}.join(' ')}{']'}}{if (dc > 1) '.'+di}" \
"ut_title"="${1}" "ut_label"="${2}" "ut_dir"="${3}" \
-exec /Users/john/.filebot/scripts/fb_remove_non-eng_subs.sh {folder}
} >> /Users/john/.filebot/scripts/qBT_e-program_out.txt 2>&1
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: TVDB policy regarding out of order series

Post by kim »

What does the output look like ?

I don't think "--mapper" works with amc script, only rename ?

Code: Select all

filebot -rename *.mkv --db TheTVDB -non-strict --mapper "episode.number(null)"
viewtopic.php?t=10996

If so I don't see why it can't be made to, because it looks like it's using rename ?
https://github.com/filebot/scripts/blob ... roovy#L383

I say always use non-strict unless you get a lot of mismatches
filebot -help

Code: Select all

-non-strict	: Enable advanced matching and more aggressive guess work
why ?
--output "/Volumes/PlexMedia/PlexServer_1"
from format
/Volumes/PlexMedia/PlexServer_1/
/Volumes/SeedDrive/PlexServer_2/

do this
--output "/Volumes/"
format
PlexMedia/PlexServer_1/
SeedDrive/PlexServer_2/
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: TVDB policy regarding out of order series

Post by rednoah »

The --mapper option is inherited by internal rename() calls, so it will work with the amc script. The console output will confirm this.
:idea: Please read the FAQ and How to Request Help.
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: TVDB policy regarding out of order series

Post by cheaters »

kim wrote: 04 Nov 2021, 23:02
why ?
--output "/Volumes/PlexMedia/PlexServer_1"
from format
/Volumes/PlexMedia/PlexServer_1/
/Volumes/SeedDrive/PlexServer_2/

do this
--output "/Volumes/"
format
PlexMedia/PlexServer_1/
SeedDrive/PlexServer_2/
Thank you for suggesting that.

:?: ... Since I am using --conflict index wouldn't items that are not specifically defined end up in /Volumes/Unsorted ?

:?: I was wanting them to end up in /Volumes/PlexMedia/PlexServer_1/Unsorted. I am not sure if I can specify a path just for items that --conflict index picks up.

The same for Music.

These are the folders at that path

Code: Select all

/Volumes/PlexMedia/PlexServer_1/Music
/Volumes/PlexMedia/PlexServer_1/Movies
/Volumes/PlexMedia/PlexServer_1/Unsorted
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: TVDB policy regarding out of order series

Post by kim »

Alternatively, you can also use --conflict index which adds .1 .2 .3 to file paths as we're moving files, to resolve "duplicate destination path" conflicts even if the format doesn't account for (or can't easily account for) overlapping paths.
viewtopic.php?p=52213#p52213
...so I don't think it will go to Unsorted folder ?

you can just add something like:

Code: Select all

--def unsortedFormat="PlexMedia/PlexServer_1/Unsorted/{f.structurePathTail}" \

Code: Select all

--def musicFormat="PlexMedia/PlexServer_1/{plex}" \
https://github.com/filebot/scripts/blob ... groovy#L59
If you're using the amc script, then the Unsorted folder would refer to the folder where files that cannot be identified are moved to.
viewtopic.php?p=52414#p52414

@rednoah
We need better documentation for e.g. Unsorted and conflict
viewtopic.php?f=4&t=215
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: TVDB policy regarding out of order series

Post by cheaters »

Is there a good reason why I shouldn't use it the way it is now?

Keeping the default save path as:

Code: Select all

/Volumes/PlexMedia/PlexServer_1
And defining paths for files I don't want to end up in the default path.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: TVDB policy regarding out of order series

Post by kim »

if it ain't broke don't fix it
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: TVDB policy regarding out of order series

Post by cheaters »

@kim
Thanks for sticking with me on this.
I am having more mismatches using this method on other shows when it’s just the name of the show and season. How would I only apply his method to certain troublesome shows like NOVA and not to other shows?
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: TVDB policy regarding out of order series

Post by kim »

There is no all in one solution

I don't think you can use --mapper "episode.number(null)" and not be active on some files ?

but maybe you can do it via the format ?
like so

Code: Select all

{ def norm = { it.derive{' {thetvdb-'}{id}{'}'}{' - ['+allOf{tags}{vf}{vs}{crc32}.join(' ')}{']'}{if (dc > 1) '.'+di} }; n != 'NOVA' ? norm(plex) : norm(order.airdate.plex) }
but better to use a file like:
viewtopic.php?f=4&t=12837
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: TVDB policy regarding out of order series

Post by cheaters »

kim wrote: 09 Nov 2021, 15:21 There is no all in one solution
I think I should provide an example of what I am running into.
filename is: Saturday.Night.Live.S47E06.Jonathan.Majors.720p.WEB.h264-KOGi[rartv]

Code: Select all

[2021-11-14 05:01:50.112] Run script [fn:amc] at [Sun Nov 14 05:01:50 CST 2021]
[2021-11-14 05:01:50.138] Parameter: minFileSize = 10000000
[2021-11-14 05:01:50.138] Parameter: minLengthMS = 300000
[2021-11-14 05:01:50.139] Parameter: ut_kind = multi
[2021-11-14 05:01:50.139] Parameter: ut_title = Saturday.Night.Live.S47E06.Jonathan.Majors.720p.WEB.h264-KOGi[rartv]
[2021-11-14 05:01:50.139] Parameter: ut_label = TV Shows
[2021-11-14 05:01:50.139] Parameter: ut_dir = /Volumes/SeedDrive/complete/Saturday.Night.Live.S47E06.Jonathan.Majors.720p.WEB.h264-KOGi[rarbg]
[2021-11-14 05:01:50.139] Parameter: ut_rpath = /Volumes/SeedDrive/complete/Saturday.Night.Live.S47E06.Jonathan.Majors.720p.WEB.h264-KOGi[rarbg]
[2021-11-14 05:01:50.139] Parameter: ut_spath = /Volumes/SeedDrive/complete
[2021-11-14 05:01:50.140] Parameter: ut_files = 4
[2021-11-14 05:01:50.140] Parameter: ut_bytes = 2521442485
[2021-11-14 05:01:50.140] Parameter: ut_track = udp://9.rarbg.me:2750
[2021-11-14 05:01:50.140] Parameter: ut_info = 1dc05d46dfeff3154f1d54d749d8e4f57d4b8407
[2021-11-14 05:01:50.140] Parameter: ut_tags = 
[2021-11-14 05:01:50.140] Parameter: excludeList = /Users/john/.filebot/amc_excludes.txt
[2021-11-14 05:01:50.141] Parameter: pushover = *****
[2021-11-14 05:01:50.141] Parameter: unsorted = y
[2021-11-14 05:01:50.141] Parameter: music = y
[2021-11-14 05:01:50.142] Parameter: skipExtract = y
[2021-11-14 05:01:50.142] Parameter: movieDB = TheMovieDB
[2021-11-14 05:01:50.142] Parameter: seriesDB = TheTVDB
[2021-11-14 05:01:50.142] Parameter: animeDB = AniDB
[2021-11-14 05:01:50.142] Parameter: musicDB = ID3
[2021-11-14 05:01:50.142] Parameter: seriesFormat = /Volumes/SeedDrive/PlexServer_2/{order.airdate.plex.derive{' {thetvdb-'}{id}{'}'}{' - ['+allOf{tags}{vf}{vs}{crc32}.join(' ')}{']'}}{if (dc > 1) '.'+di}
[2021-11-14 05:01:50.143] Parameter: movieFormat = /Volumes/PlexMedia/PlexServer_1/{plex.derive{' {imdb-'}{imdbid}{'}'}{' ['+allOf{tags}{audio.language}{if ('Documentary' in genres)'[doc]'}{info:video[0].displayAspectRatioString.colon('∶').replace('?', '')}{ws}{vf}{vs}{vc}{crc32}.join(' ')}{']'}}{if (dc > 1) '.'+di}
[2021-11-14 05:02:04.625] Use excludes: /Users/john/.filebot/amc_excludes.txt (4257)
[2021-11-14 05:02:04.866] Input: /Volumes/SeedDrive/complete/Saturday.Night.Live.S47E06.Jonathan.Majors.720p.WEB.h264-KOGi[rarbg]/Saturday.Night.Live.S47E06.Jonathan.Majors.720p.WEB.h264-KOGi.mkv
[2021-11-14 05:02:04.874] Process as TV Series [TV Shows]
[2021-11-14 05:02:04.876] Group: {Series=true} => [Saturday.Night.Live.S47E06.Jonathan.Majors.720p.WEB.h264-KOGi.mkv]
[2021-11-14 05:02:04.917] Rename episodes using [TheTVDB] with [Airdate]
[2021-11-14 05:02:05.913] Lookup via [Saturday Night Live]
[2021-11-14 05:02:09.041] Fetching episode data for [Saturday Night Live]
[2021-11-14 05:02:13.799] Fetching episode data for [Saturday Night Live (FR)]
[2021-11-14 05:02:14.384] Fetching episode data for [Saturday Night Live (JP)]
[2021-11-14 05:02:15.021] Fetching episode data for [Saturday Night Live (FI)]
[2021-11-14 05:02:15.142] Fetching episode data for [SNL Poland]
[2021-11-14 05:02:15.425] Apply mapper [episode.number(null)] on [1149] episodes
The mapper returns many lines. I will cut to the chase... one of the results in the list of found titles is:

Code: Select all

...
[2021-11-14 05:02:15.586] Map [Saturday Night Live - 47x06 - Jonathan Majors / Taylor Swift] to [Saturday Night Live - Jonathan Majors / Taylor Swift]
...
Yet FileBot matched to: SNL Poland - S01E06 - Joanna Krupa Bisz i Radex {thetvdb-338177} - [720p WEB-DL 1EFF1B28].mkv]

I am guessing because of the same episode? But surprising that it's looking at episode when using the mapping feature and also that it's ignoring the season info and the additional text "Jonathon Majors"

Code: Select all

...
[2021-11-14 05:02:26.684] Reverse Map [SNL Poland - Joanna Krupa/Bisz i Radex] to [SNL Poland - 1x06 - Joanna Krupa/Bisz i Radex]
[2021-11-14 05:02:27.489] [COPY] from [/Volumes/SeedDrive/complete/Saturday.Night.Live.S47E06.Jonathan.Majors.720p.WEB.h264-KOGi[rarbg]/Saturday.Night.Live.S47E06.Jonathan.Majors.720p.WEB.h264-KOGi.mkv] to [/Volumes/SeedDrive/PlexServer_2/TV Shows/SNL Poland/Season 01/SNL Poland - S01E06 - Joanna Krupa Bisz i Radex {thetvdb-338177} - [720p WEB-DL 1EFF1B28].mkv]
[2021-11-14 05:02:55.942] Processed 1 file
[2021-11-14 05:02:55.948] Sending Pushover notification
[2021-11-14 05:02:58.277] Done ヾ(@⌒ー⌒@)ノ
This is the second time a properly named Saturday Night Live episode has matched to SNL Poland since using the mapper function.

Trying via the GUI I get a Red background warning for the match but it does find the correct match.
I use this preset:

Code: Select all

/Volumes/SeedDrive/PlexServer_2/{order.airdate.plex.derive{' {thetvdb-'}{id}{'}'}{' - ['+allOf{tags}{vf}{vs}{crc32}.join(' ')}{']'}}{if (dc > 1) '.'+di}
-TheTVDB
-Date and Title
-Opportunistic

Image
Image
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: TVDB policy regarding out of order series

Post by rednoah »

You have "Jonathan Majors" but FileBot is looking for "Jonathan Majors / Taylor Swift" and so things go awry. The same command might very well work for some files and not others, since the probabilities work out differently in every unique use case.

The GUI works because it will only consider episodes from the one series you have selected. The CLI will automatically select the first few series options and thus will consider episodes from multiple series options.

:arrow: In this case, you'll want to use the --filter option to exclude "SNL Poland", or include "Saturday Night Live" exclusively. Please read FAQ #2 for details.

e.g. exclude "SNL Poland"

Code: Select all

--filter "none{ n =~ /SNL Poland/ }"
e.g. include "Saturday Night Live"

Code: Select all

--filter "n =~ /Saturday Night Live/"


EDIT:

A more advanced solution for this specific use case would be to take / into account and do 1:N mapping for each possible title:

Code: Select all

--mapper "episode.title.split('/').collect{ episode.number(null).title(it) }"
e.g.

Code: Select all

$ filebot -rename *.mkv --db TheTVDB -non-strict --format "{plex.name}" --mapper "episode.title.split('/').collect{ episode.number(null).title(it) }" --action TEST
...
Map [Saturday Night Live - 47x06 - Jonathan Majors / Taylor Swift] to [Saturday Night Live - Jonathan Majors ]
Map [Saturday Night Live - 47x06 - Jonathan Majors / Taylor Swift] to [Saturday Night Live -  Taylor Swift]
...
Reverse Map [Saturday Night Live - Jonathan Majors ] to [Saturday Night Live - 47x06 - Jonathan Majors / Taylor Swift]
...
[TEST] from [Saturday.Night.Live.S47E06.Jonathan.Majors.720p.WEB.h264-KOGi.mkv] to [Saturday Night Live - S47E06 - Jonathan Majors Taylor Swift.mkv]
...

:!: All of the above will work even and especially if the SxE numbers don't make sense. If the SxE numbers make sense, and you can somehow know that in advance, then you just need to call filebot with different options tailored to the use case at hand. You'll likely want your own entry point script, i.e. *.cmd on Windows or *.sh on Unix-based platforms, that checks a few of the parameters, and then calls filebot in different ways depending on the situation.
:idea: Please read the FAQ and How to Request Help.
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: TVDB policy regarding out of order series

Post by cheaters »

Thanks for the help...
I need a little more context for my use case.

i am going to use an external file but that begs the question where do I add --file-filter so it only applies to movies or series and not music or books.

If I only want filters to apply to --def seriesFormat and --def movieFormat only do I have to format like this:

Code: Select all

{
  /usr/local/bin/filebot -script fn:amc --output "/Volumes/PlexMedia/PlexServer_1" \
--action copy \
--conflict index -non-strict \
--log-file amc.log \
--def minFileSize=10000000 \
--def minLengthMS=300000 \
--def "ut_kind"="multi" \
--def "ut_title"="${1}" \
--def "ut_label"="${2}" \
--def "ut_dir"="${3}" \
--def "ut_rpath"="${4}" \
--def "ut_spath"="${5}" \
--def "ut_files"="${6}" \
--def "ut_bytes"="${7}" \
--def "ut_track"="${8}" \
--def "ut_info"="${9}" \
--def "ut_tags"="${10}" \
--def excludeList="/Users/john/.filebot/amc_excludes.txt" \
--def pushover=removed \
--def unsorted=y \
--def music=y \
--def skipExtract=y \
--def movieDB=TheMovieDB seriesDB=TheTVDB animeDB=AniDB musicDB=ID3 \
--def seriesFormat= --file-filter "f.video || f.subtitle" "/Volumes/SeedDrive/PlexServer_2/{plex.derive{' {thetvdb-'}{id}{'}'}{' - ['+allOf{tags}{vf}{vs}{crc32}.join(' ')}{']'}}{if (dc > 1) '.'+di}" \
--def movieFormat= --file-filter "f.video || f.subtitle" "/Volumes/PlexMedia/PlexServer_1/{plex.derive{' {imdb-'}{imdbid}{'}'}{' ['+allOf{tags}{audio.language}{if ('Documentary' in genres)'[doc]'}{info:video[0].displayAspectRatioString.colon('"∶"').replace('?', '')}{ws}{vf}{vs}{vc}{crc32}.join(' ')}{']'}}{if (dc > 1) '.'+di}" \
"ut_title"="${1}" "ut_label"="${2}" "ut_dir"="${3}" \
-exec /Users/john/.filebot/scripts/fb_remove_non-eng_subs.sh {folder}
} >> /Users/john/.filebot/scripts/qBT_e-program_out.txt 2>&1
Asking because I put the file-filter inline with my other options and processing failed.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: TVDB policy regarding out of order series

Post by kim »

Code: Select all

filebot -find /volume1/video/ --file-filter "f.video || f.subtitles" > excludes.txt
viewtopic.php?f=4&t=12867&p=55865&hilit ... ter#p55865
= you can't use in only e.g. movieFormat

BUT
don't use --mapper "episode.number(null)" on ALL files... only the ones with a problem then e.g. SNL has no problem
Post Reply