Git Product home page Git Product logo

plexcache's People

Contributors

bexem avatar dsaunier-sunlight avatar extrobe avatar trevski13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

plexcache's Issues

Feeling dumb...

I'm currently going through the setup.py on this in PowerShell on server 2019, when it gets to the point of asking about my cache drive it defaults to /mnt/cache which is the correct location on my unraid server... but it's not giving me an option to specify any unraid details? have i missed something? or can this not communicate with my unraid server, and will i need to "cache" it on the windows machine locally?

Looking for Clarification regarding use in Ubuntu

Hello and thank you for your work on PlexCache and also the wiki! I would love to use it, but I still have some questions regarding its setup outside of unraid.

I'm using Ubuntu without bcache or similar things , just straight up ext4 formatted drives and plex in docker and for example:

I have an empty ext4 formatted ssd and a hdd where the media folder for my plex docker is mounted to. I tell the symlink version of the script that the cache folder is on the sdd. What happens if I start the script? Will the specified movies/shows be moved to the cachefolder on the ssd and in their place on the hdd there'll only be a symlink left? So that means I would have to mount the cache folder in the container too. Won't the hdd be woken up anyways when the symlink is accessed by plex?

Just an Idea, which I will look up later: Can't the files simply be copied to the ssd whilst also remaining on the hdd and renamed in such a way that plex prefers the file on the ssd?

Run in a container / as a plug in?

Just stumbled across this script and I'm really keen to set it up.
Whilst I admit I have only glazed over the instructions; my only concern is installing it directly onto the Unraid system. The sysadmin in me likes to keep the OS as close to stock as possible in case of future issues.

Would it be easy enough to containerize this? Or better yet create a CA Plugin that can be configured via the GUI and then blown away if I uninstall it?

I'm sure it would get some real traction if the average Joe could just click "Install" from the Unraid Apps store and off they go.

Monitor "Now playing" and move to cache?

Could you consider adding a feature that monitors whatever media a user starts playing and have the script execute a copy to the unraid cache drive (effectively a copy)? then later purge the clone present in cache mount?

Error moving file

Sometimes i get an error that says:

PlexCache: 06-09-2023 18:00 ERROR Error moving file: [Errno 2] No such file or directory: '/mnt/user0/tv/Ahsoka/Staffel 1/Ahsoka - S01E04 - Part Four - Fallen Jedi.mkv'

The file does not exist in the folder mentioned above. But does exist in the /mnt/user/... share
Why is this happening and how can this be fixed?
I've seen this error before and copying over the file in question fixed it the last time.

Unraid 6.12.4
no ZFS.....yet

plexcache_log_20230906_1837.log

FileNotFoundError

I installed plexapi and requests via pip and start the script with python plexcache_setup.py and immediately get the following error message:

File "plexcache_setup.py", line 24
    raise FileNotFoundError(f'Wrong path given, please edit the "{folder}" variable accordingly.')

Where do i find the {folder} variable?

Error: [Errno 2] No such file or directory. Files exist can touch and ls.

I am getting the bellow. Very confused as I can see the files. Running on Unraid

`root@TheLibrary:/mnt/user/scripts/PlexCache# python3 plexcache.py
*** PlexCache ***
Debug mode is active, NO FILE WILL BE MOVED.
Fetching DuzAwe's onDeck media...
Editing file paths...
Fetching subtitles...
Fetching watched media...
Fetching DuzAwe's watched media...
Editing file paths...
Fetching subtitles...
Nothing to move to array
Error: [Errno 2] No such file or directory: "/mnt/user/TV/It's Always Sunny in Philadelphia (2005) [TVdb-75805]/Season 13/It's.Always.Sunny.in.Philadelphia.-.S13E03.-.The.Gang.Beats.Boggs-.Ladies.Reboot.WEBDL-1080p.mkv"
root@TheLibrary:/mnt/user/scripts/PlexCache# nano plexcache_settings.json
root@TheLibrary:/mnt/user/scripts/PlexCache# python3 plexcache.py
*** PlexCache ***
Fetching DuzAwe's onDeck media...
Editing file paths...
Fetching subtitles...
Loading watched media from cache...
Nothing to move to array
Error: [Errno 2] No such file or directory: "/mnt/user/TV/It's Always Sunny in Philadelphia (2005) [TVdb-75805]/Season 13/It's.Always.Sunny.in.Philadelphia.-.S13E03.-.The.Gang.Beats.Boggs-.Ladies.Reboot.WEBDL-1080p.mkv"
root@TheLibrary:/mnt/user/scripts/PlexCache# ^C
root@TheLibrary:/mnt/user/scripts/PlexCache# ^C
root@TheLibrary:/mnt/user/scripts/PlexCache# ls /mnt/user/TV/It's Always Sunny in Philadelphia (2005) [TVdb-75805]/Season 13/

^C
root@TheLibrary:/mnt/user/scripts/PlexCache# python3 plexcache.py
*** PlexCache ***
Fetching DuzAwe's onDeck media...
Editing file paths...
Fetching subtitles...
Loading watched media from cache...
Nothing to move to array
Error: [Errno 2] No such file or directory: '/mnt/user/TV/Star Trek - Strange New Worlds (2022) [TVdb-382389]/Season 02/Star.Trek-.Strange.New.Worlds.-.S02E07.-.Those.Old.Scientists.WEBDL-2160p.mkv'`

Feature request

Would it be possible to let the script generate an Unraid Notification after each run?

Some Watchlist "Problems"

Hey guys,

I managed to get everything working in my UNRAID environment, despite the fact, that it's throwing errors from the Watchlists others users using my Plex server (does this only work for "local users"?
Also my watchlist is being created, but not copied to cache :(
Don't know where to start sadly...I hope someone can support me :)

image

image
image

image

I also couldn't use my public dns name for my plex server (even valid certificates and stuff, but it told me "token is malformed"...)

First run not working properly, 2nd run will not run due to not enough size

I am having an issue trying to use this script. I run it and it'll locate some media successfully and move it to the cache, however its only finding around 100GB on the first run. This left my SSD with >900GB of free space remaining. I ran the script again and it tells me that it located 889GB of media to move, but claims there is only 855GB of free space remaining. Am I doing something wrong that causes it to not find all the media in the first run but does the second? It also seems like a bug that it's telling me there is not enough free space when there is.

image

image

image

OnDeck read error.

Hey,
I love the script but seem to be having an issue with the on deck information being wrong.

Looking over the debug log it's seeing shows which arnt even on users OnDecks. When I check the cache folder not all of the media which should have been copied over was copied. (There were no copy errors) I've attached the log for reference.

I have a feeling I could have setup some of the cache paths incorrectly as the files which are in the 'plexcache_mover_files_to_exclude' file are the ones which are in the cache.
plexcache_log_latest.log
plexcache_mover_files_to_exclude.txt

Allow user to define which Sections to process

Some severs contain non-standard libraries, such as music videos, youtube videos etc.

It often doesn't make sense to treat these in the same way as other libraries in assuming that users will watch sequentially.
Therefore it should be possible to provide a list of library sections to evaluate.

Conflict with Mover/Mover Tuning

I'm having an issue where PlexCache is moving files to the cache (works well and is great) and then when mover runs it moves them back to the array. The next time PlexCache runs it moves files back to the cache... and on and on. I understand the two parts are operating as they should but I'd like to avoid files being shuffled back and forth unnecessarily.

Is there some setting that I'm missing in either setting up PlexCache or in Mover Tuning?

I know that it is possible to have Mover Tuning ignore files listed inside of text file; is it possible to have the PlexCache script generate a text file of the files it wants to keep on the cache?

Setup.py "no such file exists in directory"

After I downloaded the plexapi and requests files with python, the cmd window says that the files dont exist.
After checking manually in the folder, the files indeed don't exist.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.