I propose adding a new view to the activity screen called ‘Queue’
What is it for?
The queue would display the list of tasks currently outstanding or queued but not started ordered by FIFO. This primarily concerns media scanner jobs but could also include scheduled or explicit tasks for thumbnailing, analysis, optimise, clean and emptying trash.
What would it include?
It would include the time added, a identifer/name and a estimated time to start (estimate if queued, exact if scheduled)
Why do this for tasks?
I’ll focus on scanning for this as it is a good example of something where one explicit action can initiate a large number of tasks which can take a long time to execute. The queue is about exposing the amount of work left to do to the UI.
When adding a large amount of media, or forcing a refresh of a media, plex first establishes the list of files to process afaik. As they are processed the output/progress is added to the logs and available to view in the activity > alerts screen. By having the scanners add the tasks they run to the queue, it would enable visibility over the amount of work remaining and the possibility through estimation* to establish the time left to complete.
This could also include a breakdown of the metadata agent queries per scanner.
What else could it be useful for?
Well aside from being able to view the estimated time and workload on the plex media server, it could be useful for providing pause and resume functionality to the server and media scanners.
If persisted to disk, it could also be used for faster startup/resumes by loading exsiting queues
Any queue stats like no of tasks remaining or time estimates could be used elsewhere in the UI to indicate the server is working.
In the event of scanners stalling, crashing or otherwise apparent inactivity it could be useful for diagnostics and troubleshooting in addition to the logs and crash data.
If metadata agents are individually queued, it could also help troubleshoot config issues or non-responsive/misbehaving agents
- estimation would likely require recording and persistence of task execution timing data.
Disclaimer: I don’t know anything about how plex works internally so apologies if what I’ve suggested is not within the architectural scope of the server/plugin components