Page 1 of 1
getting the first letter of a title
Posted: 24 Feb 2016, 07:41
by snarfsmojo
I'm hoping you all can help me out. I'm modifying my amc.groovy, I would like my output of movies to go to
/movies/%firstletterofthetitle%/
so Pulp fiction would be filed under
/Movies/P/
I tried using
mov: any{ movieFormat }{ '''movies/{t.toUpperCase().substring(0,1)}/{n} - {y} - {vf} - {af}{'.'+lang}''' },
but the movies just got dropped into the root of the movies folder...
any suggestions?
Re: getting the first letter of a title
Posted: 24 Feb 2016, 10:44
by snarfsmojo
nevermind, I figured it out!
for movies I needed to be using {n} instead of {t}.
Re: getting the first letter of a title
Posted: 24 Feb 2016, 16:06
by rednoah
1.
Try the latest build. There's the {az} binding for exactly that use case now.
2.
DO NOT edit the amc script just for customizing the formats. Use the --def seriesFormat/movieFormat options for that.
Re: getting the first letter of a title
Posted: 25 Feb 2016, 01:39
by snarfsmojo
I tried using the --def seriesFormat/movieFormat but couldn't get it to work properly. I think it has to do with the fact that I'm running as a non-root user on linux, so I have to run the portable version using the jar directly.... when I stopped using the --def filebot stopped erroring out. I would prefer to be able to use fn:amc rather than a customized amc.groovy, but don't know if I want to change things now that I finally got it working...
Re: getting the first letter of a title
Posted: 25 Feb 2016, 03:01
by rednoah
1.
Running as root or not has definitely nothing to do with command-line options. You probably just didn't
pass the arguments correctly, which can be tricky but won't be an issue at all if you
specify the options via an @file.
If you use
fn:amc the amc script will auto-update, if you fork your own amc script you'll have to merge future changes yourself.
2.
Also, don't just
java -jar to run FileBot. You should use
filebot.sh which contains many required filebot default options.