-
Notifications
You must be signed in to change notification settings - Fork 70
Automation
In addition to operating interactively, mnamer can be configured to run in batch mode, automatically renaming and moving files without used involvement. This can be set using the batch setting. This along with all other settings mentioned here can be set using CLI arguments or config file keys.
Your next step will likely be to set your destination directies. This isn't specific to batch mode or necessary but if you're looking to automate file relocation you probably have a destination in mind that you want your files moved to. mnamer uses the movie-directory
and episode-directory
settings to configure these locations.
All of mnamer's settings are available in and out of batch mode but these are particularly recommended to make automation safer-- using them mnamer might not do the right thing but its less likely to do the wrong thing.
-
no-guess
prevents guessing using the metadata available from parsing when a file can't be matched against a provider. -
no-overwrite
prevents moving or renaming a file if it will result in overwriting an existing file.
Once you have mnamer configured to your liking you need some way to run it. Here are some on working it into your workflow:
If you are running mnamer on a Linux or Unix based machine then using cron jobs can be an easy way to schedule running mnamer on a given interval. For example, here's a schedule expression to run mnamer every 15 minutes:
*/15 * * * * /home/jkwill87/.local/bin/mnamer --no-guess --no-overwrite -rb /srv/downloads/television /srv/downloads/movies
For those unfamiliar with cron, here's a couple of tips:
- crontab guru is a helpful tool to properly format your cron expression
- remember to use the full path to mnamer,
which mnamer
can be helpful to find it
You can either build an image from the included Dockerfile or pull it from the Docker Hub.
From there you probably want to mount a directory to /mnt
. If the working directory has config file mnamer will use that, otherwise these can be set as part of the command.
Suppose you have some movies in /downloads/movies.
docker pull jkwill87/mnamer
docker run --rm --volume=/downloads/movies:/mnt jkwill87/mnamer
- Watching a directory using inotifywait
- If you use a torrent or NZB client it may allow you to run a script after a file is completed.