Sparkum

Plexdrive

42 posts in this topic Last Reply

Recommended Posts

I've created a plexdrive plugin that uses pre release builds. The reason for this is the release version (version 4) have problem with network causing playback problems for me.

I've tested the pre release builds and find it have solved the network problem. I dont know exactly what, but the problems I had before has vanished. I've just test the pre relase builds for few weeks only and so far no problem. Yours may vary. 

 

If anyone interested(or care), you can grab the plugin here. It is based on starbix release. But uses prerelease builds instead of release.

 

Quote

 

Thanks.

Share this post


Link to post

Hey, I'm still abroad, so I can't test it.

But I also added plexdrive5, so you can also use mine, I also removed mongodb as plexdrive5 won't use mongodb anymore :)

Share this post


Link to post
On 7/30/2017 at 3:01 PM, starbix said:

Hey, I'm still abroad, so I can't test it.

But I also added plexdrive5, so you can also use mine, I also removed mongodb as plexdrive5 won't use mongodb anymore :)

With this I get:

unknown shorthand flag: 't' in -t

The command looks like:

plexdrive -t /mnt/user/appdata/plexdrive/tmp -c /mnt/user/appdata/plexdrive -o allow_other /mnt/disks/plexdrive/ &

EDIT

I think `-t` is deprecated. Removed that part and command now runs fine. Thanks for the update!

Edited by d2dyno

Share this post


Link to post

With the new stable 5.0.0, you need to include 'mount'. IE: 

plexdrive mount -c /mnt/user/appdata/plexdrive -o allow_other /mnt/disks/plexdrive/ &

 

Share this post


Link to post

Thank you for the feedback! I removed the plexdrive bash script alltogether and executing plexdrive will now just be the normal binary.

  • Upvote 1

Share this post


Link to post
On 8/5/2017 at 8:52 AM, starbix said:

Thank you for the feedback! I removed the plexdrive bash script alltogether and executing plexdrive will now just be the normal binary.

I do not see an update available for the plugin?

Share this post


Link to post
On 5/27/2017 at 4:22 PM, starbix said:

Hey I wrote a plexdrive plugin. Here it is: https://raw.githubusercontent.com/Starbix/unRAID-plugins/master/plugins/plexdrive.plg

 

I'm totally new to plugin writing, but I also have a unionfs plugin if anyone else is interested.

 

Hopefully it works for you guys

Hi 

 

I just tried installing this for the first time and I'm getting this error when I try to install:

 

plugin: installing: https://raw.githubusercontent.com/Starbix/unRAID-plugins/master/plugins/plexdrive.plg
plugin: downloading https://raw.githubusercontent.com/Starbix/unRAID-plugins/master/plugins/plexdrive.plg
plugin: downloading: https://raw.githubusercontent.com/Starbix/unRAID-plugins/master/plugins/plexdrive.plg ... done

Warning: simplexml_load_file(): I/O warning : failed to load external entity "/boot/config/plugins/plexdrive.plg" in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 216
plugin: xml parse error

Help please.  Great guide here btw - I'm working my way through it now https://blog.laubacher.io/blog/unlimited-plex-server-on-unraid

Share this post


Link to post

ok, I've got it all working - it helped that I finally worked out how plexdrive works ;-) 

 

@starbix your uploadscript on https://blog.laubacher.io/blog/unlimited-plex-server-on-unraid is using the wrong crypt - it should be uploadcrypt not gdrivecrypt.

 

@Sparkum can I get some pointers on how you added a temp folder please.  Here's my mount script - I'm not sure how to modify it:

mkdir -p /mnt/disks/pd
mkdir -p /mnt/disks/crypt

#This section mounts the various cloud storage into the folders that were created above.
if [[ -f "/mnt/disks/crypt/mountcheck" ]]; then
echo "$(date "+%d.%m.%Y %T") INFO: Check successful, crypt mounted."
exit
else
echo "$(date "+%d.%m.%Y %T") ERROR: Drive not mounted, remount in progress."
# Unmount before remounting
fusermount -uz /mnt/disks/crypt
fusermount -uz /mnt/disks/pd
/mnt/cache/appdata/plexdrive/plexdrive mount /mnt/disks/pd -c "/mnt/user/appdata/plexdrive" -o allow_other -v 2 &
rclone mount --max-read-ahead 512M --allow-other --allow-non-empty -v --buffer-size 1G gdrivecrypt: /mnt/disks/crypt &
if [[ -f "/mnt/disks/crypt/mountcheck" ]]; then
echo "$(date "+%d.%m.%Y %T") INFO: Remount successful."
else
echo "$(date "+%d.%m.%Y %T") CRITICAL: Remount failed."
fi
fi
exit

Edit: just seen in an earlier post that -t is depreciated now

Edited by DZMM

Share this post


Link to post

My syslog is getting flooded with these entries every minute:

 

Mar  7 07:47:17 Highlander emhttpd: error: get_filesystem_status, 6475: Operation not supported (95): getxattr: /mnt/user/movies_adults_fuse
Mar  7 07:47:17 Highlander emhttpd: error: get_filesystem_status, 6475: Operation not supported (95): getxattr: /mnt/user/movies_kids_fuse
Mar  7 07:47:17 Highlander emhttpd: error: get_filesystem_status, 6475: Operation not supported (95): getxattr: /mnt/user/tv_adults_fuse
Mar  7 07:47:17 Highlander emhttpd: error: get_filesystem_status, 6475: Operation not supported (95): getxattr: /mnt/user/tv_kids_fuse

Anybody else having this problem?  Here's my fuse commands (I'm using unionfs from nerd pack):

 

if [[ -f "/mnt/user/tv_adults_fuse/mountcheck" ]] && [[ -f "/mnt/user/tv_kids_fuse/mountcheck" ]] && [[ -f "/mnt/user/movies_adults_fuse/mountcheck" ]] && [[ -f "/mnt/user/movies_kids_fuse/mountcheck" ]]; then
echo "$(date "+%d.%m.%Y %T") INFO: Check successful, Series and Movies fuse mounted."
exit
else

echo "$(date "+%d.%m.%Y %T") ERROR: Series and Movies not mounted, remount in progress."

# Unmount before remounting
fusermount -uz /mnt/user/tv_adults_fuse
fusermount -uz /mnt/user/tv_kids_fuse
fusermount -uz /mnt/user/movies_adults_fuse
fusermount -uz /mnt/user/movies_kids_fuse
unionfs -o cow,allow_other,direct_io,auto_cache,sync_read /mnt/user/tv_adults_upload=RW:/mnt/disks/crypt/tv_adults_gd=RO /mnt/user/tv_adults_fuse
unionfs -o cow,allow_other,direct_io,auto_cache,sync_read /mnt/user/tv_kids_upload=RW:/mnt/disks/crypt/tv_kids_gd=RO /mnt/user/tv_kids_fuse
unionfs -o cow,allow_other,direct_io,auto_cache,sync_read /mnt/user/movies_adults_upload=RW:/mnt/disks/crypt/movies_adults_gd=RO /mnt/user/movies_adults_fuse
unionfs -o cow,allow_other,direct_io,auto_cache,sync_read /mnt/user/movies_kids_upload=RW:/mnt/disks/crypt/movies_kids_gd=RO /mnt/user/movies_kids_fuse
if [[ -f "/mnt/user/tv_adults_fuse/mountcheck" ]] && [[ -f "/mnt/user/tv_kids_fuse/mountcheck" ]] && [[ -f "/mnt/user/movies_adults_fuse/mountcheck" ]] && [[ -f "/mnt/user/movies_kids_fuse/mountcheck" ]]; then
echo "$(date "+%d.%m.%Y %T") INFO: Remount of Series and Movies successful."
else
echo "$(date "+%d.%m.%Y %T") CRITICAL: Remount failed."
fi
fi

 

Share this post


Link to post
10 minutes ago, Dimtar said:

Did you get any further @DZMM

yeah, it was because I was putting my shares in mnt/user - moved to mnt/disks

Share this post


Link to post
Posted (edited)

Mounted plexdrive with my gdrive inside.

 

I can go to my plex drive mount, which has my "secure" folder in it from my rclone mount. since this is obscured, will this cause a problem for Plex? if so, how can I go about it, so this ISNT hidden filenames?

 

EDIT:

 

Tried to follow the above guide, created a new rclone mount as the plex drive location with same KEYs/passwords, not my plexdrive mount is empty wont even show my gdrive information. 

 

Now I have a plex drive mount with the secure folder with NOTHING inside...

 

I then have a decrypt mount of THAT folder, with nothing in side...do I just have to wait for it to cache everything for it to show up?

Edited by Nyghthawk

Share this post


Link to post
On 3/27/2018 at 6:42 AM, Nyghthawk said:

Mounted plexdrive with my gdrive inside.

 

I can go to my plex drive mount, which has my "secure" folder in it from my rclone mount. since this is obscured, will this cause a problem for Plex? if so, how can I go about it, so this ISNT hidden filenames?

 

EDIT:

 

Tried to follow the above guide, created a new rclone mount as the plex drive location with same KEYs/passwords, not my plexdrive mount is empty wont even show my gdrive information. 

 

Now I have a plex drive mount with the secure folder with NOTHING inside...

 

I then have a decrypt mount of THAT folder, with nothing in side...do I just have to wait for it to cache everything for it to show up?

Not sure what's gone wrong, but this is how I'm setup

 

  1. Created a gdrive mount with rclone
  2. then mounted that gdrive mount using plexdrive with the same clientID and ClientSecret as 1
  3. Then created a crypt at gdrive:crypt and an rclone upload to crypt:tv shows and crypt:movies.  In your plexdrive mount you will now see the encrypted movies and tv_shows folders
  4. Now create a new remote with the remote set as remote = /mnt/disks/pd/crypt (or wherever you have your plexdrive mounted) using the same passwords you used for 3.  This is the folder that you point plex at (RO)

Share this post


Link to post
Posted (edited)

Just wanted to share something useful I found this afternoon.  I was struggling to get my head around what happens when sonarr/radarr etc delete or upgrade files and I learnt from this post https://enztv.wordpress.com/2017/03/09/unionfs-cleanup/ that UnionFS cleverly hides the files from the fusemount, but doesn't actually delete them on google drive. i.e. if you mounted gd on another system (or had to rebuild your sonarr/radarr library) you'd suddenly find lots of old files being picked up - nightmare!

 

To actually delete the files on gd and to avoid potential conflicts from identical filenames existing, I've added this script to radarr and sonarr so that if existing media changes, then the old copies are deleted from gd as well during post-processing, as well as in an overnight script just to make sure.  To do this I created another mount of my gd at mnt/disks/google_decrypt (mnt/disks/pd_decrypt is what I use for my decrypted plexdrive) for the script to actually delete files from gd.

 

#!/bin/bash

###########TV_KIDS##############

find /mnt/disks/fusion/tv_kids_fuse/.unionfs -name '*_HIDDEN~' | while read line; do
oldPath=${line#/mnt/disks/fusion/tv_kids_fuse/.unionfs}
newPath=/mnt/disks/google_decrypt/tv_kids_gd${oldPath%_HIDDEN~}
rm "$newPath"
rm "$line"
done
find "/mnt/disks/fusion/tv_kids_fuse/.unionfs" -mindepth 1 -type d -empty -delete

###########TV_ADULTS##############

find /mnt/disks/fusion/tv_adults_fuse/.unionfs -name '*_HIDDEN~' | while read line; do
oldPath=${line#/mnt/disks/fusion/tv_adults_fuse/.unionfs}
newPath=/mnt/disks/google_decrypt/tv_adults_gd${oldPath%_HIDDEN~}
rm "$newPath"
rm "$line"
done
find "/mnt/disks/fusion/tv_adults_fuse/.unionfs" -mindepth 1 -type d -empty -delete

###########movies_KIDS##############

find /mnt/disks/fusion/movies_kids_fuse/.unionfs -name '*_HIDDEN~' | while read line; do
oldPath=${line#/mnt/disks/fusion/movies_kids_fuse/.unionfs}
newPath=/mnt/disks/google_decrypt/movies_kids_gd${oldPath%_HIDDEN~}
rm "$newPath"
rm "$line"
done
find "/mnt/disks/fusion/movies_kids_fuse/.unionfs" -mindepth 1 -type d -empty -delete

###########movies_ADULTS##############

find /mnt/disks/fusion/movies_adults_fuse/.unionfs -name '*_HIDDEN~' | while read line; do
oldPath=${line#/mnt/disks/fusion/movies_adults_fuse/.unionfs}
newPath=/mnt/disks/google_decrypt/movies_adults_gd${oldPath%_HIDDEN~}
rm "$newPath"
rm "$line"
done
find "/mnt/disks/fusion/movies_adults_fuse/.unionfs" -mindepth 1 -type d -empty -delete

exit

 

Edited by DZMM

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Copyright © 2005-2018 Lime Technology, Inc.
unRAID® is a registered trademark of Lime Technology, Inc.