Having trouble creating a script linux and FTP

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Night-Man
Posts: 8
Joined: 23 Jan 2014, 05:56

Having trouble creating a script linux and FTP

Post by Night-Man »

So I have a script that syncs my files, via lftp, from my seedbox running rtorrent. It syncs the "complete" folder which contains a folder for movies, tv, music, and general. I want filebot to rename and move the movies and tv into their respective folders on my external hard drive, delete the downloaded files, and leave the music and general alone. I'd also like it to extract rar files it it encounters them and delete those after it has moved the files.

So I need help creating a script for filebot to do those things. I'm going to call the filebot script from my syncing script to run when it's finished downloading.

I took a look at this thread http://www.filebot.net/forums/viewtopic.php?t=215 but I'm a bit confused because the linux script seems to be calling variables from transmission which won't work in my case. I'm also unsure of how to follow the S01E01 format for tv shows, except for shows like the Daily Show and Colbert Report which I would prefer the airdate format.

I would really appreciate any help.

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

Re: Having trouble creating a script linux and FTP

Post by rednoah »

Run from cmdline:
Want to try it out first? Running directly from cmdline is even easier and if you set --action test you can do a dry-run and see if everything gets matched up correctly:

Code: Select all

filebot -script fn:amc --output "/path/to/output" --action copy -non-strict "/path/to/input" --def excludeList=amc.txt
Here's a video tutorial for that.
It's a simple cmdline call, what makes you think it only works if called from Deluge? The Deluge script is one line of glue logic, and it works for many tools on many systems cause it really just is a simple cmdline tool.
:idea: Please read the FAQ and How to Request Help.
Night-Man
Posts: 8
Joined: 23 Jan 2014, 05:56

Re: Having trouble creating a script linux and FTP

Post by Night-Man »

Well I was confused by the

Code: Select all

"ut_dir=$TORRENT_PATH/$TORRENT_NAME" "ut_kind=multi" "ut_title=$TORRENT_NAME"
But I suppose that is just telling filebot what files to process.

And I assume I can use the exclude list to run two different commands, one with the Daily Show and Colbert Report excluded and --order Absolute, and then one with only those two and --order Airdate. Is that the best way to do it? How to could I exclude every show except the Daily Show and Colbert Report on the second command?
EDIT: Never mind I see that the exclude list is to keep a list of already processed files. So how would I manage the --order? By not including the option will it decide automatically?


Also will running that command put them in their repective movies and tv folders on my hard drive? i.e. a Daily Show downloaded to /home/user/ftp/tv will be sorted into /media/externalhdd/tv/Daily\ Show ?
EDIT AGAIN:Ok I see it goes into the folder TV Shows by default which is fine. And I can live without the Daily/Colbert going by airdate.

And if I --action move the files and --def deleteAfterExtract=y there's no need for an exclude list, right?
Last edited by Night-Man on 23 Jan 2014, 18:50, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Having trouble creating a script linux and FTP

Post by rednoah »

excludeList just keeps track of files that have been processed already, so files will never be touched more than once, since you plan on running it over and over on the same folder and files.

If you want to ignore files you can specify an ignore pattern like this --def "ignore=daily.show" but I don't think you'll need that.

Actually I don't understand the issue. :lol: Movies will be processed as specified by movieFormat, any series will be processed as specified by the seriesFormat. The whole premise of amc is to do exactly that. Go watch the video tutorial.

Have you ever tried just running it on a bunch of files and see what happens???
if you set --action test you can do a dry-run

EDIT:
--order is not about airdate VS sxe VS absolute number but rather SxE numbers by Airdate order, SxE numbers by DVD order, SxE numbers by Absolute Order. No matter what --order you select the airdate for each episode is always the same.

If you want to name some episodes with {sxe} and others with {airdate} you'll need to start playing with the format expressions.
:idea: Please read the FAQ and How to Request Help.
Night-Man
Posts: 8
Joined: 23 Jan 2014, 05:56

Re: Having trouble creating a script linux and FTP

Post by Night-Man »

I think I've got it figured out. Thanks for you're help.
Night-Man
Posts: 8
Joined: 23 Jan 2014, 05:56

Re: Having trouble creating a script linux and FTP

Post by Night-Man »

One more question, what does --action keeplink do?
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Having trouble creating a script linux and FTP

Post by rednoah »

* Move file + Create symlink to the new location at the original location
:idea: Please read the FAQ and How to Request Help.
Post Reply