Issue Renaming Anime from Absolute to SxxExx

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
samhannigan05
Posts: 4
Joined: 31 Mar 2014, 06:11

Issue Renaming Anime from Absolute to SxxExx

Post by samhannigan05 »

EDIT: Issue has been resolved. Look at the 7th post.

Hi all,

Before I begin, I have looked at the other threads related to this issue, and I couldn't get them to work. The Groovy script can't be found when I try to use it.

I am trying to rename Anime from Absolute numbering, to SxxExx numbering. This is the script that I am currently using within Filebot via CLI:

C:\Program Files\Filebot\Filebot.exe -rename "E:\Downloads\Complete\Anime" --db TheTVDB --format "E:\Downloads\Complete\TV\{n.space('.')}.{s00e00}" -non-strict --action move

This script works for the most part. It doesn't however work with "Naruto Shippuuden".

When it reads an episode of Shippuuden, it treats it as if it were "Naruto" the orginal series. So the numbering comes out wacky, and not correct for Shippuuden.

Has anyone found a way to rename this anime correctly? My folder structure is as mentioned in the script above:

Downloads
>Complete
>>Anime
>>TV

So the script renames any episodes that are in Anime, and moves them to TV.
The episodes are only mkv files, no folders or anything else.

An example might be

[HorribleSubs] Naruto Shippuuden - 272 [480p].mkv

Any help is much appreciated.
Last edited by samhannigan05 on 02 Apr 2014, 04:29, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 23939
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Issue Renaming Anime from Absolute to SxxExx

Post by rednoah »

This video explains all common issues related absolute number issues:
https://www.youtube.com/watch?v=P7tas1ceKG0

Also pretty much any other thread on the issue tells you to rename in 2 Steps. First normalize name and add titles, then rename to the final format:
abs2sxe.png

EDIT:
Wanna know why? It's quite funny. :D

Official name Naruto Shippuden doesn't match the filename Naruto Shippuuden. Spelling names exactly correctly makes a difference. :P


So if the names are more agreeable the fn:abs2sxe script will work just fine:

e.g.

Code: Select all

filebot -script fn:abs2sxe "[HorribleSubs] Naruto Shippuden - 272 [480p].mkv" --log info

Code: Select all

[RENAME] Rename [D:\workspace\testdata\AMC-TEST\[HorribleSubs] Naruto Shippuden - 272 [480p].mkv] to [Naruto Shippuden - [00272] - Mifune vs. Hanzo - [2012-08-02].mkv]
[MOVE] Rename [D:\workspace\testdata\AMC-TEST\Naruto Shippuden - [00272] - Mifune vs. Hanzo - [2012-08-02].mkv] to [Naruto Shippuden - 13x12 - Mifune vs. Hanzo.mkv]

-------------------- abs2sxe --------------------

[HorribleSubs] Naruto Shippuden - 272 [480p].mkv        ->      Naruto Shippuden - [00272] - Mifune vs. Hanzo - [2012-08-02].mkv        ->      Naruto Shippuden - 13x12 - Mifune vs. Hanzo.mkv
:idea: Please read the FAQ and How to Request Help.
samhannigan05
Posts: 4
Joined: 31 Mar 2014, 06:11

Re: Issue Renaming Anime from Absolute to SxxExx

Post by samhannigan05 »

Ah yes I see, thanks for that.

Currently there is a discrepancy between what the files released online are named, and how theTVDB names them.

So to combat that, is there a quick way to in the same batch file that calls filebot, replace Shippuuden in a filename, with Shippuden? That would fix my current issue.

The other problem then, is that if the names change in the future again back to Shippuuden (Shippuden is a recent change) the script will be broken.

Any other more intelligent way of achieving this that you can think of?

Also, how can I move the renamed file to a new location once it has been renamed?

This is what I have currently that works, so long as the show is named according to theTVDB (I think? Not sure where it is pulling from):

Code: Select all

filebot -script fn:abs2sxe "E:\Downloads\Complete\Anime" --log info
This is what I am looking at currently(pseudo):

Code: Select all

if "E:\Downloads\Complete\Anime\*" = *Shippuuden* rename to *Shippuden*
filebot -script fn:abs2sxe "E:\Downloads\Complete\Anime" --log info
User avatar
rednoah
The Source
Posts: 23939
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Issue Renaming Anime from Absolute to SxxExx

Post by rednoah »

Both AniDB and TheTVDB use Shippuden so I'm pretty sure that's the official spelling.

1. Filename: Find & Replace
http://www.filebot.net/forums/viewtopic ... &t=5#p2100

2. Move? Just specify the absolute path in your format like always. ;)
:idea: Please read the FAQ and How to Request Help.
samhannigan05
Posts: 4
Joined: 31 Mar 2014, 06:11

Re: Issue Renaming Anime from Absolute to SxxExx

Post by samhannigan05 »

Thanks again for the assistance.

I have this all more or less working now. The only thing I am having trouble with is moving the renamed file to a new location.

Currently I have this that works, minus moving the file:

Code: Select all

::Replace Shippuuden with Shippuden
filebot -script fn:replace --def "e=Shippuuden" "r=Shippuden" "E:\Downloads\Complete\Anime"

::Rename from Absolute to SxE
filebot -script fn:abs2sxe "E:\Downloads\Complete\Anime" --log info
Am I somehow able to combine all of the above to occur in one line?

I think I am coming about this all wrong, but I am trying to move the renamed file as soon as it is being renamed. This is what I have, that just does nothing currently, apart from rename:

Code: Select all

::Replace Shippuuden with Shippuden
filebot -script fn:replace --def "e=Shippuuden" "r=Shippuden" "E:\Downloads\Complete\Anime"

::Rename from Absolute to SxE
filebot -script fn:abs2sxe "E:\Downloads\Complete\Anime" --log info --action move "E:\Downloads\Complete\TV"
User avatar
rednoah
The Source
Posts: 23939
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Issue Renaming Anime from Absolute to SxxExx

Post by rednoah »

1. Do some console tutorial. You'll still need two filebot calls though. ;)

Code: Select all

cmd1 && cmd2 && cmd3
2. Use --format:

Code: Select all

filebot -script fn:abs2sxe "E:\Downloads\Complete\Anime" --log info --action move "E:\Downloads\Complete\TV" --format "E:\Downloads\Complete\TV\{n.space('.')}.{s00e00}"
In your case "E:\Downloads\Complete\TV" is an extra input folder. For setting the output folder you need to specify --output or absolute --format.
:idea: Please read the FAQ and How to Request Help.
samhannigan05
Posts: 4
Joined: 31 Mar 2014, 06:11

Re: Issue Renaming Anime from Absolute to SxxExx

Post by samhannigan05 »

Thanks again for all your help!

For anyone who is interested, below is my final code that allows me to successfully rename Naruto Shipuuden from Absolute numbering, to SxE numbering, and accounts for the difference in the spelling of Shippuuden/Shippuden. I have kept my code comments in, just in case they assist anyone else.

Code: Select all

:: Uses FileBot to rename anime from Absolute numbering, to season numbering.

::First, normalize Naruto Shippuuden if it is one of the shows.
filebot -script fn:replace --def "e=Shippuuden" "r=Shippuden" "E:\Downloads\Complete\Anime"

::Second, run the abs2sxe script to rename the episodes it finds, and then move them to the output location
filebot -script fn:abs2sxe "E:\Downloads\Complete\Anime" --log info --output "E:\Downloads\Complete\TV"
Post Reply