Rename TV show files without episode name/Better duplicate matching

Support for Windows users
Post Reply
crawfs
Posts: 24
Joined: 01 Feb 2019, 09:26

Rename TV show files without episode name/Better duplicate matching

Post by crawfs »

I have a slightly confusing setup with how I use filebot to sort media into plex but basically I have a download folder that filebot runs through and copies and renames media into my plex library folder. Due to how my auto download setup works I occasionally end up with duplicates of TV shows, specifically anime. I use the following line:

Code: Select all

filebot -script fn:amc --output "\\192.168.0.214\Media\Plex" --action copy -non-strict "E:\Downloads" --lang English --log-file E:\Filebotlogs\amc.log --def excludeList=amc.txt --def skipExtract=y --def animeFormat="\\192.168.0.214\Media\Plex\TV Shows\{localize.English.n}\Season {s.pad(2)}\{localize.English.n} - {s00e00} - {t}{'.'+lang}"
which ensures that when anime is detected by amc it will put it into the TV Shows library instead of a separate Anime library.

Anyway what happens is that if a duplicate is detected as a TV show, TVDB will be used and the episode title metadata on AniDB and TVDB will be different so I end up with duplicate media because filebot doesn't detect that the episode already exists as the filenames are different. What do I need to do to change the format of TV show name schemes to exclude the episode title.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rename TV show files without episode name/Better duplicate matching

Post by rednoah »

There's a reason the amc script doesn't do what you're doing by default. :lol:

What you're doing might kinda mostly work, if you're lucky. That's in the special case where AniDB exactly matches TheTVDB.

Note:
* AniDB / TheTVDB episode titles often don't match exactly.
* AniDB / TheTVDB series names sometimes don't match exactly.
* AniDB / TheTVDB series / season organization might be completely different and unintelligible between these two databases. (e.g. Seikai no Senki series)

A good general solution might look like this, but might not be fully automated:
viewtopic.php?f=3&t=2769


TL;DR You must use TheTVDB as database when organizing files for Plex. If you use AniDB, then you must use separate Anime library with Anidb Metadata Agent.
:idea: Please read the FAQ and How to Request Help.
crawfs
Posts: 24
Joined: 01 Feb 2019, 09:26

Re: Rename TV show files without episode name/Better duplicate matching

Post by crawfs »

It works well enough that it kind of doesn't matter because there are edge cases where Filebot will be useless regardless.

For example if you have:

Bakemonogatari - 1
Nisemonogatari - 1
Monogatari The Second Season - 1

Filebot will be of absolutely no use because TVDB doesn't have an entry for any of those show names specifically. As such I would still appreciate an answer to the question of how to get filebot to rename episodes without their episode title in the filename, Plex doesn't give a shit about the episode name in the file and filebot sometimes duplicates episodes when I manually rename stuff with a powershell script as it doesn't see the file name is the same.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rename TV show files without episode name/Better duplicate matching

Post by rednoah »

1.
You can also use --def ut_label=TV to just force TheTVDB for all files. It'll work mostly, because TheTVDB has SxE and absolute numbers for most popular shows.


2.
Well, since you've written your own format, you could just remove the {t} ... title part and change this:

Code: Select all

{localize.English.n} - {s00e00} - {t}{'.'+lang}
to that:

Code: Select all

{localize.English.n} - {s00e00}{'.'+lang}
:idea: You'll have to change --def seriesFormat as wall to match your --def animeFormat and have both generate the same destination path.
:idea: Please read the FAQ and How to Request Help.
crawfs
Posts: 24
Joined: 01 Feb 2019, 09:26

Re: Rename TV show files without episode name/Better duplicate matching

Post by crawfs »

rednoah wrote: 03 Feb 2019, 04:16 1.
You can also use --def ut_label=TV to just force TheTVDB for all files. It'll work mostly, because TheTVDB has SxE and absolute numbers for most popular shows.
Wouldn't that also force it for movie files?
2.
Well, since you've written your own format, you could just remove the {t} ... title part and change this:

Code: Select all

{localize.English.n} - {s00e00} - {t}{'.'+lang}
to that:

Code: Select all

{localize.English.n} - {s00e00}{'.'+lang}
:idea: You'll have to change --def seriesFormat as wall to match your --def animeFormat and have both generate the same destination path.
Cool, I think that's what I'm looking, just wasn't sure what the paramter for "--def seriesFormat" was for so would:

Code: Select all

filebot -script fn:amc --output "\\192.168.0.214\Media\Plex" --action copy -non-strict "E:\Downloads" --lang English --log-file E:\Filebotlogs\amc.log --def excludeList=amc.txt --def skipExtract=y  --def seriesFormat="\\192.168.0.214\Media\Plex\TV Shows\{localize.English.n}\Season {s.pad(2)}\{localize.English.n} - {s00e00}"  --def animeFormat="\\192.168.0.214\Media\Plex\TV Shows\{localize.English.n}\Season {s.pad(2)}\{localize.English.n} - {s00e00}"
That be what I would need to ensure sorted anime/TV have the same format without episode titles or should I just use {n} for seriesFormat?

Thanks for your help
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rename TV show files without episode name/Better duplicate matching

Post by rednoah »

1.
Yes, --def ut_label=TV is only viable if you're only processing TV Shows, and not Movies.


2.
Yep, this might work. If AniDB / TheTVDB series information matches exactly, then you should get the same destination paths.
:idea: Please read the FAQ and How to Request Help.
crawfs
Posts: 24
Joined: 01 Feb 2019, 09:26

Re: Rename TV show files without episode name/Better duplicate matching

Post by crawfs »

Thanks, I should be good from here to sort through any other issues I have.
Post Reply