uTorrent-PostProcess not formatting Anime correctly.

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Kentoss
Posts: 9
Joined: 23 Nov 2012, 21:39

uTorrent-PostProcess not formatting Anime correctly.

Post by Kentoss »

So, I modified the utorrent-postprocess script to suit my own preferences, and in doing so I noticed that it doesn't care for the changes to the anime rename format I've made, instead using an alternative that I'm not sure where it's pulling from (probably a default).

My format definition is set as such:

Code: Select all

def format = [
	tvs:   '''TV Shows/{n}/{episode.special ? "Special" : "Season "+s}/{n} - {episode.special ? "S00E"+special.pad(2) : s00e00} - {t} {sdhd}''',
	anime: '''Anime/{n}/Episodes/{n} - {s00e00} - {t} {sdhd}''',
	mov:   '''Movies/{n} {y}/{n} ({y})'''
]
Yet the resulting file comes out as:

Code: Select all

Anime/My Little Monster/My Little Monster - 08 - Come Down to Syoyo Festival!.mkv
Also should note that it sticks all the artwork downloaded in Anime/ rather than Anime/My Little Monster/. Using the formatting manually in file bot, I expect to see this:

Code: Select all

Anime/My Little Monster/Episodes/My Little Monster - E08 - Come Down to Syoyo Festival! HD.mkv
I've looked through the code to see if I could spot what's going wrong myself, but I can't seem to figure it out, because the logic seems solid. Unless I've formatted it incorrectly? At any rate, it seems to only happen when I force it as anime using labels, otherwise it's detected as a TV show and sorted as such.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: uTorrent-PostProcess not formatting Anime correctly.

Post by rednoah »

1. Normally it'll only switch between Movie/Series modes. It will be processed as ANIME ONLY IF FORCED via ut_label.

2. When in anime mode it does indeed put artwork into the wrong folder. Fixed that.

3. The anime/tvs formats works fine though. You probably messed something up so grab my latest version and try with that.
:idea: Please read the FAQ and How to Request Help.
Kentoss
Posts: 9
Joined: 23 Nov 2012, 21:39

Re: uTorrent-PostProcess not formatting Anime correctly.

Post by Kentoss »

rednoah wrote:1. Normally it'll only switch between Movie/Series modes. It will be processed as ANIME ONLY IF FORCED via ut_label.
Yes, this is what I am doing.
rednoah wrote:2. When in anime mode it does indeed put artwork into the wrong folder. Fixed that.

3. The anime/tvs formats works fine though. You probably messed something up so grab my latest version and try with that.
Thanks for the fix, I tried to make some simple edits to the code, but no matter what changes I make, it seems to ignore them. I think this is why the Anime formatting is using the default, because for some reason my changes to the script don't get saved. Does filebot cache the script on first run? I even deleted the entire script and the file it was located in and it still ran it, even though there was nothing there. I'm 90% sure it's running it from cache or another location.

EDIT:

I see what's going on. It's reading the script from your sourceforge rather than my local copy. I don't know why i didn't see that before, using my local copy by doing "path/to/script.groovy" instead of fn:utorrent-postprocess works fine.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: uTorrent-PostProcess not formatting Anime correctly.

Post by rednoah »

Yep I guess you figure it out already, fn:name syntax means it'll gonna grab the script online, cache it and check for updates now and then. You have to specify a local path to run a local script.
: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: uTorrent-PostProcess not formatting Anime correctly.

Post by rednoah »

Added support for overriding the default naming formats via --def:
--def "seriesFormat=TV/…"
--def "animeFormat=Anime/…"
--def "movieFormat=Movies/…"

Not gonna advertise that much since everybody will mess up the cmdline with unescaped quotes, so be careful with that those. ;)
:idea: Please read the FAQ and How to Request Help.
Post Reply