I have an ubuntu VM that I run transmission-daemon. I use transmission GUI.
Step 1: I download a torrent, and transmission downloads it to to
/mnt/media/downloads/incomplete
Step 2: when the file(s)/folder(s) are done, transmission moves it to
/mnt/media/downloads/complete
Step 3: After that, I would usually manually open filebot on my windows desktop, browse to the SMB file share for /mnt/media/downloads/complete/<tv show season> that I just downloaded, run filebot and it will fix the files inside just that 1 directory I just downloaded.
I use the following filebot preset to rename things:
{ny.removeAll(/[!?.:#]+$/)} - {s00e00} - {t.removeAll(/[!?.:#]+$/).replaceAll(/[`´‘’ʻ!?:;#]/, "")}.{vf.lower()}.{vc.lower()}
Step 4: I then manually move the folder and organize it in my plex media directory.
what I'm looking to do is automate ONLY step 3. I can edit the settings.json file on the transmission linux VM to have it run an SH script. But I'm at a bit of a loss on a few things.
Item 1: I want the input folder to be the folder that was just downloaded. I'm not interested in running filebot against an entire media archive on any kind of schedule. Thus, the "input" folder's name is dynamic and unknown until the torrent is actually completed. How do I account for this?
Item 2: I don't want the "output" folder being different. I want the files renamed inside the same folder they already exist in. Replicating exactly how it works with the filebot gui. I don't want filebot or transmission moving files around.
Item 3: here is my current arguments txt file using the @files method to call the filebot script via CLI that I'm using to try and test all this, but not sure what I need to modify to accomplish the above items.
Code: Select all
-script
fn:amc
--output
"/mnt/media/downloads/complete"
--log-file
"/home/user/amc.log"
--action
hardlink
--conflict
override
-non-strict
--def
music=n
artwork=n
--def
"seriesFormat={ny.removeAll(/[!?.:#]+$/)} - {s00e00} - {t.removeAll(/[!?.:#]+$/).replaceAll(/[`´‘’ʻ!?:;#]/, "")}.{vf.lower()}.{vc.>
--def
"ut_label=TV"
--def
"seriesDB=TheMovieDB::TV"