dont show confusing 'X files scanned' message when we are not scanning files

This commit is contained in:
Robin Appelman 2011-08-04 01:26:29 +02:00
parent 93b342ee39
commit 122c3a3cf8
3 changed files with 5 additions and 3 deletions

View File

@ -33,7 +33,7 @@ Collection={
Collection.loadedListeners[i](); Collection.loadedListeners[i]();
} }
if(collection.length==0){ if(collection.length==0){
$('#scan input.start').val('Scan'); $('#scan input.start').val('Scan Collection');
$('#plugins a[href="#collection"]').trigger('click'); $('#plugins a[href="#collection"]').trigger('click');
} }

View File

@ -50,6 +50,7 @@ Scanner={
}, },
start:function(ready){ start:function(ready){
Scanner.stopScanning=false; Scanner.stopScanning=false;
$('#scancount').show();
var scanSong=function(){ var scanSong=function(){
Scanner.currentIndex++; Scanner.currentIndex++;
if(!Scanner.stopScanning && Scanner.currentIndex<Scanner.songs.length){ if(!Scanner.stopScanning && Scanner.currentIndex<Scanner.songs.length){
@ -62,6 +63,7 @@ Scanner={
} }
} }
scanSong(); scanSong();
scanSong();
}, },
toggle:function(){ toggle:function(){
if(Scanner.stopScanning){ if(Scanner.stopScanning){

View File

@ -1,7 +1,7 @@
<div id='scan'> <div id='scan'>
<p><span class='songCount'>0</span> Songs scanned</p> <p id='scancount' style='display:none'><span class='songCount'>0</span> Songs scanned</p>
<div id="scanprogressbar"></div> <div id="scanprogressbar"></div>
<input type='button' class='start' value='Recan'></input> <input type='button' class='start' value='Recan Collection'></input>
<input type='button' class='stop' style='display:none' value='Pause'></input> <input type='button' class='stop' style='display:none' value='Pause'></input>
</div> </div>
<ul id='collection'> <ul id='collection'>