Closed deepfriedmind closed 4 years ago
Can you check what 57918 is? just pass the url in plex webui. process_deleted is inteded to be used as cleanup. it something get removed from plex, delete it from bw_plex too
57918 and all others I've encountered in the log don't exist in the library, hence why I think it's TV episodes that have been deleted.
Ok, thanks. Ill look into that.
Note to self. check how tautulli handles the timeline websocket events. https://github.com/Tautulli/Tautulli/blob/a7a9ed86280d87cded8930a2cb15b8909db2354e/plexpy/activity_handler.py#L366
Thanks for the update. I tested it now and got the following in the log:
2020-01-01 22:23:42,753 :: bw_plex :: DEBUG :: plex.py:1250 :: was added to NAS
2020-01-01 22:23:42,785 :: bw_plex :: ERROR :: plex.py:1265 :: Didn't start to process 57949
Traceback (most recent call last):
File "/app/bw_plex/bw_plex/plex.py", line 1262, in check
ep = PMS.fetchItem(int(ratingkey))
File "/usr/local/lib/python3.6/dist-packages/plexapi/base.py", line 137, in fetchItem
for elem in self._server.query(ekey):
File "/usr/local/lib/python3.6/dist-packages/plexapi/server.py", line 381, in query
raise BadRequest('(%s) %s; %s %s' % (response.status_code, codename, response.url, errtext))
plexapi.exceptions.BadRequest: (404) not_found; http://localhost:32400/library/metadata/57949 <html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>
2020-01-01 22:23:42,829 :: bw_plex :: DEBUG :: plex.py:1275 :: Didn't start to process is process_deleted is disabled for
It didn't crash, so that's great :)
It starts up fine and is then "Watching for media on NAS". After a while it says "was added to NAS", i.e. empty string was added. I did not add anything to my Plex library at the time. It then tries to process this nothing and gets a bad request from the Plex API since it's a 404, and then the Docker container crashes/restarts and the process is repeated. I do have
process_recently_added
enabled for TV, so watching for added media is correct.process_deleted
is disabled (I'm not sure why this setting exists). It does work when actual files are added so that's great. Since I have Plex set to delete episodes a while after being watched, my best guess is that this deletion triggers bw_plex – which then tries to find metadata for something that no longer exists.Here's the log: