Running FileBot from the console, Groovy scripting, shell scripts, etc
geekmaster1
Posts: 10 Joined: 24 Mar 2016, 08:43
Post
by geekmaster1 » 26 Jan 2020, 03:24
Is there a way to automate plex/emby on just the one folder/movie/tv show change/addition ? sort of like the way sonarr/radarr/lidarr do the 'connect' feature.
not a full scan but just the one folder
here is my:
.rtorrent.rc
Code: Select all
method.set_key=event.download.finished,filebot,"execute={/home/user/bin/rtorrent-postprocess.sh,$d.base_path=,$d.name=,$d.custom1=}"
/home/user/bin/rtorrent-postprocess.sh
Code: Select all
#!/bin/sh -xu
filebot -script fn:amc --output "/mnt/mergerfs/media/tv" --action hardlink -non-strict "/mnt/mergerfs/rtorrent/complete" --def ignore="tv-sonarr|radarr|archive" --def skipExtract=n --def deleteAfterExtract=n --def excludeList=/home/user/log/rtorrent/amc.txt --def "animeFormat=/mnt/mergerfs/media/tv//{n}/Season {s}/{n} - {s00e00} - {t}" --def extractFolder="/mnt/mergerfs/rtorrent/extracted" --def clean=y --def subtitles=en "seriesFormat=/mnt/mergerfs/media/tv/{n}{'/Season '+s}/{s+'x'}{e.pad(2)} - {t}" "movieFormat=/mnt/mergerfs/media/movies/{n} ({y})/{n} ({y})" --log-file="/home/user/log/rtorrent/amc-log.txt" &
rednoah
The Source
Posts: 23957 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 26 Jan 2020, 07:20
No, I'm not aware of there being a selective rescan feature, at least not via the API.
But if you have a 3rd party tool that can do it, then you can just use --def exec to call it.
kim
Power User
Posts: 1251 Joined: 15 May 2014, 16:17
Post
by kim » 26 Jan 2020, 18:29
maybe do a pre-filter based on xattr ?
rednoah
The Source
Posts: 23957 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 26 Jan 2020, 21:01
e.g. I mean something like this:
Code: Select all
--def exec="/path/to/add-media-file.sh {quote f}"
add-media-file.sh would then be called with the newly processed file path as first argument, with that you could then use
curl or any other 3rd party tool update plex/emby/etc with the updated files.
Alternatively,
find /media -mmin -60 is very very very fast at finding recently modified files, so although rescans in HTPC software usually takes a long time, just checking for new files really should not.