I know AMC has native support for updating the plex library automatically, but unfortunately, that only uses HTTP (not HTTPS - so I have to configure plex to Prefer secure connections, instead of require them). On top of this, filebot is requesting an update of ALL libraries, instead of a specific library. With my collection that can take upwards of 5-7 minutes to finish scanning. I was hoping that we could update AMC to provide additional arguments for the respective plex libraries. Filebot already knows if something is a Movie/TV/Anime, so it shouldn't be too hard to only update that specific library.
I have manged to implement this functionality myself in my bash script, but I was hoping to have it become native as that is superior to my grep checks.
Code: Select all
#!/bin/bash
FILE_PATH=$1
filebot -script fn:amc \
-no-xattr \
--output "/home/user/Share" \
--log-file amc.log \
--action copy \
--conflict auto \
-non-strict \
"$FILE_PATH" \
--filter "!readLines('''/home/user/.filebot/filter.txt''').contains(n)" \
--def @/home/user/.filebot/args.txt
&&
if echo $FILE_PATH | grep -Eq 'Downloads/Movies|Share/Movies'; then
exec curl --insecure https://<plex_host>:<plex_port>/library/sections/1/refresh?X-Plex-Token=<plex-api-token>
elif echo $FILE_PATH | grep -Eq 'Downloads/TV|Share/TV'; then
exec curl --insecure https://<plex_host>:<plex_port>/library/sections/2/refresh?X-Plex-Token=<plex-api-token>
elif echo $FILE_PATH | grep -Eq 'Downloads/Anime|Share/Anime'; then
exec curl --insecure https://<plex_host>:<plex_port>/library/sections/12/refresh?X-Plex-Token=<plex-api-token>
fi
Here is my args.txt file
Code: Select all
music=n
clean=y
artwork=n
extras=n
unsorted=n
pushover=<key>:<token>
subtitles=en
musicFormat=Music/{n}/{album+'/'}{pi.pad(2)+' - '}{artist} - {t}
seriesFormat=TV/{plex.tail}
movieFormat={plex}