> Seems like there are any number of circumstances that now cause
> different types of scans to be automatically launched, depending on
> what's done in the media folders settings.

That's correct, and is not exactly what the queue is about. Up to 7.6.x we  
used to have this too, though in many less places. What then happened when  
rescans were triggered:

- first rescan/wipecache request was executed
- later requests were ignored as long as a scan was running

This led to issues if eg. you changed some scanning parameter which caused  
a wipecache, then changed the music folder (or in 7.7 added a folder): the  
second scan would have been ignored, leading to unexpected results.

Therefore we decided not to drop subsequent requests any longer, but to  
queue them up.

- first scan is executed as always
- second scan would be queued for later execution, when first ends
- third depends:
   - if a wipecache is in the queue: no scan is added
   - if new request is a wipecache, it clears the queue and adds itself
   - if it's a rescan of all folders, dito
   - if it's a rescan of a single folder, then it's pushed on the queue
- whenever a scan finishes, the scanner checks whether there are more  
requests in the queue and executes them

Additionally there's a helper method to not even trigger the first scan  
immediately, but wait until we tell the scanner to check the queue. This  
helps us to set several prefs which would launch independent scans,  
potentially causing more scan tasks than needed (eg. on the settings page).

-- 

Michael
_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/beta

Reply via email to