I'm just getting started with FileBot and it's great! I have some questions, though:
Is it possible to have FileBot change the naming format based on show title? For example, my QI folder is set up differently to most of my other folders - is it possible to have FileBot detect the show name (i.e. QI or not) and automatically alter the naming format based on that?
A subset of this, I have my QI folders named "Season 1 - A", "Season 2 - B", "Season 3 - C", etc., can FileBot do this intelligently or would I use a CSV file with "Season 1; Season 1 - A", etc. in it?
Is it possible to have FileBot add/remove an item from the naming format based on media length? Again for QI, is it possible for FileBot to detect the media length and append media longer than 40 minutes with an "(XL)" tag in the filename, leaving media less than 40 minutes with no tag?
This one is less important (and less likely to be possible), but I'll throw it in anyway: Is it possible to add a custom "read" format for FileBot? Say the episode filename is QI VG K18 - Compilation 2.mp4 - can FileBot detect that K = 11 (11th letter in the alphabet) and then find S11E18?
Finally, if these things aren't possible in FileBot itself, are they possible using a Groovy script? Am I just too lazy? (Yes, yes I am.)
Thanks so much!
Naming Format Questions...
Re: Naming Format Questions...
Yes, Yes and No. :
You can build any kind of logic or conditions into a single format expression. That's for n == QI and duration > 40min or whatever you may want to define.
The latter is a simple no. Though you can just pre-process the names before calling rename() though in your case since you already got the ep number so you may be able by passing in --filter "s == 11"
You can build any kind of logic or conditions into a single format expression. That's for n == QI and duration > 40min or whatever you may want to define.
The latter is a simple no. Though you can just pre-process the names before calling rename() though in your case since you already got the ep number so you may be able by passing in --filter "s == 11"
-
- Posts: 4
- Joined: 13 Feb 2014, 15:20
Re: Naming Format Questions...
Thanks for replying so quickly!
Unfortunately I've been unable to get FileBot to talk to MediaInfo (Java, MediaInfo and FileBot all in x86 and I still got an error in FileBot about 64-bit MediaInfo libs) and I don't know how to write the code into the Episode Format dialogue so I'll just rename QI episodes manually.
Thanks for the help, though.
Unfortunately I've been unable to get FileBot to talk to MediaInfo (Java, MediaInfo and FileBot all in x86 and I still got an error in FileBot about 64-bit MediaInfo libs) and I don't know how to write the code into the Episode Format dialogue so I'll just rename QI episodes manually.
Thanks for the help, though.
-
- Posts: 4
- Joined: 13 Feb 2014, 15:20
Re: Naming Format Questions...
Can anyone help me with this code? This is what I'm trying to do:
What I want it to do is:
I know the syntax isn't right (because it doesn't work) but I don't know how to make it correct.
Also does anyone have any wisdom on MediaInfo? Do DLLs need to be in certain folders or do I need to somehow load the MediaInfoLibrary into the expression? I just keep getting the "unable to 64-bit native library 'mediainfo'" even when everything was installed in 32-bit.
Code: Select all
{if(n=="QI") then "Season {s} - L" else "Season {s}}"
Code: Select all
If the name of the show is QI, make the folder "Season {number} - {letter of the alphabet}". If not, make the folder" Season {number}".
Also does anyone have any wisdom on MediaInfo? Do DLLs need to be in certain folders or do I need to somehow load the MediaInfoLibrary into the expression? I just keep getting the "unable to 64-bit native library 'mediainfo'" even when everything was installed in 32-bit.
Re: Naming Format Questions...
This will do the what you want you will need to change the L to the letter you require
{n.match((/QI/): "$n/Season $s - L/$n - $sxe - $t")?: "$n/Season $s/$n - $sxe - $t"}
if matched you get /QI/Season 1 - L/QI - 1x01 - to many Englishmen.extension
un matched you get /Firefly/Season 1/Firefly - 1x01 - serenity.mp4
Hope that helps
Martyn
{n.match((/QI/): "$n/Season $s - L/$n - $sxe - $t")?: "$n/Season $s/$n - $sxe - $t"}
if matched you get /QI/Season 1 - L/QI - 1x01 - to many Englishmen.extension
un matched you get /Firefly/Season 1/Firefly - 1x01 - serenity.mp4
Hope that helps
Martyn
-
- Posts: 4
- Joined: 13 Feb 2014, 15:20
Re: Naming Format Questions...
Hi Martyn,
Thanks for that! I've been playing around today and got a similar thing working with:
My next question is, is it possible to get FileBot to pull CSV data for the season and if so, how?
Here's the sort of thing I mean:
And in the CSV file I would have:
And so on.
However, it seems that FileBot will only pull CSV data (and indeed only use the n.match and n.replace commands) from the show titles, not show seasons (s.replace does not work).
Is there any way to do this or will I just have to manually change the letter and have it hardcoded?
Thanks!
Thanks for that! I've been playing around today and got a similar thing working with:
Code: Select all
{if(n=="QI")("Season ${s} - L") else ("Season ${s}")}
Here's the sort of thing I mean:
Code: Select all
{if(n=="QI")("Season ${csv('F:/FileBot3.8/QI.csv').get(s) ?: s}") else ("Season ${s}")}
Code: Select all
11; 11 - K
12; 12 - L
13; 13 - M
14; 14 - N
However, it seems that FileBot will only pull CSV data (and indeed only use the n.match and n.replace commands) from the show titles, not show seasons (s.replace does not work).
Is there any way to do this or will I just have to manually change the letter and have it hardcoded?
Thanks!
Re: Naming Format Questions...
Hi
Been playing around with this for a while but I think I finally ot it to work try this
{s.match((/1/):A="A")?:s.match((/2/):A="B")?:s.match((/3/):A="C"); n.match((/QI/): "$n/Season $s - $A/$n - $sxe - $t" )?: "$n/Season $s/$n - $sxe - $t"} {if(info.runtime > '40'){' - XL'}}
I think this will do all you want to get defg etc add ?:s.match((/4/):A="D") ...... before the "; n.match"
Cheers Martyn
Been playing around with this for a while but I think I finally ot it to work try this
{s.match((/1/):A="A")?:s.match((/2/):A="B")?:s.match((/3/):A="C"); n.match((/QI/): "$n/Season $s - $A/$n - $sxe - $t" )?: "$n/Season $s/$n - $sxe - $t"} {if(info.runtime > '40'){' - XL'}}
I think this will do all you want to get defg etc add ?:s.match((/4/):A="D") ...... before the "; n.match"
Cheers Martyn
Re: Naming Format Questions...
I don't understand what the issue is with CSV files, but it'd definitely use CSV files with a simple lookup.
Format:
D:/Firefly.csv
It probably didn't work for you cause CSV map uses String as key and when you look up with s which is an Integer object the lookup will fail because '1' != 1
Format:
Code: Select all
{csv("D:/${n}.csv").get(s.pad(2))}
Code: Select all
01; 01 - A