]> git.plutz.net Git - serve0/commitdiff
speed up length ordered file listing by using find instead of ls (omits unessecary...
authorpaul <paul@plutz.net>
Tue, 20 Jan 2015 11:16:59 +0000 (11:16 +0000)
committerpaul <paul@plutz.net>
Tue, 20 Jan 2015 11:16:59 +0000 (11:16 +0000)
svn path=/trunk/; revision=32

pages/videoview.sh

index 07877966e4c34ca65f8a3230eee2b788c8653725..b786b7472d5defd0add80035175b87b715f5bea3 100755 (executable)
@@ -118,7 +118,7 @@ VIDEOend
 
 _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' }
+_by_length(){ find ${_DATA}/by_length/ -mindepth 1 -maxdepth 1 -ptintf '%f\n' |sort |sed -r 's:[0-9]{5} - ::g' }
 
 thumblist() {
   cache="${_DATA}/cache/?o=${order}&s=${search}&f=${filter}&p=${page}"