multi volume sorting

Any questions? Need some help?
Post Reply
elgallo
Posts: 40
Joined: 29 Apr 2014, 10:33

multi volume sorting

Post by elgallo »

I'm using a Mac Mini, Plex, Filebot, Flexget (tv series) Couchpotato (movies) Headphones (music) currently my setup is as follows

Code: Select all

\#!/bin/bash
/Applications/Filebot.app/Contents/MacOS/filebot.sh -script fn:amc --output "/Volumes/Media/Incomplete/complete" --log-file amc.log --action copy  --conflict auto -non-strict --def deleteAfterExtract=y music=y plex=gallo artwork=n subtitles=en clean=y "ut_dir=/Volumes/Media/Incomplete/complete/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME" "seriesFormat=/Volumes/Media/TV/{n.replaceTrailingBrackets().sortName()}/Season {s}/{n.replaceTrailingBrackets()} -S{s}E{e.pad(2)} [{vf},{af}]-{t}" "movieFormat=/Volumes/Video/M0vies/{n.sortName()} ({y}) [{certification}] [{vf}-{af}]" "musicFormat=~/Downloads/[{pi.pad(2)}] {artist} -{album}-{t}"
Currently I have flexget, couchpotato and headphones all downloading automatically via transmission into the default download folder which is "/Volumes/Media/Incomplete" filebot then COPY Movies/Music/Series into their appropriate location (on three separate volumes). due to decreasing space I would like to LINK to conserve space and maintain seeding.

I would like to switch from --action copy to --action link HOWEVER I do understand that LINK will ONLY work on the same /Volume that the original file is on. Therefor I imagine that filebot with a postprocess script can be tweaked to work this way. what I imagine is

TV Series - Movies- Music

Code: Select all

\#!/bin/bash
/Applications/Filebot.app/Contents/MacOS/filebot.sh -script fn:amc --output "/Volumes/A/TV" --log-file amc.log --action LINK --def * "ut_dir=/Volumes/A/Download/$TR_TORRENT_NAME" "ut_kind=mulit" "ut_title=$TR_TORRENT_NAME" "seriesFormat=/Volumes/Media/TV/{n.replaceTrailingBrackets().sortName()}/Season {s}/{n.replaceTrailingBrackets()} -S{s}E{e.pad(2)} [{vf},{af}]-{t}"

 --output "/Volumes/B/M0vies" --log-file amc.log --action LINK --def * "ut_dir=/Volumes/A/Download/$TR_TORRENT_NAME" "ut_kind=mulit" "ut_title=$TR_TORRENT_NAME" "movieFormat=/Volumes/Video/M0vies/{n.sortName()} ({y}) [{certification}] [{vf}-{af}]"

--output "~/Torrent" --log-file amc.log --action COPY --def * "ut_dir=/Volumes/A/Download/$TR_TORRENT_NAME" "ut_kind=mulit" "ut_title=$TR_TORRENT_NAME" "musicFormat=~/Download/[{pi.pad(2)}] {artist} -{album}-{t}" 
where I (imagine) I'm telling postprocess if file is in Volume A it is TV and should be linked renamed and sorted within Volume A to folder /TV into .../TV/Series/Season#/Series SxEy [resolution,channels]-title
if file is on volume B it is a Movie link and rename within Volume B to folder /M0vies sorted into /M0vies/movie name (year) [rating]/etc and finally files downloaded to my home folder/Torrent is music and sorted into download folder.
User avatar
rednoah
The Source
Posts: 23004
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: multi volume sorting

Post by rednoah »

--action HARDLINK => hardlink files, i.e. have 2 files that refer to the same data on the same filesystem / disk

--action SYMLINK => symlink files, i.e. the target files is merely a symbolic link (a file that contains a path to another file which may be on another volume)

--action DUPLICATE => hardlink if possible, copy if necessary


Even though you must define --output but your format may define an absolute path so the output path / volume is completely up to you if you so chose.

I'd do it like this:

Code: Select all

--output "/Volumes" --def seriesFormat="A/TV/..." movieFormat="B/MOV/..." "musicFormat=/Users/Me/Music/..."
On your format you also have full access to the original path. So you have enough information to make it go to the same volume in your format.


PS: --output "~/Torrent" is not what you think it is
:idea: Please read the FAQ and How to Request Help.
elgallo
Posts: 40
Joined: 29 Apr 2014, 10:33

Re: multi volume sorting

Post by elgallo »

thanks rednoah!

how can I define the input? meaning I can write the settings in flexget to download TV series into /Volumes/A/
couchpotato into /Volumes/B/ and headphones to download into /Users/me/Music/.

however how do I get the transmission postprocess to read/see the files in those locations?
User avatar
rednoah
The Source
Posts: 23004
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: multi volume sorting

Post by rednoah »

All to format define OUTPUT location and have nothing to do with the INPUT location, which is defined by ut_dir which is in turned passed in from your cmdline.

It looks like you expect files to be downloaded here:

Code: Select all

"ut_dir=/Volumes/Media/Incomplete/complete/$TR_TORRENT_NAME"
Make absolutely sure that $TR_TORRENT_NAME is not empty so that it won't process your entire complete folder each and every time. That would get you banned.


As for how to write a smarter format you will find many examples in the forums here:
viewtopic.php?f=5&t=2

The example "Organize movies into folders but keep files on the same drive" is for Windows but I'm sure you'll get the idea.

This very recent thread shows another approach that might inspire you:
http://www.filebot.net/forums/viewtopic ... 063#p11859
:idea: Please read the FAQ and How to Request Help.
elgallo
Posts: 40
Joined: 29 Apr 2014, 10:33

Re: multi volume sorting

Post by elgallo »

can postprocess handle transmission labels/groups? what I'd like to do, due to low disk space, download to
TV series to /Volumes/Media/TV
Movies to /Volumes/Video/Movies
Music to /Users/me/Downloads

Granted Transmission can only have ONE default download location with a subfolder or alternate for incomplete files. however flexget, couchpotato, headphones can set a different download path. and transmission can auto sort into a different location based on criteria of the downloaded file. such as comics (cbr), books (epubs) are saved elsewhere based on their extensions.

in other words can filebot Postprocess from three separate inputs? telling filebot to look for

Code: Select all

"ut_dir=/Volumes/Media/Incomplete/complete" | "ut_dir=/Volumes/Video/Downloads/complete" | "ut_dir=/Users/me/Downloads"

presuming cmdline/postprocess will see pipes = "OR"
User avatar
rednoah
The Source
Posts: 23004
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: multi volume sorting

Post by rednoah »

What you want is not easy to do because Transmission doesn't pass on where the files actually are. You could have your own script first that'll figure that out either by talking to Transmission or by guess guessing where files might be.

Alternatively you could use into simple cmdline usage of the AMC script where you can just pass multiple file arguments like with any other cmdline tool. But then you absolutely have to make sure that you're NOT reprocessing over and over files by setting up --def amc.excludes correctly. You will get banned if you waste 3rd party webservices.
:idea: Please read the FAQ and How to Request Help.
Post Reply