How do you force Series + season ?

Any questions? Need some help?
Post Reply
Matt
Posts: 9
Joined: 22 Aug 2018, 19:19

How do you force Series + season ?

Post by Matt »

How do you force Series + season ?
Examples:
Overlord III -> Overlord S3
Owarimonogatari -> Monogatari Series S11

Matt
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: How do you force Series + season ?

Post by kim »

Using "F2 mode" viewtopic.php?t=2072

maybe you can use this:

Code: Select all

{any{csv('D:/TVShowRename.csv').find{k,v -> fn.lower().contains(k.lower())}.value+'/'+fn} {fn} }
TVShowRename.csv contains:

Code: Select all

Owarimonogatari;Monogatari Series/Season 11/
Overlord III;Overlord/Season 3/
Overlord II;Overlord/Season 2/
filename Owarimonogatari 01 and Overlord III 01 output e.g.
Monogatari Series/Season 11/Owarimonogatari 01
Overlord/Season 3/Overlord III 01
then normal rename mode/format e.g.:

Code: Select all

{n}/{'Season '+s}/{n} - {s00e00} - {t}
=
Monogatari Series/Season 11/Monogatari Series - S11E01 - Ougi Formula - Parts 1
Overlord/Season 3/Overlord - S03E01 - A Ruler’s Melancholy
Matt
Posts: 9
Joined: 22 Aug 2018, 19:19

Re: How do you force Series + season ?

Post by Matt »

Thanks kim, it seems to work but requires two steps.
Is there a was to do it in one step by combining the two?
Any chance to also make it work with AMC script?
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: How do you force Series + season ?

Post by kim »

Maybe in CLI, but I don't know how to rename offline in CLI using a format :(

We need rednoah for this one ;)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How do you force Series + season ?

Post by rednoah »

1.
So my first question is whether or not files are identified correctly in the first place? Do you want to force series / season to force the correct match, or do you just want to have different file / folder names in the destination path?


2.
If it's the latter, then kim already gave you a solution, just create a Map (either in the format, or as external text file) and then use that for your custom replacements:
viewtopic.php?f=5&t=182

e.g. use n as key (e.g. Overlord III) to look up another value (i.e. your custom mapping):

Code: Select all

{csv('/path/to/names.csv').get(n) ?: n}
:idea: This is just generic format code. It doesn't have anything to do with "generic file mode" (F2) specifically, but can of course be used in a generic file format, or episode format, or movie format, etc.
:idea: Please read the FAQ and How to Request Help.
Matt
Posts: 9
Joined: 22 Aug 2018, 19:19

Re: How do you force Series + season ?

Post by Matt »

The issue is an error of the identification.

Example 1:
With the filename "[HorribleSubs] Overlord III - 07 [1080p].mkv" is identified as serie "Overlord" but season 1 with TVDB.
So serie name is correct, but not the season.

Example 2:
For "[HorribleSubs] Owarimonogatari - 01 [1080p].mkv", detection is "Monogatari", season 1.
In this case I want to force "Monogatari Series" and season 11 because Monogatari doesn't include season 11 in TVDB.

I have other similar issues, of course I can override manually when using the gui, but I would like to use auto rename by scripts like AMC.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How do you force Series + season ?

Post by rednoah »

I see. You're trying to convert AniDB information to TheTVDB information, which is not trivial in some cases, since the numbers and names can be completely different.

Here's a tutorial on how I'd go at it:
viewtopic.php?f=3&t=2769

There's many ways to tackle these shows, depending on the situation, but the --q and --filter and -list -rename options should generally get you there, but none of it can be done automatically in the amc script (if it was easy and reliable, it would be supported out of the box).

If you want manual selection from the command-line, then the console-interactive mode might be an option:
viewtopic.php?f=3&t=4398
:idea: Please read the FAQ and How to Request Help.
Matt
Posts: 9
Joined: 22 Aug 2018, 19:19

Re: How do you force Series + season ?

Post by Matt »

Using the tips in the Anidb to TVBD didn't help. It's still identified as season 1.

Also the big issue with interactive (or the gui) is that you can select a serie but not the season. So it doesn't help since the serie is already correct.

I finally found how to combine my format "{n}/{'S'+s}/{s00e00} {fn}}" to the manual override using csv.
The format is:

Code: Select all

{any{csv('file.csv').findResult{ k, v -> fn.contains(k) ? v : null }}{n+'/S'+s}}/{s00e00} {fn}
Seems to work fine so far :D
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How do you force Series + season ?

Post by rednoah »

Step 1: Process with AniDB and add identifying information that is common to both AniDB and TheTVDB:

Code: Select all

$ filebot -rename . --db AniDB -non-strict --format "{n} [{airdate}] {t}"
Rename episodes using [AniDB]
Auto-detected query: [Overlord III]
Fetching episode data for [Overlord III]
Fetching episode data for [Overlord II]
Fetching episode data for [Overlord]
Fetching episode data for [Ple Ple Pleiades]
Fetching episode data for [Gekijouban Soushuuhen Overlord]
[MOVE] from [[HorribleSubs] Overlord III - 07 [1080p].mkv] to [Overlord III [2018-08-21] Butterfly Entagled in a Spider`s Web.mkv]
Processed 1 files
Step 2: Process with TheTVDB

Code: Select all

$ filebot -rename . --db TheTVDB -non-strict --format "{plex.name}"
Rename episodes using [TheTVDB]
Auto-detected query: [Overlord III]
Fetching episode data for [Overlord]
[MOVE] from [Overlord III [2018-08-21] Butterfly Entagled in a Spider`s Web.mkv] to [Overlord - S03E07 - Butterfly Entangled in a Spider's Web.mkv]
Processed 1 files
Result:

Code: Select all

$ ls
Overlord - S03E07 - Butterfly Entangled in a Spider's Web.mkv
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How do you force Series + season ?

Post by rednoah »

If you prefer a more manual approach, then you can use --filter to nudge FileBot in the right direction.

e.g.

Code: Select all

--filter "s == 3"
Result:

Code: Select all

$ filebot -rename . --db TheTVDB -non-strict --q Overlord --filter "s ==3"
Rename episodes using [TheTVDB]
Fetching episode data for [Overlord]
Apply filter [s ==3] on [78] items
Include [Overlord - 3x01 - A Ruler’s Melancholy]
Include [Overlord - 3x02 - Carne Village Once More]
Include [Overlord - 3x03 - Enri's Upheaval and Hectic Days]
Include [Overlord - 3x04 - Giant of the East, Demon Snake of the West]
Include [Overlord - 3x05 - Two Leaders]
Include [Overlord - 3x06 - Invitation to Death]
Include [Overlord - 3x07 - Butterfly Entangled in a Spider's Web]
Include [Overlord - 3x08 - A Handful of Hope]
Include [Overlord - 3x09 - War of Words]
Include [Overlord - 3x10 - Preparation for War]
Include [Overlord - 3x11 - Another Battle]
Include [Overlord - 3x12 - Episode 12]
Include [Overlord - 3x13 - Episode 13]
[MOVE] from [[HorribleSubs] Overlord III - 07 [1080p].mkv] to [Overlord - 3x07 - Butterfly Entangled in a Spider's Web.mkv]
Processed 1 files

If you're processing only recent episodes, then a generic filter such as --filter "age < 40" (consider only episodes aired in the last 40 days for matching) might do the trick too:

Code: Select all

$ filebot -rename . --db TheTVDB -non-strict --q Overlord --filter "age < 40" --action TEST
Rename episodes using [TheTVDB]
Fetching episode data for [Overlord]
Apply filter [age < 40] on [78] items
Include [Overlord - 3x06 - Invitation to Death]
Include [Overlord - 3x07 - Butterfly Entangled in a Spider's Web]
Include [Overlord - 3x08 - A Handful of Hope]
Include [Overlord - 3x09 - War of Words]
Include [Overlord - 3x10 - Preparation for War]
Include [Overlord - 3x11 - Another Battle]
Include [Overlord - Special 32 - Pure Pure Pleiades 3 - Play 6: Invitation to Liberation]
Include [Overlord - Special 33 - Pure Pure Pleiades 3 - Play 7: Child Entangled In The Trend]
Include [Overlord - Special 34 - Pure Pure Pleiades 3 - Play 8: A Handful of Moe Elements]
Include [Overlord - Special 35 - Pure Pure Pleiades 3 - Play 9: Peerless]
Include [Overlord - Special 36 - Pure Pure Pleiades 3 - Play 10: Preparation for Settlement]
Include [Overlord - Special 37 - Pure Pure Pleiades 3 - Play 11: Another Truth]
[TEST] from [[HorribleSubs] Overlord III - 07 [1080p].mkv] to [Overlord - 3x07 - Butterfly Entangled in a Spider's Web.mkv]
Processed 1 files
:idea: Please read the FAQ and How to Request Help.
Post Reply