Plex Preloader (avoids HDD spinup latency when starting a Movie or Episode)


Recommended Posts

48 minutes ago, kizer said:

Is there a code change that you could recommend that says to skip those or ignore them?

This should be possible.

 

Maybe I could also add an option which allows sorting by the year which is inside the parent folder name like "2004" in "/Lost (2004)/S01E01.mkv". But by that recently added content which has an old airing date, won't be cached.

Link to comment
3 minutes ago, mgutt said:

This should be possible.

 

Maybe I could also add an option which allows sorting by the year which is inside the parent folder name like "2004" in "/Lost (2004)/S01E01.mkv". But by that recently added content which has an old airing date, won't be cached.


I have found a Bulk renamer and have begun changing the messed up files from 2038 to 2018. Not sure what happened, but I think I have a plan of attack. Thank you for the offer/idea. It’s only a 100-200 or so files and I’m 1/4 of the way done. 

Link to comment
49 minutes ago, kizer said:

Bulk renamer

This should not help. The script sorts by file modification time and not the year in the filename (that was the idea I mentioned in my last post) ;)

 

All files, renamed by this bulk renamer tool, will probably receive a newer file modification time and so pushed to the top of the preloading list.

Edited by mgutt
Link to comment

I checked the file listing and it shows the Modified date as 2018 vs 2038. I’m basically changing the attributes not the actual file name. 
 

I’ll do my thing and report back. Or actually I’ll test it again and see if the priority has shifted first before doing more. 

 

update********

 

Every file I’ve changed the modified date is not being scanned. So it’s doing exactly what I hoped it would accomplish.  Just have to do some house cleaning on my end. 
 

Thanks so much for this script. I can verify it does work on 6.9 RC-30. 

Link to comment
6 minutes ago, LSL1337 said:

but if I don't want to map these to RAM (don't have a huge amount)

At the moment you can't map it to something else. But note: Preloading does not reserve RAM. It stays free. But with a small amount of RAM the preloaded data will be overwritten by other processes really fast, so the use of preloading will be really low on your setup.

Link to comment

Thanks this script, I always do same thing, but fetch whole moive to RAM during watching.

 

Sound good have additional features, when a file open time long enough i.e. 5min, ( or simple as file scan still in open state if compare to previous file scan ) then fetch those files to RAM automatically.

Edited by Vr2Io
Link to comment
  • 2 weeks later...

Hello,

 

Fantastic script, works great!

 

One question, is there a more reliable way to determine if the content is coming from the RAM or Disk? I ask because it seems on my machine even from RAM is taking ~ 0.170s which from looking at your script it means this gets counted as from Disk.

 

I am also working on a solution to catch what is On Deck, I will share once I have it working.

 

Thanks,

Chris

Link to comment
1 hour ago, christoefar said:

I am also working on a solution to catch what is On Deck, I will share once I have it working.

 

Thanks,

Chris


That would be neat to have too. Any consideration if you have multiple users on your Plex Server unless Plex just sees all on deck files?

Link to comment
1 hour ago, chris.child said:

Hello,

 

Same Chris as before - just a new email address.

 

I have it working in a crude way, it does only work for me currently. I will have a look at the Plex API and see if it is possible to pull back the On Deck for all users. Selfishly, my main concern is me though!

 

@mgutt is the code on GitHub by any chance?

 

Chris

 

The code for this project is in the first few posts to this thread. 

 

I wouldn't mind just me because I'm selfish too Lol. However if would could cover all users it would round out the code very nicely.

Link to comment

The script works great.  I like the On Deck idea.  Another feature request would be the ability to pick certain episodes or movies to always be preloaded into Ram.  For example, my kids tend to watch the same episodes and movies over and over.  But because they have been on my Plex server for so long, they are not preloaded.  Thanks and keep up the good work!

 

Brad

  • Like 1
Link to comment
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.