May 25, 20179 yr Hey all. A plugin for plexdrive I think would be awesome, its a twist to rclone that helps to avoid the APi bans.
May 26, 20179 yr Agreed.. This would be great for mounting gdrive accounts for Plex...Sent from my ONEPLUS A3000 using Tapatalk
May 27, 20179 yr 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
May 29, 20179 yr Author 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!
May 29, 20179 yr 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, 20179 yr by starbix
May 31, 20179 yr Can anyon give a tutorial on how the plexdrive pluin works? I installed it, but cannot et it to run. Thanks!
May 31, 20179 yr Author 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!
May 31, 20179 yr Author 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
May 31, 20179 yr 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, 20179 yr by airbillion
May 31, 20179 yr Author 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, 20179 yr by Sparkum
May 31, 20179 yr Awesome! Thanks for the writeup....I will give this a shot tonight and see if I can get it to work...
June 10, 20179 yr 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
June 13, 20179 yr You can use plexdrive4.plg instead of plexdrive.plg. Please report back how it works.
June 16, 20179 yr 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, 20179 yr by publicENEMY
June 21, 20179 yr 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.
June 22, 20179 yr 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.
June 29, 20179 yr 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, 20179 yr by starbix
July 6, 20178 yr 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?
July 6, 20178 yr 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
July 6, 20178 yr 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!
Archived
This topic is now archived and is closed to further replies.