Sort movies across multiple hard drives based on genre

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
snarkycanuck
Posts: 2
Joined: 29 Mar 2017, 19:49

Sort movies across multiple hard drives based on genre

Post by snarkycanuck »

I'm using this script in uTorrent to successfully sort my movies into genres (working great). What I would like to do is have my horror and thriller movies moved to a separate drive. Currently my movies are all stored on D:, so I just need those 2 genres to be automatically moved over to E:
Thanks for any help you can offer.

Code: Select all

filebot.launcher -script fn:amc --log-file amc.log --action copy --conflict override -non-strict --def  "movieFormat=\\MEDIA-PC\Movies\{if (omdb.genres.contains('Romance')) {'Romance'} else if (omdb.genres.contains('Animation')) {'Animation'} else if (omdb.genres.contains('Biography')) {'Biography'} else if (omdb.genres.contains('Horror')) {'Horror'} else if (omdb.genres.contains('Thriller')) {'Thriller'} else if (omdb.genres.contains('Family')) {'Family'} else if (omdb.genres.contains('Science Fiction')) {'Sci-Fi'} else if (omdb.genres.contains('Fantasy')) {'Fantasy'} else if (omdb.genres.contains('Comedy')) {'Comedy'} else if (omdb.genres.contains('Documentary')) {'Documentary'} else if (omdb.genres.contains('History')) {'History'} else if (omdb.genres.contains('Drama')) {'Drama'} else if (omdb.genres.contains('Adventure')) {'Adventure'} else if (omdb.genres.contains('Sports')) {'Sports'} else if (omdb.genres.contains('Action')) {'Action'} else if (omdb.genres.contains('War')) {'War'}}\{n} ({y})" "seriesFormat=\\MEDIA-PC\TV Shows\{n}\{'Season '+s.pad(2)}\{n} - {s00e00} - {t}" music=n artwork=n "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Sort movies across multiple hard drives based on genre

Post by rednoah »

1.
Use the @file syntax for reading command-line arguments from external text files, especially complex formats.


2.
I'd start by making the format more readable, by putting your genre priorities and directory mappings into separate csv file:

Code: Select all

{csv('volumes.csv').find{ it.key in genres }.value}/{plex.tail}
where volumes.csv might look like this:

Code: Select all

Thriller;T:/Thriller
Science Fiction;S:/Sci-Fi
...
:idea: Please read the FAQ and How to Request Help.
snarkycanuck
Posts: 2
Joined: 29 Mar 2017, 19:49

Re: Sort movies across multiple hard drives based on genre

Post by snarkycanuck »

Thank you for the tips, rednoah.
Post Reply