# Faking library & direct streaming?

**URL:** <https://forums.plex.tv/t/faking-library-direct-streaming/24823>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [December 9, 2012, 10:58pm UTC](https://forums.plex.tv/t/faking-library-direct-streaming/24823 "2012-12-09T22:58:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AutomaticCoding](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@AutomaticCoding](https://forums.plex.tv/u/AutomaticCoding)\
**Post date:** [December 9, 2012, 10:58pm UTC](https://forums.plex.tv/t/faking-library-direct-streaming/24823/1 "2012-12-09T22:58:58Z")

</div>

I want to code something for a current set up I’ve found myself in. Basically, I have a limited amount of internet data I can use (I use to be on unlimited), so, I can’t just download all my shows and be done with it. So, what I’ve come up with is something along the lines of:-  
  
  
  
My internet speed \> My watching speed (Download show in ~ 20 minutes, watch a show in ~ 42 minutes)  
  
  
  
So, I send the plex client (Assuming at-least one episode is already indexed) ‘Yes, I have all the episodes of all the series. Which episode would you like to watch?’  
  
Plex client replies to server ‘I’d like to watch S **E** ’, now, it splits:-  
  
  
  
A. Episode is already downloaded:-  
  
[list][_]Watch episode as normal[/list]._  
  
   
  
_B. Episode is not downloaded:-_  
  
_[list][_]Submit HTTP request to a location, with the arguments of THETVDB id & Episode/series[_]It’ll reply back a location on the local HDD on where to find the files (Such as C:\Downloading\BlahShowS01E01\BlahShowS01E01.mkv), this file will be **INCOMPLETE** , so, the metadata values/header values (such as length) will NOT match. In fact, the file will probably only be ~ 30 seconds long[_]Plex (Not too sure how this will work, due to the fact I’ve really never dealt with reading & writing files at the same time by different programs) will not lock the file, it will read (Maybe have a larger-than-normal cache?) the file and parse the segments over to the client.[_]As the downloader downloads, it will add more and more to the ending[_]Client can watch fine[/list]  
  
  
  
I know B can be done with VLC (Done it before, in fact, still do it), but, I’m wondering with plex. I have some programming knowledge, however, I have no idea what language plex even uses for it’s API. Does anyone know if this is possible?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 20, 2019, 10:33pm UTC](https://forums.plex.tv/t/faking-library-direct-streaming/24823/2 "2019-12-20T22:33:22Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
