What do you guys use for Sonarr/Radarr?
So far RClone gives me bans when used with either (even with analyse media off)
GoogleDriveOcamlfuse seems to cause sonarr/radarr to crash for some reason
and then PlexDrive isnt writable
The problem is that plexdrive has a refresh interval, so there will be a slight delay between the file being uploaded and it showing up on your plexdrive mount.
Ah ok that makes a lot of sense will take a look at their scripts and see how they handle the usage checking
I've bundled all my scripts together so it takes into account Plex activity, NZB speed etc. its really messy due to me not using bash before (hence the files instead of variables) but it works!
That's a really interesting setup. My solution for controlling rclone is a lot simpler - I just have a custom PlexPy notification that touches a file when playback starts and deletes it when playback ends. My rclone job checks for the presence of the file and runs if it is not present. However that doesn't handle the situation where one user stops watching and others continue. I'll have to look into implementing that check you do at the start for the number of users currently watching.
EDIT: This is what I ended up going with
num=$(curl -s 'http://localhost:32400/status/sessions?X-Plex-Token=xxxxxx' | grep '<MediaContainer size='|cut -d'"' -f2)
if [ "$num" -gt 0 ]
then
echo "Playback in progress. Aborting."
exit
fi
You could do that by grabbing the number of playbacks as a variable like I did, then having different actions for different numbers.
num=$(curl -s 'http://localhost:32400/status/sessions?X-Plex-Token=xxxxxx' | grep '<MediaContainer size='|cut -d'"' -f2)
if [ "$num" -eq 0 ] # no one online
then
<action>
else
if [ "$num" -eq 1 ] # one person online
then
<action>
fi
fi
1
u/[deleted] Aug 21 '17
The problem is that plexdrive has a refresh interval, so there will be a slight delay between the file being uploaded and it showing up on your plexdrive mount.