Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Idea: API connection to Cloud, like Google Drive, OneDrive and Dropbox
#1
Dears,

Is it possible to build an API connection to Cloud drives, like Google Drive, OneDrive and Dropbox, etc?
Currently, I use BubbleUpnp to push the stream from Google Drive to MoOde.
Thanks for your best efforts and dedication.
Reply
#2
Probably, but someone will need to test and post a configuration that I can test out on my end.

An example from a quick search of Github.
https://github.com/astrada/google-drive-ocamlfuse
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(09-16-2019, 02:43 AM)Tim Curtis Wrote: Probably, but someone will need to test and post a configuration that I can test out on my end.

An example from a quick search of Github.
https://github.com/astrada/google-drive-ocamlfuse


The OAuth2 rigamarole looks fiddly but the effort seems worth trying. As if I didn't have enough little side projects going already Rolleyes
Reply
#4
Fortunately, I've added my music folder from GoogleDrive as a local folder under /mnt by rclone, via curl https://rclone.org/install.sh | sudo bash

The stream of playing cloud music is OK.

But I still have some confusion, how to speed up the process to add the cloud into Library, about 400 tracks per hour, quite slow.

Thank you.
Reply
#5
(11-01-2019, 04:11 AM)godt2p4 Wrote: Fortunately, I've added my music folder from GoogleDrive as a local folder under /mnt by rclone, via curl https://rclone.org/install.sh | sudo bash

The stream of playing cloud music is OK.

But I still have some confusion, how to speed up the process to add the cloud into Library, about 400 tracks per hour, quite slow.

Thank you.

I tested several approaches after you broached the subject and passed my findings to Tim. Rclone certainly works and is what I ended up suggesting he try instead of ocamlfuse.

First, the client_id. Google Drive's rate limit is imposed on a by-user basis. If you are using rclone's internal client_id (aka internal key) instead of your own you'll be sharing that limit with all others who do the same. To quote the docs, "If you leave this blank, it will use an internal key which is low performance." 

To create your own you'll have to create a Google developer's account, yada yada yada. See https://rclone.org/drive/#making-your-own-client-id

Second, the rate limit. Again, to quote the rclone docs, "Drive has quite a lot of rate limiting. This causes rclone to be limited to transferring about 2 files per second only. Individual files may be transferred much faster at 100s of MBytes/s but lots of small files can take a long time." There are some rclone option settings which possibly can optimize this but I didn't explore any. Google is your friend. Try searching on terms like "slow sync to Google Drive".

Regards,
Kent
Reply
#6
(11-01-2019, 11:59 AM)TheOldPresbyope Wrote:
(11-01-2019, 04:11 AM)godt2p4 Wrote: Fortunately, I've added my music folder from GoogleDrive as a local folder under /mnt by rclone, via curl https://rclone.org/install.sh | sudo bash

The stream of playing cloud music is OK.

But I still have some confusion, how to speed up the process to add the cloud into Library, about 400 tracks per hour, quite slow.

Thank you.

I tested several approaches after you broached the subject and passed my findings to Tim. Rclone certainly works and is what I ended up suggesting he try instead of ocamlfuse.

First, the client_id. Google Drive's rate limit is imposed on a by-user basis. If you are using rclone's internal client_id (aka internal key) instead of your own you'll be sharing that limit with all others who do the same. To quote the docs, "If you leave this blank, it will use an internal key which is low performance." 

To create your own you'll have to create a Google developer's account, yada yada yada. See https://rclone.org/drive/#making-your-own-client-id

Second, the rate limit. Again, to quote the rclone docs, "Drive has quite a lot of rate limiting. This causes rclone to be limited to transferring about 2 files per second only. Individual files may be transferred much faster at 100s of MBytes/s but lots of small files can take a long time." There are some rclone option settings which possibly can optimize this but I didn't explore any. Google is your friend. Try searching on terms like "slow sync to Google Drive".

Regards,
Kent

Thanks, Kent.

Your second point is just the cause of my confusion, let me try the options to optimize the process.

BTW, I wonder if the file "database" under /var/lib/mpd is the database file of library, which I can backup and restore in any moode device with the same NAS sources.

Appreciation for your kindly feedback and highly support.
Thank you.
Reply
#7
@godt2p4

Hope you find an optimal setting. In truth, once I knew I could make rsync work I put it aside. I have no desire to store my music in the cloud.

But then you said

Quote:BTW, I wonder if the file "database" under /var/lib/mpd is the database file of library, which I can backup and restore in any moode device with the same NAS sources.

I'm not sure what your use case is. 

I suppose it's technically feasible to backup (e.g., copy) and restore (e.g., copy back) the database but you're on your own here.

Another possibility is to run an instance of MPD on the NAS and reference it as a proxy in each moOde player. See the "Advanced configuration/Satellite setup" section of the MPD documentation. Again, you're on your own here, especially in regards to configuring the MPD instance on the NAS.

Regards,
Kent
Reply
#8
# MPD database
/var/lib/mpd/database

# Library tag array
/var/local/www/libcache.json
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#9
(11-02-2019, 01:19 PM)TheOldPresbyope Wrote: @godt2p4

Hope you find an optimal setting. In truth, once I knew I could make rsync work I put it aside. I have no desire to store my music in the cloud.

But then you said

Quote:BTW, I wonder if the file "database" under /var/lib/mpd is the database file of library, which I can backup and restore in any moode device with the same NAS sources.

I'm not sure what your use case is. 

I suppose it's technically feasible to backup (e.g., copy) and restore (e.g., copy back) the database but you're on your own here.

Another possibility is to run an instance of MPD on the NAS and reference it as a proxy in each moOde player. See the "Advanced configuration/Satellite setup" section of the MPD documentation. Again, you're on your own here, especially in regards to configuring the MPD instance on the NAS.

Regards,
Kent

Thanks, Kent.

The instance running of MPD is similar to the methodology of ROON, and I'm quite insterested in it.
Reply


Forum Jump: