From 65f4ae73d24e46c12cd983dee0a31e5a54829385 Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 20 Jan 2015 11:16:59 +0000 Subject: [PATCH] speed up length ordered file listing by using find instead of ls (omits unessecary stat'ing) svn path=/trunk/; revision=32 --- pages/videoview.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/videoview.sh b/pages/videoview.sh index 0787796..b786b74 100755 --- a/pages/videoview.sh +++ b/pages/videoview.sh @@ -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}" -- 2.39.2