The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Idea: Progress bar for scanning new library
#1
Lightbulb 
When you add a new library, and scan it for music, there is an indefinite progress icon near to the menu icon to indicate that it is working on scanning. It would be nice to have a progress bar to indicate how far along you are in the scanning process. To facilitate this use the following command,  "find dirctory -type d -links 2 | wc -l", to quickly find how many leaf directories (directories that do not contain sub-directories) are found in 'directory'. The command args are:

directory - where to search
-type d - only select file system objects that are directories
-links 2 - directories that only contain links to parent ('..') and self ('.'), no sub-directories
wc -l - count the number of directories returned by the find command

Then, as each directory is finished you can update the progress bar. Of course, this is assuming that directories containing music do not contain sub-directories.


Thanks!

----
Now, we can do this the hard way, or... well, actually there's just the hard way.

  -- Buffy Summers, "Buffy the Vampire Slayer"
Reply


Messages In This Thread
Progress bar for scanning new library - by renfrow - 11-12-2021, 02:15 PM

Forum Jump: