Particular Series

Any questions? Need some help?
Post Reply
User avatar
arukaen
Power User
Posts: 11
Joined: 23 Jul 2013, 18:29

Particular Series

Post by arukaen »

arukaen wrote:So I am attempting to rename a particular series I downloaded "Bleach". Whenever I run the following "filebot -rename . --format "{n.space('.')}.{s00e00}" --order Airdate --db thetvdb," the order of the episodes still seems to come messed up. Some of them are being renamed S00E00 when its actually S01E01. The files are all saved currently as Bleach 01.mkv. What am I missing thats causing me so much trouble with renaming? This is the first time this happened to me with any series.

I posted the previous in the wrong forum. Sorry about that, any help?
Image
User avatar
rednoah
The Source
Posts: 23930
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Particular Series

Post by rednoah »

Depends on how your files match the data in the database. Without sample paths I can't test this.

I'd do --order Absolute so the numbering will better match your files. With --db Anidb you'll probably get the best results if you wanna rename Anime.

Works as far as I can tell:
http://snag.gy/ExOMP.jpg
:idea: Please read the FAQ and How to Request Help.
User avatar
arukaen
Power User
Posts: 11
Joined: 23 Jul 2013, 18:29

Re: Particular Series

Post by arukaen »

Directory: /root/xbmc/TV/Bleach/

command: filebot -rename . --db anidb --order Absolute --format "{n.space('.')}.{s00e00}"

Result:

No matching episode: Bleach 98.mkv
No matching episode: Bleach 99.mkv
[MOVE] Rename [/root/xbmc/TV/Bleach/Bleach 02.mkv] to [Bleach.E02.mkv]
[MOVE] Rename [/root/xbmc/TV/Bleach/Bleach 100.mkv] to [Bleach.E100.mkv]


*EDIT*

Now revert is failing too for some reason:

root: ~/xbmc/TV/Bleach$ filebot -script fn:revert .
[MOVE] Revert [/root/xbmc/TV/Bleach/Bleach.E99.mkv] to [/root/xbmc/TV/Bleach/Bleach.E99.mkv]
FileExistsException: Destination '/root/xbmc/TV/Bleach/Bleach.E99.mkv' already exists
org.apache.commons.io.FileExistsException: Destination '/root/xbmc/TV/Bleach/Bleach.E99.mkv' already exists
at org.apache.commons.io.FileUtils.moveFile(FileUtils.java:2825)
at net.sourceforge.tuned.FileUtilities.moveRename(Unknown Source)
at net.sourceforge.filebot.StandardRenameAction$1.rename(Unknown Source)
at net.sourceforge.filebot.RenameAction$rename.call(Unknown Source)
at Script3.revert(Script3.groovy:12)
at Script3$_run_closure1.doCall(Script3.groovy:21)
at Script3.run(Script3.groovy:19)
at net.sourceforge.filebot.cli.ScriptShell.evaluate(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.runScript(Unknown Source)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)
at net.sourceforge.filebot.Main.main(Unknown Source)
Failure (°_°)
Image
User avatar
rednoah
The Source
Posts: 23930
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Particular Series

Post by rednoah »

Can't reproduce the issue:
http://snag.gy/Yyk2w.jpg

Updated revert.groovy to ignore paths that haven't actually been renamed. It has always worked on Java 7 but if you're still using Java 6 you'll need this fix so use -script svn:revert
:idea: Please read the FAQ and How to Request Help.
User avatar
arukaen
Power User
Posts: 11
Joined: 23 Jul 2013, 18:29

Re: Particular Series

Post by arukaen »

rednoah wrote:Can't reproduce the issue:
http://snag.gy/Yyk2w.jpg

Updated revert.groovy to ignore paths that haven't actually been renamed. It has always worked on Java 7 but if you're still using Java 6 you'll need this fix so use -script svn:revert

Thanks that worked. DIdn't realize ubuntu had somehow managed to keep my openjdk6 as default even when I had openjdk7 installed. I also just downloaded the newest filebot version and try again. I noticed your using Windows, is there any difference in the filebot version compared to the ubuntu one(filebot_3.62_amd64.deb) ?
Image
User avatar
arukaen
Power User
Posts: 11
Joined: 23 Jul 2013, 18:29

Re: Particular Series

Post by arukaen »

Its the damndest thing, I did the same command you did and got the following results. Its long so I put it on pastebin.

http://paste.ubuntu.com/5959010/
Last edited by arukaen on 07 Aug 2013, 15:17, edited 1 time in total.
Image
User avatar
rednoah
The Source
Posts: 23930
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Particular Series

Post by rednoah »

Ah, you wanna set -non-strict because with just numbers it may have some trouble getting a reliable lock on the correct match combination. So you have to allow it to guess a bit.

The few that get renamed it's perfectly sure. As for the others it somehow thinks there's slightly conflicting information. Even I don't understand anymore what's going on when it combines 366x366 objects. :D
:idea: Please read the FAQ and How to Request Help.
User avatar
arukaen
Power User
Posts: 11
Joined: 23 Jul 2013, 18:29

Re: Particular Series

Post by arukaen »

rednoah wrote:Ah, you wanna set -non-strict because with just numbers it may have some trouble getting a reliable lock on the correct match combination. So you have to allow it to guess a bit.

The few that get renamed it's perfectly sure. As for the others it somehow thinks there's slightly conflicting information. Even I don't understand anymore what's going on when it combines 366x366 objects. :D
Should I try a different format? You think that maybe causing some of the pain?
Image
User avatar
rednoah
The Source
Posts: 23930
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Particular Series

Post by rednoah »

Nope, the format doesn't matter. Only once File/Episode matches are confirmed it starts applying the format to the File/Episode match.

It's really just that you have to set -non-strict in this case. Default strict-mode tends to only allow exact SxE / S00E00 matches.

PS: I recommend using {s} {sxe} {t} kind of format. With series name, number and episode title in the filename it'll have more than enough info to confidently look up the episode data again later. But that's only for future rename operations.
:idea: Please read the FAQ and How to Request Help.
User avatar
arukaen
Power User
Posts: 11
Joined: 23 Jul 2013, 18:29

Re: Particular Series

Post by arukaen »

rednoah wrote:Nope, the format doesn't matter. Only once File/Episode matches are confirmed it starts applying the format to the File/Episode match.

It's really just that you have to set -non-strict in this case. Default strict-mode tends to only allow exact SxE / S00E00 matches.

PS: I recommend using {s} {sxe} {t} kind of format. With series name, number and episode title in the filename it'll have more than enough info to confidently look up the episode data again later. But that's only for future rename operations.
thanks for all the help and the suggestion. This actually has been the first anime that has been so messed up. The rest I've tried have worked flawlessly with the previous command but the files were torrented with different titles than "{show} {E#}.avi"
Image
User avatar
rednoah
The Source
Posts: 23930
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Particular Series

Post by rednoah »

I guess it has to do with high number of episodes. Once you get to 101 and above FileBot starts interpreting 3/4-digit numbers as absolute number as well as SSEE pattern. And then with many episodes there'll be conflicts with absolute numbers and SxE numbers. Absolute 10 will kinda match 1x10, 2x10, etc in strict mode it'll abort in uncertain cases like this. In non-strict mode it'll pick the "best" match. It'll still work for almost all files. But correctness is not guaranteed anymore.
:idea: Please read the FAQ and How to Request Help.
User avatar
arukaen
Power User
Posts: 11
Joined: 23 Jul 2013, 18:29

Re: Particular Series

Post by arukaen »

rednoah wrote:I guess it has to do with high number of episodes. Once you get to 101 and above FileBot starts interpreting 3/4-digit numbers as absolute number as well as SSEE pattern. And then with many episodes there'll be conflicts with absolute numbers and SxE numbers. Absolute 10 will kinda match 1x10, 2x10, etc in strict mode it'll abort in uncertain cases like this. In non-strict mode it'll pick the "best" match. It'll still work for almost all files. But correctness is not guaranteed anymore.

Nice glad to see you revisited this and saw the issue is with the amount of episodes. Any plans to add logic around long series like these?
Image
User avatar
rednoah
The Source
Posts: 23930
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Particular Series

Post by rednoah »

Not really. It's working pretty much exactly as per spec.

If you want it to always work and possibly mess up you'll gonna do -non-strict. This is like the GUI does. Strict mode never messes up but may ignore some files. The GUI doesn't have an equivalent of that, so not really worth the timing fixing something that works as designed. :D
:idea: Please read the FAQ and How to Request Help.
bredonkulous
Posts: 5
Joined: 24 Oct 2013, 02:00

Re: Particular Series

Post by bredonkulous »

rednoah wrote:I guess it has to do with high number of episodes. Once you get to 101 and above FileBot starts interpreting 3/4-digit numbers as absolute number as well as SSEE pattern. And then with many episodes there'll be conflicts with absolute numbers and SxE numbers. Absolute 10 will kinda match 1x10, 2x10, etc in strict mode it'll abort in uncertain cases like this. In non-strict mode it'll pick the "best" match. It'll still work for almost all files. But correctness is not guaranteed anymore.
I'm seeing the exact same behavior. I played around with every setting I could to get this work past 100 episodes. All anime files come in "absolute" episode format, however the media servers (plex) need it in S00E00 format.

I had a new series i was downloading today hit ep 101 this week and now my renaming setup is worthless because it started overwriting season 1 files. Even using the --order absolute attribute seems to not do what is expected. TVDB has absolute data for this show and the regular episode number, however it never makes a connection and always thinks this file is E01. I've tried all the different hosts and i'm not getting any luck with this.

By some miracle I got this script working for Naruto but the same structure doesn't work for other series:
"C:\Program Files\FileBot\filebot.exe" -rename "X:/Anime/Naruto Shippuuden" --q "Naruto Shippuuden" --db thetvdb --lang en -non-strict --format "X:/Anime/Naruto Shippuuden/Season {s}/{n} - {S00E00}" --conflict override
User avatar
rednoah
The Source
Posts: 23930
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Particular Series

Post by rednoah »

Send me some file names to play with.

101 is interpreted as both E101 as well as 1x01 where 1x01 always takes precedence unless there is other factors indicating otherwise. If you switch to --order absolute everything is always absolute since the episode data is fetch with absolute numbers only and filebot doesn't even know the SxE numbers.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 23930
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Particular Series

Post by rednoah »

This is how it should work:

Code: Select all

filebot -rename . --db thetvdb -non-strict --order absolute && filebot -rename . --db thetvdb -non-strict --order airdate

Code: Select all

[MOVE] Rename [X:\[HorribleSubs] Naruto Shippuuden - 309 [720p].mkv] to [Naruto Shippuuden - 309 - An A-Rank Mission The Contest.mkv]
Processed 1 files
[MOVE] Rename [X:\Naruto Shippuuden - 309 - An A-Rank Mission The Contest.mkv] to [Naruto Shippuuden - 13x49 - An A-Rank Mission The Contest.mkv]
Processed 1 files
Step 1: Fill in missing episode title information by using absolute number data
Step 2: Use number+title for mapping absolute number to SxE
:idea: Please read the FAQ and How to Request Help.
bredonkulous
Posts: 5
Joined: 24 Oct 2013, 02:00

Re: Particular Series

Post by bredonkulous »

rednoah wrote:This is how it should work:

Code: Select all

filebot -rename . --db thetvdb -non-strict --order absolute && filebot -rename . --db thetvdb -non-strict --order airdate

Code: Select all

[MOVE] Rename [X:\[HorribleSubs] Naruto Shippuuden - 309 [720p].mkv] to [Naruto Shippuuden - 309 - An A-Rank Mission The Contest.mkv]
Processed 1 files
[MOVE] Rename [X:\Naruto Shippuuden - 309 - An A-Rank Mission The Contest.mkv] to [Naruto Shippuuden - 13x49 - An A-Rank Mission The Contest.mkv]
Processed 1 files
Step 1: Fill in missing episode title information by using absolute number data
Step 2: Use number+title for mapping absolute number to SxE
This makes sense to do the two hop method, however --order absolute doesn't do that. It converts ep 105 into ep 005. Nothing I'm able to do will look up an episode on TVDB by absolute and return me the S00E00 information for it.

Filename: "[Horriblesubs] Hunter x Hunter 2011 - 105 [720p].mkv"
Command for Step 1:

Code: Select all

"C:\Program Files\FileBot\filebot.exe" -rename "X:/Test2/" --q "Hunter x Hunter (2011)" --db thetvdb --lang en -non-strict --order absolute --format "X:/Test2/Hunter X Hunter (2011)/{n} - {absolute.pad(3)} - {t}" 
Result:

Code: Select all

C:\Users\Brett>"C:\Program Files\FileBot\filebot.exe" -rename "X:/Test2/" --q "H
unter x Hunter (2011)" --db thetvdb --lang en -non-strict --order absolute --for
mat "X:/Test2/Hunter X Hunter (2011)/{n} - {absolute.pad(3)} - {t}"
Rename episodes using [TheTVDB]
Fetching episode data for [Hunter x Hunter (2011)]
Fetching episode data for [Hunter X Hunter]
Stripping invalid characters from new path: X:/Test2/Hunter X Hunter (2011)/Hunt
er X Hunter - 005 - Lie x Truth? x Kiriko
[MOVE] Rename [X:\Test2\[hottiblesubs] Hunter X Hunter - 105 [720p].mkv] to [X:\
Test2\Hunter X Hunter (2011)\Hunter X Hunter - 005 - Lie x Truth x Kiriko.mkv]
Processed 1 files
Done ?(?????)?
User avatar
rednoah
The Source
Posts: 23930
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Particular Series

Post by rednoah »

Can't reproduce the issue, make sure you're using the latest release.

Works for me:
2013-11-18 14_27_46-C__WINDOWS_system32_cmd.exe.png
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 23930
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Particular Series

Post by rednoah »

FYI if xattr is enabled files will be tagged, and if the first rename is wrong then maybe those wrong tags will mess with future calls


EDIT: pretty sure this is your issue:

If you use --action move then make sure you call xattr clear before every test run:
http://www.filebot.net/forums/viewtopic ... &t=5#p5394

OR use --action test which also disables xattr
:idea: Please read the FAQ and How to Request Help.
bredonkulous
Posts: 5
Joined: 24 Oct 2013, 02:00

Re: Particular Series

Post by bredonkulous »

Thank Rednoah.

This certainly makes a huge difference.

Example:
File download name: [HorribleSubs] Hunter X Hunter - 108 [720p].mkv
Step1: File successfully converts to: Hunter x Hunter (2011) - 108 - Komugi x And x Gungi.mkv
Step2: File successfully converts to: Hunter x Hunter (2011) - S02E50.mkv

Code: Select all

"C:\Program Files\FileBot\filebot.exe" -rename "X:/Anime/Hunter x Hunter (2011)/" --q "Hunter x Hunter (2011)" --db thetvdb --lang en -non-strict --order absolute --format "X:/Anime/Hunter x Hunter (2011)/{n} - {absolute} - {t}" --conflict skip -script fn:xattr --action clear && "C:\Program Files\FileBot\filebot.exe" -rename "X:/Anime/Hunter x Hunter (2011)/" --q "Hunter x Hunter (2011)" --db thetvdb --lang en -non-strict --order absolute --format "X:/Anime/Hunter x Hunter (2011)/{n} - {absolute} - {t}" --conflict skip && "C:\Program Files\FileBot\filebot.exe" -rename "X:/Anime/Hunter x Hunter (2011)/" --q "Hunter x Hunter (2011)" --db thetvdb --lang en -non-strict --order airdate --format "X:/Anime/Hunter x Hunter (2011)/Season {s}/{n} - {S00E00}" --conflict skip
Note: only works if i run it in a single line command when i execute this from a .bat file.
User avatar
rednoah
The Source
Posts: 23930
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Particular Series

Post by rednoah »

Made a script for Absolute->SxE:
https://github.com/filebot/scripts/blob ... sxe.groovy

e.g.

Code: Select all

filebot -script abs2sxe.groovy /path/to/file -non-strict --log info
That should take care of most cases.
:idea: Please read the FAQ and How to Request Help.
bredonkulous
Posts: 5
Joined: 24 Oct 2013, 02:00

Re: Particular Series

Post by bredonkulous »

I ran the script above on one of my directories and everything came out jacked up ->

Script I ran:

Code: Select all

filebot -script c:\FAMC\abs2sxe.groovy "X:\Anime\Hunter X Hunter (2011)" -non-strict --log info
(had to remove the word "step" from the front of line 4 as i think that was a typo causing errors)

It changed all files from format "Hunter x Hunter (2011) - S01E01.mkv" to "Hunter X Hunter - [00001] - Boy Going on a Journey x Leaving x Sound of the Wind - [1999-10-16].mkv" or some picked up the right series (2011) "Hunter x Hunter (2011) - [00011] - Trouble x With The x Gamble - [2011-12-11].mkv"

But I believe the intended output was to be in SxE format.
bredonkulous
Posts: 5
Joined: 24 Oct 2013, 02:00

Re: Particular Series

Post by bredonkulous »

In addition to the above comment...

Also even running the method that worked before no longer operates the --action clear command is throwing what appears to be a code base error.

I tried it with the text below (which was working the last time you helped me), and several other variations including only the action itself without the rename paramaters, and also test instead of clear, but same result regardless.

Input

Code: Select all

"C:\Program Files\FileBot\filebot.exe" -rename "X:/Anime/Hun
ter x Hunter (2011)/" --q "Hunter x Hunter (2011)" --db thetvdb --lang en -non-s
trict --order absolute --format "X:/Anime/Hunter x Hunter (2011)/{n} - {absolute
} - {t}" --conflict skip -script fn:xattr --action clear

Output

Code: Select all

MultipleCompilationErrorsException: startup failed:
Script3.groovy: 1: expecting EOF, found 'HTML' @ line 1, column 12.
   ?<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w
3.org/TR/html4/loose.dtd">
              ^

1 error

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script3.groovy: 1: expecting EOF, found 'HTML' @ line 1, column 12.
   ?<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w
3.org/TR/html4/loose.dtd">
              ^

1 error

        at net.sourceforge.filebot.cli.ScriptShell.evaluate(ScriptShell.java:102
)
        at net.sourceforge.filebot.cli.ScriptShell.runScript(ScriptShell.java:95
)
        at net.sourceforge.filebot.cli.ArgumentProcessor.process(ArgumentProcess
or.java:125)
        at net.sourceforge.filebot.Main.main(Main.java:190)
Failure (░_░)
Launch4j: Failed to run the given command.
User avatar
rednoah
The Source
Posts: 23930
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Particular Series

Post by rednoah »

Send me the paths and I can try for myself.

If you look at the 2 lines of SxE you'll notice that it just does two renames, once to add lots of extra info like airdate and a second to then rename again with normal SxE order matching by airdate/title. I don't see why it wouldn't execute the second line. Did you kill the script after the first output?

Make sure you have full internet access. FileBot has requested the script but it apparently gets some random html page back. Try the newer revision which use https which can't be redirected/hijacked like http can.
:idea: Please read the FAQ and How to Request Help.
Post Reply