Sickchill: Plex indexer missing/removing files due to premature start while post-processing

Created on 1 May 2016  路  6Comments  路  Source: SickChill/SickChill

SickRage initiates the Plex indexing update after the very first file is processed. This creates some issues due to time delays in processing (extracting, deleting, moving, etc.):

  • Plex indexer is already running while files are processed to a folder it already scanned = those newer files are not indexed.
  • Plex indexer runs on a folder that is being processed with a newer version of a file (proper etc.) just when the old file is removed but the new one has not been placed yet = Plex deletes that file from its library (happens way more often than one would think)

_Possible solution (not sure if the second part is possible):_
Initiate Plex update only after all processable files are processed and do not post-process files while Plex is indexing.

_Why not use to auto updating in Plex? (Or the why-did-you-even-put-this-feature-in-SickRage-in-the-first-place question)_

  • _Auto detect:_ I used to use this but recently turned it off as I found that it was basically indexing continuously, which is bad for performance, drives, etc.
  • _Periodically:_ Also wasteful when nothing has changed, and takes too long when it's just new and I want to watch it now.

Hopefully a solution can be found for this, as it has been bugging me for some time now.
Thanks.

  • Branch: master
  • Commit: b80c18dbb712a91c38d3617576a2aff67ed17bb0
  • Version: 2016.04.14-1
  • Database Version: 42.1
  • Python Version: 2.7.11 (default, Dec 17 2015, 15:58:38) [GCC 4.7.3 20130102 (prerelease)]
  • OS: Linux-3.10.77-x86_64-with-glibc2.2.5
Enhancement Priority LOW Stale

Most helpful comment

@fdbgbgsf the command line wouldn't work at all since you'd need permission on the host. Since not everyone runs Plex and Sickrage on the same host that'd mean you'd need to SSH into the machine and then run the command which wouldn't work out of the box for Windows and would mean Sickrage could potentially cause a LOT of harm by having access to another system.

All 6 comments

Thanks for the issue report! Before a real human comes by, please make sure your report has all the below criteria checked

  • [ ] Include basic information: Branch/Commit, OS, What you did, What happened, What you expected
  • [ ] Enable debug logging (be sure to disable after the bug is fixed)
  • [ ] Post debug logs, either inline (for smaller logs) or using gist

Please make sure you also read how to create an issue and followed all of the steps.

The title should describe your issue. Having "SR not working" or "I get this bug" for 100 issues, isn't really helpful. We will close issues if there isn't enough information.

Sometimes the devs may seem like grunts and respond with short answers. This isn't (always) because the dev hates you, but because he's on mobile or busy fixing bugs. If something isn't clear, please let us know, and this bot may get updated to automatically answer you.

Thanks!

@miigotu I've been thinking about this for a while, can we not just wait for the queue to finish and before exiting run any notifiers that want a "bulk notification" such as Plex?

FYI Plex only allows refreshing libraries and not each show/season meaning you can't just change it to only update that show. 馃槥

and do not post-process files while Plex is indexing. <-- we dont know when plex is scanning or when it finishes, we just tell it to start.

About waiting until the end of PP thread to tell it to scan its a bit tricky, because the pp doesnt know what notifier you have enabled, and just moving the call to the end screws up other notifiers that need it for every file.

Ill have to pull some vars through to the notifiers and skip plex on per-file and skip the rest on pp done

Looking through the code it looks like SickRage updates Plex via URL command. For which the desired features do seem to be missing. But this seems to be possible through the command line, see: https://support.plex.tv/hc/en-us/articles/201242707-Plex-Media-Scanner-via-Command-Line

If I'm reading that page correctly, it would be possible to update a specific path, and even monitor the progress.

Thoughts?

Just let me work on it lol, patience.

@fdbgbgsf the command line wouldn't work at all since you'd need permission on the host. Since not everyone runs Plex and Sickrage on the same host that'd mean you'd need to SSH into the machine and then run the command which wouldn't work out of the box for Windows and would mean Sickrage could potentially cause a LOT of harm by having access to another system.

Was this page helpful?
0 / 5 - 0 ratings