# Scan cloud content?

**URL:** <https://forums.plex.tv/t/scan-cloud-content/70657>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [July 12, 2014, 6:30pm UTC](https://forums.plex.tv/t/scan-cloud-content/70657 "2014-07-12T18:30:33Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![reallistic](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/reallistic/32/5677_2.png) [@reallistic](https://forums.plex.tv/u/reallistic)\
**Post date:** [July 12, 2014, 6:30pm UTC](https://forums.plex.tv/t/scan-cloud-content/70657/1 "2014-07-12T18:30:33Z")

</div>

Hello,

I am currently using plex via bitcasa's linux client. I would like to develop a plugin that would allow me to add content to plex via scanning the Bitcasa API. But I realized, PMS seems to actually open files as part of the scan. So I figured before I REALLY started trying to build something like this are the following things even possible:

&nbsp;

1. "Safely" add media to the plex database directly

2. Point plex to a cloud folder via link and have it scan its sub directories via xml tree

3. Join multiple plex databases? (One of which would be custom created)

&nbsp; &nbsp; b. Give plex xml/json metadata to add to its db

&nbsp;

Any help/direction you could give on this would be much appreciated. :)

---

<div class="post-metadata">

**Author:** ![thejinx0r](https://avatars.discourse-cdn.com/v4/letter/t/50afbb/32.png) [@thejinx0r](https://forums.plex.tv/u/thejinx0r)\
**Post date:** [July 26, 2014, 7:28pm UTC](https://forums.plex.tv/t/scan-cloud-content/70657/2 "2014-07-26T19:28:28Z")

</div>

Why would you want to do this? What would be the advantage?

---

<div class="post-metadata">

**Author:** ![reallistic](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/reallistic/32/5677_2.png) [@reallistic](https://forums.plex.tv/u/reallistic)\
**Post date:** [July 26, 2014, 8:19pm UTC](https://forums.plex.tv/t/scan-cloud-content/70657/3 "2014-07-26T20:19:29Z")

</div>

The easiest way to put it is to manually create a cloudsync section. It would use the bitcasa api for streaming which is way more efficient than running the client.  
  
  
  
Sent from my iPhone using Tapatalk

---

<div class="post-metadata">

**Author:** ![thejinx0r](https://avatars.discourse-cdn.com/v4/letter/t/50afbb/32.png) [@thejinx0r](https://forums.plex.tv/u/thejinx0r)\
**Post date:** [July 26, 2014, 9:22pm UTC](https://forums.plex.tv/t/scan-cloud-content/70657/4 "2014-07-26T21:22:27Z")

</div>

> The easiest way to put it is to manually create a cloudsync section. It would use the bitcasa api for streaming which is way more efficient than running the client.  
>   
>   
> Sent from my iPhone using Tapatalk

It wasn't clear that that's what you were trying to do.

You should keep an eye out on this:&nbsp;[https://github.com/thejinx0r/BitcasaF4JS](https://github.com/thejinx0r/BitcasaF4JS)

It's probably the simpler solution. It implements a fuse filesystem in nodeJS.&nbsp;

What it does is download files in small chunks (user defined) and then it can stitch them back together.

Outside of plex, I can watch 1080p videos without any problems using VLC, which is pretty neat.

On a VPS, I have been able to download a 750mb file (from bitcasa) in 2 minutes.&nbsp;

In an older implementation of the code, where there was no FUSE filesystem involved, I was able to download at around 65MB/s, (or around 520Mbits).

---

<div class="post-metadata">

**Author:** ![reallistic](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/reallistic/32/5677_2.png) [@reallistic](https://forums.plex.tv/u/reallistic)\
**Post date:** [July 26, 2014, 9:27pm UTC](https://forums.plex.tv/t/scan-cloud-content/70657/5 "2014-07-26T21:27:34Z")

</div>

I cant say im having any issues streaming via the client. The issues are more with ram usage. But what im hoping to accomplish is removing the server from the picture in that the user will be streaming via a bitcasa api url as opposed to via the bitcasa client  
  
  
  
Sent from my iPhone using Tapatalk

---

<div class="post-metadata">

**Author:** ![thejinx0r](https://avatars.discourse-cdn.com/v4/letter/t/50afbb/32.png) [@thejinx0r](https://forums.plex.tv/u/thejinx0r)\
**Post date:** [July 27, 2014, 12:09am UTC](https://forums.plex.tv/t/scan-cloud-content/70657/6 "2014-07-27T00:09:31Z")

</div>

> I cant say im having any issues streaming via the client. The issues are more with ram usage. But what im hoping to accomplish is removing the server from the picture in that the user will be streaming via a bitcasa api url as opposed to via the bitcasa client  
>   
>   
> Sent from my iPhone using Tapatalk

The Fuse filesystem I wrote is not memory heavy. It might be at times, but its definitely lighter than the Bitcasa client itself. The highest I've seen it use is around 200mb.

The only downside is that I think plex does need to rescan the whole library, but it's an option.

For now though, there does seem to be parallelism issues, where the fusefs cannot be accessed and download at the same time. This causes plex to stutter, but it should be fine if using PlexHT since it has its own cache system.

---

<div class="post-metadata">

**Author:** ![felipebaez](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/felipebaez/32/4637_2.png) [@felipebaez](https://forums.plex.tv/u/felipebaez)\
**Post date:** [August 12, 2014, 9:05am UTC](https://forums.plex.tv/t/scan-cloud-content/70657/7 "2014-08-12T09:05:14Z")

</div>

I actually would like to have a slight different solution. I have unlimited Google Drive storage, and a very limited local storage. In my case bandwidth is not an issue, I have a 240Mbps pipe, so my idea would be to have all my original files on Google Drive, and have Plex scanning a Google Drive folder, then once I request a file it streams to the device.

It would be quite nice to see that.

---

<div class="post-metadata">

**Author:** ![reallistic](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/reallistic/32/5677_2.png) [@reallistic](https://forums.plex.tv/u/reallistic)\
**Post date:** [August 12, 2014, 1:39pm UTC](https://forums.plex.tv/t/scan-cloud-content/70657/8 "2014-08-12T13:39:47Z")

</div>

> I actually would like to have a slight different solution. I have unlimited Google Drive storage, and a very limited local storage. In my case bandwidth is not an issue, I have a 240Mbps pipe, so my idea would be to have all my original files on Google Drive, and have Plex scanning a Google Drive folder, then once I request a file it streams to the device.  
>   
> It would be quite nice to see that.

  
This would be a great starting point for me as well actually. It seems like the most realistic approach to this.

---

<div class="post-metadata">

**Author:** ![karbowiak](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/karbowiak/32/82103_2.png) [@karbowiak](https://forums.plex.tv/u/karbowiak)\
**Post date:** [August 12, 2014, 10:49pm UTC](https://forums.plex.tv/t/scan-cloud-content/70657/9 "2014-08-12T22:49:29Z")

</div>

Just gonna leave this here:&nbsp;[https://github.com/dsoprea/GDriveFS](https://github.com/dsoprea/GDriveFS)  
  
;)

---

<div class="post-metadata">

**Author:** ![reallistic](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/reallistic/32/5677_2.png) [@reallistic](https://forums.plex.tv/u/reallistic)\
**Post date:** [August 13, 2014, 1:38am UTC](https://forums.plex.tv/t/scan-cloud-content/70657/10 "2014-08-13T01:38:05Z")

</div>

> Just gonna leave this here: [https://github.com/dsoprea/GDriveFS](https://github.com/dsoprea/GDriveFS)  
>   
> ;)

  
\*Laughs at inside joke\*  
My goal is bigger than a single provider's performance. I want to remove the pms host server as a "third party" in between communicating with the content stored on Google drive, for example.

---

<div class="post-metadata">

**Author:** ![IMDMonkey](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/imdmonkey/32/2990_2.png) [@IMDMonkey](https://forums.plex.tv/u/IMDMonkey)\
**Post date:** [August 14, 2014, 7:49pm UTC](https://forums.plex.tv/t/scan-cloud-content/70657/11 "2014-08-14T19:49:37Z")

</div>

If PMS was able to look at the Google Drive (even via Google's APIs) just to index the contents, Google Drive WILL play back streams of audio/video/photos at this point WITHOUT other software.&nbsp; So, if a device was able to stream from Google Drive (say a Chromecast for example) it would be cool if the Plex client could look at the information on the PMS host, then tell the Chromecast to get the video from Google Drive INSTEAD of the PMS host.&nbsp; This would reduce all sorts of things getting in the middle and needless bandwidth usage.

Maybe something like Couchy TV or DriveCast on the Roku.....

Just a thought.

---

<div class="post-metadata">

**Author:** ![thejinx0r](https://avatars.discourse-cdn.com/v4/letter/t/50afbb/32.png) [@thejinx0r](https://forums.plex.tv/u/thejinx0r)\
**Post date:** [August 15, 2014, 1:29am UTC](https://forums.plex.tv/t/scan-cloud-content/70657/12 "2014-08-15T01:29:58Z")

</div>

> \*Laughs at inside joke\*  
> My goal is bigger than a single provider's performance. I want to remove the pms host server as a "third party" in between communicating with the content stored on Google drive, for example.

Wouldn't that be something like XBMC / Kodi basically with a centralized MySQL (or whatever it is) database?

---

<div class="post-metadata">

**Author:** ![unisonruss](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/unisonruss/32/546_2.png) [@unisonruss](https://forums.plex.tv/u/unisonruss)\
**Post date:** [August 15, 2014, 2:00am UTC](https://forums.plex.tv/t/scan-cloud-content/70657/13 "2014-08-15T02:00:51Z")

</div>

I love this idea…I brought it up when CloudSync was new (via twitter) and elan replied, saying it was a great idea. Pretty sure it’s on their radar. If plex streamed from bitcasa directly vs. mounted cloud drive, that would most likely improve remote streaming, which I would absolutely love.

---

<div class="post-metadata">

**Author:** ![reallistic](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/reallistic/32/5677_2.png) [@reallistic](https://forums.plex.tv/u/reallistic)\
**Post date:** [August 15, 2014, 2:05am UTC](https://forums.plex.tv/t/scan-cloud-content/70657/14 "2014-08-15T02:05:58Z")

</div>

> Wouldn't that be something like XBMC / Kodi basically with a centralized MySQL (or whatever it is) database?

  
The centralized db could solve half the problem but being able to supply cloud storage api stream links as opposed to file paths would still be an issue.

---

<div class="post-metadata">

**Author:** ![reallistic](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/reallistic/32/5677_2.png) [@reallistic](https://forums.plex.tv/u/reallistic)\
**Post date:** [August 15, 2014, 2:07am UTC](https://forums.plex.tv/t/scan-cloud-content/70657/15 "2014-08-15T02:07:39Z")

</div>

> I love this idea...I brought it up when CloudSync was new (via twitter) and elan replied, saying it was a great idea. Pretty sure it's on their radar. If plex streamed from bitcasa directly vs. mounted cloud drive, that would most likely improve remote streaming, which I would absolutely love.

  
When cloudSync was first introduced I was trying to figure out why this wasn't implemented first lol

---

<div class="post-metadata">

**Author:** ![felipebaez](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/felipebaez/32/4637_2.png) [@felipebaez](https://forums.plex.tv/u/felipebaez)\
**Post date:** [August 26, 2014, 11:24am UTC](https://forums.plex.tv/t/scan-cloud-content/70657/16 "2014-08-26T11:24:59Z")

</div>

Does anyone know if this is something the Plex developers would be looking at? It would be awesome to remove my local server out of the equation and have all content in Google Drive and the Plex Web Server indexing the contents of specified folder in the Google Drive account.

---

<div class="post-metadata">

**Author:** ![reallistic](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/reallistic/32/5677_2.png) [@reallistic](https://forums.plex.tv/u/reallistic)\
**Post date:** [August 28, 2014, 7:00pm UTC](https://forums.plex.tv/t/scan-cloud-content/70657/17 "2014-08-28T19:00:05Z")

</div>

There is another thread [here](https://forums.plex.tv/topic/102085-let-plugins-act-as-an-source-for-pms/)&nbsp;that also touches on this with a slightly different approach. However, the base functionality is still the same.

Please go over and like that post.

---

<div class="post-metadata">

**Author:** ![reallistic](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/reallistic/32/5677_2.png) [@reallistic](https://forums.plex.tv/u/reallistic)\
**Post date:** [August 28, 2014, 8:04pm UTC](https://forums.plex.tv/t/scan-cloud-content/70657/18 "2014-08-28T20:04:27Z")

</div>

Does anyone know if it would be possible to implement some sort of fuse file system that would link to an http url as a redirect as opposed to a stream?

So for example,

- File /path/to/fuse/myfile.mp4 is a text file containing:&nbsp;[https://mycloudprovider.tld/?apikey=](https://mycloudprovider.tld/?apikey=)&hash=
- PMS requests file at location /path/to/fuse/myfile.mp4
- The filesystem _ **directs&nbsp;** _PMS to find this content at the url [https://mycloudprovider.tld/?apikey=](https://mycloudprovider.tld/?apikey=)&hash=
- PMS passes stream url to client
- Client streams&nbsp; **directly** from [https://mycloudprovider.tld/?apikey=](https://mycloudprovider.tld/?apikey=)&hash=

---

<div class="post-metadata">

**Author:** ![thejinx0r](https://avatars.discourse-cdn.com/v4/letter/t/50afbb/32.png) [@thejinx0r](https://forums.plex.tv/u/thejinx0r)\
**Post date:** [August 29, 2014, 8:50am UTC](https://forums.plex.tv/t/scan-cloud-content/70657/19 "2014-08-29T08:50:35Z")

</div>

> Does anyone know if it would be possible to implement some sort of fuse file system that would link to an http url as a redirect as opposed to a stream?
> 
> So for example,
> 
> - File /path/to/fuse/myfile.mp4 is a text file containing:&nbsp;[https://mycloudprovider.tld/?apikey=](https://mycloudprovider.tld/?apikey=)&hash=
> - PMS requests file at location /path/to/fuse/myfile.mp4
> - The filesystem _ **directs&nbsp;** _PMS to find this content at the url [https://mycloudprovider.tld/?apikey=](https://mycloudprovider.tld/?apikey=)&hash=
> - PMS streams file **directly** from [https://mycloudprovider.tld/?apikey=](https://mycloudprovider.tld/?apikey=)&hash=

What's the difference between "http url as a redirect as opposed to a stream"?

&nbsp;

The fuse filesystem does allow Plex Media Server to stream directly from &nbsp;[https://mycloudprovider.tld/?apikey=](https://mycloudprovider.tld/?apikey=)&hash=

This what I did with this project:&nbsp;[https://github.com/thejinx0r/BitcasaF4JS](https://github.com/thejinx0r/BitcasaF4JS)

&nbsp;

&nbsp;

Essentially, the fuse filesystem presents the file to PMS, for example,&nbsp;/path/to/fuse/myfile.mp4, in a format plex can understand. Behind the scenes, the fuse filesystem will know where "/path/to/fuse/myfile.mp4" is in the cloud ([https://mycloudprovider.tld/?apikey=](https://mycloudprovider.tld/?apikey= "External link")&hash=)&nbsp;and fetches (and hopefully caches) the required data when needed.

&nbsp;

Going back to the feature vote you linked, it should be possible to do this with fuse.

I've seen someone create a fuse filesystem for reddit ([https://github.com/redditvfs/redditvfs](https://github.com/redditvfs/redditvfs)) and there have been other attempts at it too if you look on google/github.

&nbsp;

So a fuse FS for spotify and netflix? Very well possible, but it just takes time to build.

---

<div class="post-metadata">

**Author:** ![reallistic](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/reallistic/32/5677_2.png) [@reallistic](https://forums.plex.tv/u/reallistic)\
**Post date:** [September 2, 2014, 3:37pm UTC](https://forums.plex.tv/t/scan-cloud-content/70657/20 "2014-09-02T15:37:03Z")

</div>

The difference here, for me anyway, is that I want plex to realize that the file is "remote" and then pass the stream url on to the&nbsp; **client&nbsp;** so that PMS and the host server aren't involved with the stream. (Sorry should have said Client above)

[Next page](https://forums.plex.tv/t/scan-cloud-content/70657.md?page=2)
