Help modifying filebot.sh script to organize movies by new releases

Any questions? Need some help?
Post Reply
pimogo
Posts: 3
Joined: 24 Feb 2019, 19:52

Help modifying filebot.sh script to organize movies by new releases

Post by pimogo » 24 Feb 2019, 20:00

I'm using the filebot.sh file to call the AMC script to organize my movies. Presently all movies are placed in the parent folder /Movies.

e.g. /Movies/Movie Title (2019)

I'd like to add an additional step that first determines the year of the movie's release, then adds them to the following if the movie was released in the present year. Like so:

e.g. /Movies/Movies-New Releases/Movie Title (2019)

Otherwise, if the movie falls in any other release year, it places it in the default folder /movies/movies-archive.

I've taken a look at the filebot.sh file and it seems to me the line item that needs to change is the following:

Code: Select all

# Movies/Fight Club.mkv
MOVIE_FORMAT="Movies/{ny}/{n.$QUOTE_FIXER} ({y}) {' CD'+pi}"
However, i dont know what would be the most efficient way to execute an if/else statement that determines year of movie and then places them correctly in the appropriate subfolder: Movies-New Releases or Movies-Archive.

What would you suggest?

Thanks!

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

Re: Help modifying filebot.sh script to organize movies by new releases

Post by rednoah » 25 Feb 2019, 02:55

Here's a few if-then-else examples:
viewtopic.php?f=5&t=4191


You could check {y} like so:

Code: Select all

y == 2019 ? /New Movie/ : /Old Movie/

However, but you probably wanna use {age} to check if a movie was released within the last N days:

Code: Select all

age < 360 ? /New Movie/ : /Old Movie/
:idea: Please read the FAQ and How to Request Help.

pimogo
Posts: 3
Joined: 24 Feb 2019, 19:52

Re: Help modifying filebot.sh script to organize movies by new releases

Post by pimogo » 25 Feb 2019, 18:57

Thanks! This is brilliant--will try these. Also whats the best way to consolidate these statements? Like this?

Code: Select all

MOVIE_FORMAT="age < 360 ? /New Movie/ : /Old Movie/{ny}/{n.$QUOTE_FIXER} ({y}) {' CD'+pi}"

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

Re: Help modifying filebot.sh script to organize movies by new releases

Post by rednoah » 25 Feb 2019, 19:20

No, you never modify filebot.sh (aka /usr/local/bin/filebot) unless you know exactly what you're doing.

However, if you happen to be using that docker container made by that guy who isn't me, then there's a docker entry point filebot.sh script which in turn calls the actual filebot.sh script, among other things, so that one you might have to figure out yourself.
:idea: Please read the FAQ and How to Request Help.

pimogo
Posts: 3
Joined: 24 Feb 2019, 19:52

Re: Help modifying filebot.sh script to organize movies by new releases

Post by pimogo » 25 Feb 2019, 22:59

Yes you're right this is the coppit docker for Unraid. Do you have a docker I can use instead?

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

Re: Help modifying filebot.sh script to organize movies by new releases

Post by rednoah » 26 Feb 2019, 06:23

The official Docker images are available on Docker Hub:
https://hub.docker.com/r/rednoah/filebot/

But it's not exactly the same. These images are made for Docker, and not specifically for Unraid Docker, and thus don't have Unraid-specific UI integration.
:idea: Please read the FAQ and How to Request Help.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests