Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Plexcache-R - v2.1.1 - Caching script for Plex media files (using userscripts)

Featured Replies

(Hoping this is the right subforum for this, as it's currently run as a userscript)

StudioNirin/PlexCache-R

Some of you may recognise this, as there has been an old version of this from a few years back by Brimur and Bexem. That ended up getting archived, and Brimur was happy to let me try and fix some bugs and expand the functionality a bit. After I released V1, I then got some amazing help from someone called Brandon and we have managed to pump out a whole slew of upgrades.

Some of you may also recognise this because v1 and v2 were already released on the unraid subreddit... I just kept forgetting to actually make a post here lol.

Intro/Recap:

Automate Plex media management: Efficiently transfer media from the On Deck/Watchlist to the cache, and seamlessly move watched media back to their respective locations. An updated version of the "PlexCache-Refactored" script with various bugfixes and improvements. Hopefully fixed and improved anyway, time will tell!

PlexCache efficiently transfers media from the On Deck/Watchlist to the cache and moves watched media back to their respective locations. This Python script reduces energy consumption by minimizing the need to spin up the array/hard drive(s) when watching recurrent media like TV series. It achieves this by moving the media from the OnDeck and watchlist for the main user and/or other users. For TV shows/anime, it also fetches the next specified number of episodes.

V2.1.1 Update Notes:

I'll write a bit of a shortlist version of the additions here, though we made a LOT of changes in this edition so even the changelog is probably missing a few things. Check the releases page notes for more details on each of these. But here goes:

  1. .plexcached Backup System

When files are moved to cache, the original array file is renamed to filename.plexcached instead of being deleted. This reduces unnecessary file writes, and data loss if the cache drive fails.

2. OAuth PIN-Based Authentication

Replaces manual token entry with Plex's official PIN-based OAuth.

3. Cache Retention Period

4. Watchlist Retention Period

5. Cache Size Limit

New cache_limit setting to cap total cache usage.

6. Updated Setup Wizard

Auto-detects missing settings and prompts to add them

7. Unraid Mover Exclusion File (manual custom entries)

There is now a new generated file (unraid_mover_exclusions.txt) which allows for manually-entered custom exclusion links.

8. Multi-Path Mapping Support

9. Smart Cache Eviction System

Cached files are now rated using a priority system, so that if the cache size limit is reached files will be removed based on age/priority of the individual files.

Plus a bunch of debug and logging improvements. And as I say, probably a few other things we forgot to document.

Migration should be pretty straightforward. However there are some of the usual recommendations:

  1. Make a backup of your old Plexcache-R folder. This is mostly so you can revert back if you have any issues. Just zip the folder or copy it somewhere else temporarily.

  2. Download the new files, and overwrite the old versions

  3. Run the setup script. This will look for and find missing settings and add them to your existing settings.json file.

  4. When it's finished, run the Plexcache-R script. And ... that's it, should just work at this point.

As always, at your own risk, no responsibility etc. But if you have any issues please do post them on the github and we will do our best to help you out. We have been running this new version for a couple weeks now and haven't run into any issues as of yet, but there's always going to be something!

StudioNirin/PlexCache-R

There's already a lot of plans for v3 which will be a big update, but we don't have a release timeline yet and it's very much experimental. V2 however seems to be working well for the people that have reported back on reddit and on the github.

Good luck!

  • 2 months later...

Does this plugin send an email with what was moved to the cache or back to the array? like the list of movies or tv episodes?

  • 1 month later...

I've been using the script for a few months -- how does the docker container handle migration? Should I copy everything back to the array and delete all of the *.plexcached files to start fresh, or will the docker container recognize the cached files and start using the cache as-is?

Edit: forgot to add context-- I'm looking to move to the dockerized version 3 from the version 2 script.

Edit 2 for posterity: found the migration instructions here, help is no longer needed: https://github.com/StudioNirin/PlexCache-D/discussions/81

Edited by jmello

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.