Scripting Help - Movie sort and rename with quality

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Darkstorm
Posts: 3
Joined: 27 Dec 2016, 01:31

Scripting Help - Movie sort and rename with quality

Post by Darkstorm »

Hi Guys,

I'm new to File bot and script writing in general and i could use a little help.

Basically i work on a ship and we have 12Tb of storage full to the brim of films and series ( 4 months at sea can get VERY boring! )
Nothing has ever been setup properly outside of having one big folder called "Movies" and another called "TV", everything is lumped together in one place, some in folders with all the torrent file junk others just the video file, some named with the year and quality others named with all sorts of junk... The added problem is duplication of files with different quality ie 720 vs 1080 etc.

I have been using the following scrip if found by Rednoah to rationalise the movie drives by Genre:
X:/Movies/{genres[0]}/{n} ({y})/{n} ({y}){" CD$pi"}
This moves the file folders to new folders created by Genre and renames the files with the year

I later switched to using this script by Deadmano to get over some naming errors:
X:/Movies/{genres[0]}/{n.replaceAll(":", replacement = " -")} ({y}
It also moves the files and not the folders :D

My question is:
Is there a way to sort by Genre, rename with the Year, add Video Quality and if there are duplications in the genre destination folder keep the highest quality file?

So the end file name is something along the lines of:
X:/Movies/Super Heros/Ironman (2008) [1080p]

This way when new crew members join the ship they can update the ships drives / personal copies with the highest quality files and also search for things by year or quality rating. Its so easy to miss shows / films being released if you're at sea for most of a year and then struggle to find something new to watch as you have no idea whats new...

I'd greatly appreciate some help with this, i'm new to coding and although some of it kinda makes sense to me a lot is way over my head.

Cheers :)
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Scripting Help - Movie sort and rename with quality

Post by rednoah »

Here's the format template for that:

Code: Select all

X:/Movies/{genre}/{ny} [{vf}]
Creating one folder per movie is highly recommended though:

Code: Select all

X:/Movies/{genre}/{ny}/{ny} [{vf}]
"Super Heroes" is not a genre, so you won't be able to get that.
:idea: Please read the FAQ and How to Request Help.
Darkstorm
Posts: 3
Joined: 27 Dec 2016, 01:31

Re: Scripting Help - Movie sort and rename with quality

Post by Darkstorm »

Hi Rednoah,

Thank you for the script ;) I'll tinker with this tomorrow and see how it goes. I didn't realise it was that simple
[{vf}]. It took me 20 minutes to find the option to toggle between series and movies as there is a glitch in windows 8.1 where the scripting window needs to be dragged/expanded to display the mode toggle, even on full screen !

Re: "super heros". Yes this is a personal preference and I'll have to do that manually, but all the other normal genre groupings will do :)

I understand for things like WD TV and Roko etc the folder per item setup is good as it contains the artwork and info files but in the wider windows search function it doubles up on search results and confuses some of the more "simple sailors" who still struggle with copy+paste over cut+paste lol.
Are there wider reasons behind the folder per item setup i am missing?

I have toyed with the idea of going over to Plex, but again this is new territory for me. Does Plex need folders or would it be quite happy with just files?

Sorting out 12Tb is a big task, getting to grips with Filebot is just the beginning...

Thanks again for the help :)
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Scripting Help - Movie sort and rename with quality

Post by rednoah »

1.
I haven't been able to reproduce any layout issues. Strange.

Most people would match the files first and then double-click the movie item on the right-hand side. That way FileBot will be able to open the Format Editor in Movie/Episode/Music/File mode depending on the item you have clicked. You'll also be able to test your new format on real data immediately.


2.
It's just the "industry standard" so if you use anything other than Windows Explorer like Plex, Kodi, etc then it's best to have things organized properly.

Plex has strict naming requirements, but the FileBot {plex} binding makes things very easy:
viewtopic.php?f=5&t=4116

Setting up your own Plex server and having Plex clients for individual sailors (a word I will now use interchangeably with users) might be worth it if you're really out on the sea for months at a time. It'll definitely solve all your search/discovery/categorization/watch-status-tracking/etc problems.


3.
If you use FileBot to process large numbers of files, then it's best to do TV Shows and Movie separately to avoid mismatches, and make sure to move files to a new folder structure so that processed and not-yet-processed files are in different folders.

In addition, I recommend a 2-phase approach: First process everything with Strict Match Mode and process the leftovers in a second pass with Opportunistic Match Made.

Strict Match Mode will not work for all files, but it'll work for some (or most depending on your files) with a higher level of automation (i.e. it won't pause to ask questions all the time).
:idea: Please read the FAQ and How to Request Help.
Darkstorm
Posts: 3
Joined: 27 Dec 2016, 01:31

Re: Scripting Help - Movie sort and rename with quality

Post by Darkstorm »

Thanks for the pointers Rednoah :D
Post Reply