]> git.plutz.net Git - serve0/commitdiff
speed up name ordered file listing by using find instead of ls (this omits unessecary...
authorpaul <paul@plutz.net>
Fri, 16 Jan 2015 18:29:51 +0000 (18:29 +0000)
committerpaul <paul@plutz.net>
Fri, 16 Jan 2015 18:29:51 +0000 (18:29 +0000)
svn path=/trunk/; revision=31

pages/videoview.sh

index e90c951dceda6f961c297323db4d9dc61c2b398f..07877966e4c34ca65f8a3230eee2b788c8653725 100755 (executable)
@@ -116,7 +116,7 @@ VIDEOend
   fi
 }
 
-_by_name(){ ls ${_DATA}/videos/ |egrep -i "$file_pattern" }
+_by_name(){ find ${_DATA}/videos/ -mindepth 1 -maxdepth 1 -printf '%f\n' |sort |egrep -i "$file_pattern" }
 _by_date(){ ls -c ${_DATA}/videos/ |egrep -i "$file_pattern" }
 _by_length(){ ls ${_DATA}/by_length/ |sed -r 's:[0-9]{5} - ::g' }