xbmc/xbmc — pull request #1857 by jmarshallnz (2012-11-29 06:44:14+00:00)
Title: ensure that paused jobs don't get stuck on the top of the jobqueue

Scenario is as follows:

1. Most jobs sent to the job manager are of low priority.
2. The low priority queue has a feature whereby we can pause a particular job type to stop it being processed.
3. We use number 2 for the "mediaflags" jobs - they're paused on playback start, and unpaused on playback stop or end.
4. Other jobs such as the save file state job are also low priority.
5. On playback of video from the UI, we typically have a bunch of mediaflag jobs queued up, so these are in the queue and paused.
6. User plays a new file (via webinterface/remote) which triggers the save file job being added to the queue.
7. The save job is never got to while playback continues, as the thumbjob is on top and still paused.
8. User gets confused that the item they were in the process of playing doesn't have a resume point set (yet).

Fix tested as working. Code isn't particularly pretty. Suggestions welcome.