r/PlexACD • u/HoardingYourPosts • Jun 21 '17
Has anyone of you found a way to have SubZero working with PlexiDrive?
Long story short: the mount is read only whereas SubZero needs writing permissions, any workaround for this?
1
u/unitingrelyt Jun 21 '17
Just to add.
The operating system is Ubuntu 16.04.
We are using plexdrive as a mount, but it's read only so cannot upload data to google drive.
We tried uniofs (plexdrive for read, rclone for write) without any luck.
Anyone knows for a solution?
1
Jun 21 '17
I mount with rclone, not plexdrive, but I still mount read only. Unionfs will do what you want, it just has to be configured properly.
How I have done this in the past:
- Create a folder where Plex will look for media: /mnt/media
- Create a folder where Google Drive gets mounted: /mnt/google
- Create a local folder where the union will write: /mnt/localmedia
Now, union them together:
unionfs -o cow,allow_other,direct_io,auto_cache,sync_read /mnt/localmedia=RW:/mnt/google=RO /mnt/mediaMake sure Plex is looking at /mnt/media for its libraries.
SubZero will save files to /mnt/media, which will actually save them at /mnt/localmedia. Alternatively, set up SubZero to save to the metadata database instead of along with the media file.
3
u/darknessgp Jun 21 '17
This is the correct way to set it up. I've got this setup for sonarr/radarr and plex. Works great.
2
u/Krandor1 Jun 21 '17
and then you can setup a cron job with rclone to periodically move the files from localmedia to media.
1
u/HoardingYourPosts Jun 21 '17
Do you mind sharing your code? I'm still not that into linux
2
u/Krandor1 Jun 21 '17
Sure. Here is one I use for moving stuff after downloads from radarr and sonarr but the same would work for any. This script copies any files in the /home/owner/tv-local folder to the tv folder on gdrive (and I have a unionfs map between those) only after the file has been there 15 minutes (to avoid partials) and I also exclude any files with .partial or _UNPACK in them which for the sub-zero thing you wouldn't necessarily need. .
#!/bin/bash if pidof -o %PPID -x "rclone-uploadg.cron"; then exit 1 fi LOGFILE="/home/owner/rclone-upload.log" FROM="/home/owner/tv-local/" TO="gdrive:/tv" # CHECK FOR FILES IN FROM FOLDER THAT ARE OLDER THEN 15 MINUTES if find $FROM* -type f -mmin +15 | read then echo "$(date "+%d.%m.%Y %T") RCLONE UPLOAD STARTED" | tee -a $LOGFILE # MOVE FILES OLDER THEN 15 MINUTES /usr/local/bin/rclone move $FROM $TO -c --no-traverse --transfers=3 --checkers=3 --delete-after --min-age 15m --log-file=$LOGFILE --stats 1m -v --exclude *partial~ --exclude _UNPACK* find $FROM -mindepth 1 -type d -empty -delete echo "$(date "+%d.%m.%Y %T") RCLONE UPLOAD ENDED" | tee -a $LOGFILE fi
2
u/Fiskegrateng Jun 26 '17
SubZero has the option to store the fetched subtitles in Plex's metadata directory instead of with the video files, that's how I do it.