-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement] Retrieve updated episodes the same way as added episodes. #77
Comments
Thank you for the suggestion @buthed010203, during early development I came to the same conclusion but the reason why the As far as I know, the only way to catch those changes (and therefore be able to tell if the available streams have been updated for an episode) is to scan the whole library. For larger libraries, you can set the |
Ah I see, was aware of the setting but would rather keep it on. Perhaps having a thread just for library updates would help make this less of an issue |
The scans are already done in a separate thread but if other events occur, they are being queued during the scan and waiting for it to finish. As you suggested, all the library updates could happen in a dedicate thread instead. The only drawback I see with this approach is the fact that the scans sometimes lead to timeout errors due to the large amount of network traffic generated by the library update. |
Fair enough
|
@RemiRigal This could actually be mitigated if autoscan support (plexautolanguages as an autoscan target, would require implementation on autoscan's side as well) was implemented as you would only need to fetch the relevant episode in that case. I'm sure a lot of people with large libraries already use autoscan so they wouldn't need to swap over to it to gain the benefits. What are your thoughts on this? On another note, it would make sense to only refresh the cache for the relevant tv show library instead of fetching it all again though I don't know how to access the |
Rebuilding the entire library cache every time an episode is updated is slow, I looked into it and it appears that updated episodes can be fetched the same way as added episodes by changing the
addedAt
toupdatedAt
here:Plex-Auto-Languages/plex_auto_languages/plex_server.py
Line 67 in 2de8298
Not sure if you knew this was possible, it seems to work fine but I haven't done any real testing.
Not sure what else the cache is actually used for but it seems that it is pretty much useless now? Would be worth removing to save some small amount of memory.
The
newly_added
andnewly_updated
lists could also be made irrelevant by caching the time of the latest added/updated item and only processing items added/updated after then.The text was updated successfully, but these errors were encountered: