Seems so simple ...

Any questions? Need some help?
Post Reply
ssd
Posts: 2
Joined: 25 Aug 2014, 00:17

Seems so simple ...

Post by ssd »

Recently learned of FileBot from unRAID forum. Looks great!!

I'd like to organize my movies by decade.

1980s\...
1990s\...
2000s\...

So I was trying to find a substring like function so that I would take the first three characters of the year, then add a "0s". But could not find such a function.

To make it a little more complicated, most of my movies are from the 80s and beyond. I'd like to combine the 50s-70s into a single directory "1950s-70s", and anything older "1920s-40s". If there is no year I'd like it to go into an "unknown" decade that I will sort out into the proper folder manually.

Oh, and I'd like movies starting with noise words ("The", "An", or "A") dropped from the sub directory but not from the file name.

2. I'd also like an "SD", "HD" "BR" or "3D" in the movie title. I know I can get {vf}, but how can I convert that into anything less than or equal to 480p="SD" and anything greater is "HD"? And if the movie is 1080p, I'd like it "BR". And if the movie is in 3D, I'd like the HD or BD changed to 3D. Examples:
2000s\Avatar (2009) 3D\Avatar (2009) 3D.mkv
2000s\Avatar (2009) BR\Avatar (2009) BR.mkv
2000s\Avatar (2009) HD\Avatar (2009) HD.mkv
2000s\Avatar (2009) SD\Avatar (2009) SD.mkv
1920s-40s\Gone with the Wind (1939) SD\Gone With The Wind (1939) SD.mkv
1990s\Bridges of Madison County (1995) HD\The Bridges of Madison County (1995) HD.mkv
unknown\Obscure Film Fest () SD\Obscure File Felt () SD.mkv

Any help on techniques that should be used greatly appreciated! And if this were to magically happen, super appreciated!!
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Seems so simple ...

Post by rednoah »

1.

Code: Select all

{10 * (int)(y/10)}
1.1.
Use if-then-else

1.2.
Use sortOrder() for the folder and not use sortOrder() for the file => http://www.filebot.net/forums/viewtopic.php?f=5&t=211

2.
Use if-then-else. I'd use dim[0] and dim[1] cause you get WxH as numbers.

All the variables you might need are self-documented in the in the Format -> Bindings dialog.
:idea: Please read the FAQ and How to Request Help.
ssd
Posts: 2
Joined: 25 Aug 2014, 00:17

Re: Seems so simple ...

Post by ssd »

Ok - have been working on it. Not so difficult. I decided not to drop the "A" or "The" from the front of the movie name (BTW, it is sortName not sortOrder :) ).

I did decide to only rename certain files, feeling that loading the fanart and stuff might overwrite .jpg or .nfo files I might want to keep around.

Posting in case others are interested.

e:\Movie\By Date\{y<1920 ? "unknown" : y<1950 ? '1920s-40s' : y<1980 ? '1950s-70s' : (10*(int)(y/10))+"s"}\{((n.replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " "))) + ' (' + y + ') ' + (fn.lower() =~ "3d" ? "3D" : vf =~ "1080p" ? "BR" : sdhd)}\{ext.lower() =~ "mkv|avi|mpg|mpeg|idx|srt|sub|srr|iso" ? ((n.replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " "))) + ' (' + y + ') ' + (fn.lower() =~ "3d" ? "3D" : vf =~ "1080p" ? "BR" : sdhd) : fn}
Post Reply