Sparkum Posted May 25, 2017 Share Posted May 25, 2017 Hey all. A plugin for plexdrive I think would be awesome, its a twist to rclone that helps to avoid the APi bans. Quote Link to comment
airbillion Posted May 26, 2017 Share Posted May 26, 2017 Agreed.. This would be great for mounting gdrive accounts for Plex...Sent from my ONEPLUS A3000 using Tapatalk Quote Link to comment
starbix Posted May 27, 2017 Share Posted May 27, 2017 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 1 1 Quote Link to comment
Sparkum Posted May 29, 2017 Author Share Posted May 29, 2017 On 5/27/2017 at 9:22 AM, 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 Hey Starbix. I would love your unionfs plugin as well. Figuring it out is another thing but I would appreciate it for sure. And thanks for your first plugin! Quote Link to comment
starbix Posted May 29, 2017 Share Posted May 29, 2017 (edited) Here's the unionfs plugin: https://raw.githubusercontent.com/Starbix/unRAID-plugins/master/plugins/unionfs.plg Oh and does it work for you? Join the plex discord if you want to, I can help there Edited May 29, 2017 by starbix 1 Quote Link to comment
airbillion Posted May 31, 2017 Share Posted May 31, 2017 Can anyon give a tutorial on how the plexdrive pluin works? I installed it, but cannot et it to run. Thanks! Quote Link to comment
Sparkum Posted May 31, 2017 Author Share Posted May 31, 2017 On 5/29/2017 at 0:00 PM, starbix said: Here's the unionfs plugin: https://raw.githubusercontent.com/Starbix/unRAID-plugins/master/plugins/unionfs.plg Oh and does it work for you? Join the plex discord if you want to, I can help there Thanks for your plugins got plexdrive all up and running! Quote Link to comment
Sparkum Posted May 31, 2017 Author Share Posted May 31, 2017 6 minutes ago, airbillion said: Can anyon give a tutorial on how the plexdrive pluin works? I installed it, but cannot et it to run. Thanks! The plugin places the file "plexdrive" in the /usr/sbin/ folder, so you would just run your command pointing at that. I just spent like a week hitting my head against a wall so let me know if you want more details on how I got plexdrive working A-Z Quote Link to comment
airbillion Posted May 31, 2017 Share Posted May 31, 2017 (edited) OK...I found it and got it to run...thanks... Any additional help on how you have it set up would be great! Edited May 31, 2017 by airbillion Quote Link to comment
Sparkum Posted May 31, 2017 Author Share Posted May 31, 2017 (edited) 25 minutes ago, airbillion said: OK...I found it and got it to run...thanks... Any additional help on how you have it set up would be great! Alright now please take everything I have as a guideline cause I may have set it up all wrong or not in an "optimized way" but hey, it works! Alright I also did stuff over a period so prob some stuff in stupid ways, I'm also going to assume you have your drives mounted with rclone, additionally I did not encrypt, its esentially the same just point to your encrypted folders. create a google API key? or whatever its called, google that. -Created a folder in appdata called "plexdrive" -created a folder in there called "tmp" -I copied plexdrive from starbix's plugin into the plexdrive folder, and called it "plexdrive" (additionally could just install it from plexdrive github, this was one of those things that when I started I didnt know) -chmod -755 /mnt/user/appdata/plexdrive/plexdrive -create a file in your plexdrive folder called "config.json" and in it put your client ID and secret from google API { "clientId": "ID goes here", "clientSecret": "Client Secret goes here" } So you should now have a folder /mnt/user/appdata/plexdrive and inside it should be the file plexdrive and config.json and the folder tmp then here are my mounting scripts /mnt/user/appdata/plexdrive/plexdrive -o allow_other -c /mnt/user/appdata/plexdrive -t and /mnt/user/appdata/plexdrive/tmp /mnt/disks/plxdrive/ & That should get you a working plexdrive, mine mounts to /mnt/disks/plxdrive And here is my rclone mount for my google drive so I can access it outside of plexdrive's read only. rclone mount --allow-other --allow-non-empty plexdrive:/ /mnt/disks/plexdrive/ & So at this point you should have a fully working plexdrive (read only) and a read/write google drive Add these to your SMB [plexdrive] path = /mnt/disks/plxdrive comment = browseable = yes # Public public = yes writeable = yes vfs objects = [plexdriveRW] path = /mnt/disks/plexdrive comment = browseable = yes # Public public = yes writeable = yes vfs objects = To easily wrose your folders. And then (if you wish) your gonna want to make a union mount so that plex will see local and cloud data as the same. So for me I make a folder: /mnt/user/Media/Plex/TV (this folder was empty when I started) I created a new folder in disks /mnt/disks/plexdriveunion/ And then I merged those 2 and my plxdrive all together I installed starbix's union plugin but I also went to the nerdpack plugin and installed fuse that way. unionfs -o cow,allow_other /mnt/user/Media/Plex/=RW:/mnt/disks/plxdrive/Media/Plex/=RO /mnt/disks/plexdriveunion/ & So now your /mnt/disks/plexdriveunion folder will have some data in it. Add SMB [plexdriveunion] path = /mnt/disks/plexdriveunion comment = browseable = yes # Public public = yes writeable = yes vfs objects = Your /mnt/user/media/Plex/TV folder will now have a hiiden folder in it. Point everything, plex, sonarr, etc to /mnt/disks/plexdriveunion and off you go, they will try to write to your local copy and then you simply rclone to the cloud. I'm personally using rclone move --transfers 10 --exclude .unionfs/** --min-age 30d /mnt/user/Media/Plex/TV/Adult plexdrive:/Media/Plex/TV/Adult Sorry this jumps all over the place but hopefully it poitns you in the right direction, feel free to ask follow up questions. Edited May 31, 2017 by Sparkum 2 Quote Link to comment
airbillion Posted May 31, 2017 Share Posted May 31, 2017 Awesome! Thanks for the writeup....I will give this a shot tonight and see if I can get it to work... Quote Link to comment
Aric Posted June 10, 2017 Share Posted June 10, 2017 Just found this thread. I too am looking at the plexdrive but what about now that its been updated to version 4 and needs the mongodb Quote Link to comment
starbix Posted June 13, 2017 Share Posted June 13, 2017 You can use plexdrive4.plg instead of plexdrive.plg. Please report back how it works. Quote Link to comment
thomast_88 Posted June 13, 2017 Share Posted June 13, 2017 I'll wire this together in a docker container later this week... 1 Quote Link to comment
publicENEMY Posted June 16, 2017 Share Posted June 16, 2017 (edited) Fixed mongodb links at plexdrive4.plg. Created pull request. https://github.com/syaifulnizamyahya/unRAID-plugins/commit/fdca6a282d6cc9a498e00cf6b4716bd1f7464e2f In the mean time, use this link to install https://raw.githubusercontent.com/syaifulnizamyahya/unRAID-plugins/master/plugins/plexdrive4.plg Thanks. Edited June 16, 2017 by publicENEMY Quote Link to comment
publicENEMY Posted June 17, 2017 Share Posted June 17, 2017 Somethings is wrong with the script. mongodb is not installed Quote Link to comment
publicENEMY Posted June 17, 2017 Share Posted June 17, 2017 By the way, where can I view plugins installation logs? Quote Link to comment
jjdunkel Posted June 21, 2017 Share Posted June 21, 2017 Just trying to clarify before switching plugins, is either or both of the plexdrive 4 plugins working (starbix's or publicENEMY's)? Thanks in advance. Quote Link to comment
jjdunkel Posted June 22, 2017 Share Posted June 22, 2017 Well, I started playing around and it looks like mongodb is installed but needs a command like mongod --dbpath /mnt/user/appdata/plexdrive/ to start mongodb. I don't know if this would best be done in the mount script or user script scheduled at array startup, etc. Quote Link to comment
starbix Posted June 29, 2017 Share Posted June 29, 2017 (edited) I just run this script all 5 mins together with the plexdrive stuff (which checks if it's still mounted) if [[ -s "/mnt/user/appdata/plexdrive/mongodb/mongod.lock" ]]; then echo "mongodb already started" else mongod --dbpath /mnt/user/appdata/plexdrive/mongodb & fi Oh and the plexdrive4 plugin should work, if not please create an issue on github. Edited June 29, 2017 by starbix Quote Link to comment
d2dyno Posted July 6, 2017 Share Posted July 6, 2017 I'm having an issue with the plugin, where when I reboot my server, the mongod.lock file is left in place, with the wrong process number. Thus, when system starts again, it things mongodb is already running (via script above from starbix), but it can't actually find the process/connect to it. Maybe we can incorporate some sort of cleaning into the plugin, upon system shutdown? Quote Link to comment
jjdunkel Posted July 6, 2017 Share Posted July 6, 2017 I did mine a little different, I have: nohup /usr/bin/mongod --dbpath /mnt/user/appdata/plexdrive/mongodb/ & in the beginning of my rclone mount script (which I run at array start), and /usr/bin/mongod --dbpath /mnt/user/appdata/plexdrive/mongodb/ --shutdown in my rclone unmount script (which I run at array stop). This line shuts down mongodb cleanly 1 Quote Link to comment
d2dyno Posted July 6, 2017 Share Posted July 6, 2017 4 hours ago, jjdunkel said: I did mine a little different, I have: nohup /usr/bin/mongod --dbpath /mnt/user/appdata/plexdrive/mongodb/ & in the beginning of my rclone mount script (which I run at array start), and /usr/bin/mongod --dbpath /mnt/user/appdata/plexdrive/mongodb/ --shutdown in my rclone unmount script (which I run at array stop). This line shuts down mongodb cleanly Perfect! I'll incorporate the shutdown of array script then, thanks for providing it! On 6/29/2017 at 2:36 PM, starbix said: I just run this script all 5 mins together with the plexdrive stuff (which checks if it's still mounted) if [[ -s "/mnt/user/appdata/plexdrive/mongodb/mongod.lock" ]]; then echo "mongodb already started" else mongod --dbpath /mnt/user/appdata/plexdrive/mongodb & fi Oh and the plexdrive4 plugin should work, if not please create an issue on github. Mind sharing your script that runs every 5 minutes to check on mounts? Thanks for the plugin too! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.