masonr / plexidrive Goto Github PK
View Code? Open in Web Editor NEWScripts to facilitate the use of cloud storage (such as Google Drive) as storage for Plex media server
License: MIT License
Scripts to facilitate the use of cloud storage (such as Google Drive) as storage for Plex media server
License: MIT License
when I run -
sudo ./plexidrive.sh
OR
sudo su -c 'export LD_LIBRARY_PATH=/usr/lib/plexmediaserver; /usr/lib/plexmediaserver/Plex\ Media\ Scanner --list' plex
I get - https://dl.dropboxusercontent.com/s/0fvgptisi75gzi7/TeamViewer_2017-06-03_10-20-38.png -
the structure of the folder directory is as you directed. - https://dl.dropboxusercontent.com/s/7jx2hziqq9vjvck/TeamViewer_2017-06-03_10-36-40.png
Thanks for all your help. I can't believe its one thing right after the other.
Awesome scripts. This is really what i've been looking for. Thank you!
Only thing i'm missing is to add some customizations to rclone upload, without editing your scripts. I use a few rclone commands for my uploads.
--bwlimit=10.0M --log-file=PATH --exclude ".placeholder"
Aswell as "find"-options -mtime +3
Min-Age 3d is because i want Plex to analyze the items (thumbnails etc) before moving to GDrive, to lower the GDrive access as much as possible.
Would be great to have this in your .conf file.
Maybe even dedicated line for logfile?
(another thing, please write down somewhere that " ~/ " is not working ;) )
Thank you
It seems that I can use rclone to lsd and ls and copy files. But the remote folders themselves don't appear in /mnt/gdrive-main. Are they supposed to appear somewhere else? according to the command -
sudo rclone mount --allow-non-empty --allow-other the_domain:/ /mnt/gdrive-main
"the_domain" should mount to /mnt/gdrive-main. here's a pic - https://dl.dropboxusercontent.com/s/rsyolrg0vzblsam/TeamViewer_2017-05-31_11-09-17.png
If plexidrive.sh checks to see if it's already running before executing, it would mean we can have a relatively frequent cronjob schedule.
Look into implementing parallel uploads.
Options:
Allow multiple libraries for each type (TV Show & Movies).
Would need to define the lib type (tv shows vs movies) and each would need their own local path on the filesystem before being uploaded to keep track of what library to scan afterwards.
Look into using rclone copy instead of the gdrive cli.
Would make the setup and running of the scripts much simpler. This alone makes it worth re-evaluating rclone copy vs gdrive upload.
As noted by another user, using own client/application id for rclone will reduce the throttling of API calls and download speeds.
Hey,
I've setup your scripts as per your instructions and ran through them several times to make sure I haven't made a mistake, however when I run ./plexidrive.sh the only output I get is
root@cheesus ~/PLEXiDRIVE # ./plexidrive.sh
File: Quantico - S02E21 - RAINBOW HDTV-720p.mkv
Doesn't seem to process or upload the file at all, anything obvious I've done wrong, or anywhere I can find some logs to see what's up?
I can do gdrive list which shows my gdrive files so that connects fine, and I have rclone mounting the gdrive fine.
Thanks!
Will investigate to determine how much work would need to be done to implement this.
Be able to specify which rclone.conf file should be used. Will be useful if running the scripts as part of a cronjob under a different user (i.e. root, but conf is in local user's home directory).
When I run this -
> ~$ gdrive --config ~/.gdrive-main about
I get -
gdrive --config ~/.gdrive-main about
Failed to get about: Get https://www.googleapis.com/drive/v3/about?alt=json&fields=maxImportSizes%2CmaxUploadSize%2CstorageQuota%2Cuser: oauth2: cannot fetch token: 400 Bad Request
Response: {
"error" : "invalid_grant"
}
[1]+ Stopped sudo rclone mount --allow-non-empty --allow-other the_matrix:/ /mnt/gdrive-main
Please not sure what to do. Anyone else having this issue?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.