Linux watch folder

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
turtlejay
Posts: 20
Joined: 13 Mar 2020, 00:20

Linux watch folder

Post by turtlejay »

Hi,

I currently have a headless seedbox running remotely. In it rtorrent completes a download, then moves that file to a completed folder. what i need filebot to do is scan that folder constantly and rename the files with a hardlink to another folder where i have plex scanning and btsync sending to my local machine. I had couchpotato for years but its spotty at best and im tired of manually doing this everyday. Im happy to buy a license and support the cause if i can have someone hold my hand setting this up. Im completely newbified in linux besides basic commands]

Thanks,


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

Re: Linux watch folder

Post by rednoah »

The amc script is typically used for any kind of unattended automation, and you will find integration examples for rT as well:
viewtopic.php?f=4&t=215#p5316

i.e. you'll configure rT to call filebot on newly completed downloads, instead of watching a folder for changes (which isn't nearly as reliable as you might hope)


:idea: Note that basic Linux skills are required. Just following instructions might work if you're lucky, or it might not, and basic Linux skills will become absolutely necessary in the latter case. So be prepared for a bit of a challenge. ;)
:idea: Please read the FAQ and How to Request Help.
turtlejay
Posts: 20
Joined: 13 Mar 2020, 00:20

Re: Linux watch folder

Post by turtlejay »

I've been reading about the AMC script. Can it be made to hardlink instead of copy?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Linux watch folder

Post by rednoah »

Yes, --action duplicate (as seen in all the examples) will hardlink if possible, and copy if necessary. You can use --action hardlink to make it explicit, or fail.
:idea: Please read the FAQ and How to Request Help.
turtlejay
Posts: 20
Joined: 13 Mar 2020, 00:20

Re: Linux watch folder

Post by turtlejay »

ok i think i get the idea, can you just tell me how to tell the script what folder to look in? also, how does it know not to rename over and over as the files will be left for seeding
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Linux watch folder

Post by rednoah »

rT will pass the input folder onto our glue logic script via arguments:
https://github.com/filebot/plugins/blob ... cess.sh#L4

We use --def excludeList in our glue logic script to keep track of processed files, and that will make sure we never process the same file twice:
https://github.com/filebot/plugins/blob ... ess.sh#L11
:idea: Please read the FAQ and How to Request Help.
turtlejay
Posts: 20
Joined: 13 Mar 2020, 00:20

Re: Linux watch folder

Post by turtlejay »

ok thx.1 year license purchased.
turtlejay
Posts: 20
Joined: 13 Mar 2020, 00:20

Re: Linux watch folder

Post by turtlejay »

I decided to run in qbittorent. Heres what im tasked with. I run Medusa/SickRage as well. There are 4 categories. Movies, Kids Movies, TV Shows and Kids Shows. How would i go about doing this so when filebot is called by qbittorent everything ends up in the proper folders i.e. X:\Movies X:\Kids Movies Y:\TV Y:\Kids TV
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Linux watch folder

Post by rednoah »

You'll have to customize the glue logic script to behave differently depending on what category you're dealing with at the moment.
:idea: Please read the FAQ and How to Request Help.
turtlejay
Posts: 20
Joined: 13 Mar 2020, 00:20

Re: Linux watch folder

Post by turtlejay »

So based on what you are saying it will not recognize subfolder structure but it will know tv vs movie and create proper sub folders. Ex. X:/Media/Movies and X:/Media/TV.

Can the script call Plex for library scan?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Linux watch folder

Post by rednoah »

1.
FileBot will not recognize your subfolder structure. But you can customize your format to recognize your subfolder structure. By default, it will create Movies and TV Shows folders as defined by the {plex} default format.


2.
Yes. The amc script is well-documented in this regard.
:idea: Please read the FAQ and How to Request Help.
turtlejay
Posts: 20
Joined: 13 Mar 2020, 00:20

Re: Linux watch folder

Post by turtlejay »

Thanks! Best 6 bucks I ever spent
turtlejay
Posts: 20
Joined: 13 Mar 2020, 00:20

Re: Linux watch folder

Post by turtlejay »

@rednoah

is there any chance someone has modified this to work with the bittorrent client? it looks a lot like utorrent and qbit and the % variables are similar but not all the same
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Linux watch folder

Post by rednoah »

turtlejay wrote: 18 Mar 2020, 02:35 is there any chance someone has modified this to work with the bittorrent client? it looks a lot like utorrent and qbit and the % variables are similar but not all the same
:arrow: [qBittorrent] Setup for Windows, Linux and Mac OS X


If it's a client where there's no instructions yet, you can look at the existing ones, understand how it works, then read up on how your bittorrent client of choice works, and then apply your newfound knowledge and perhaps share it with us here. ;)
:idea: Please read the FAQ and How to Request Help.
Post Reply