From: Paul Hänsch Date: Mon, 4 Jan 2021 20:04:56 +0000 (+0100) Subject: set default pagination size to 60, which provides clean row counts because it can... X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=085d022448d5f22b3d06f27cae90282c1550f6f4;p=serve0 set default pagination size to 60, which provides clean row counts because it can be divided by 2, 3, 4, 5, and 6 --- diff --git a/index.cgi b/index.cgi index 000fabb..d16e874 100755 --- a/index.cgi +++ b/index.cgi @@ -17,13 +17,13 @@ file_pattern='^.*\.(mov|ts|mpg|mpeg|mp4|m4v|avi|mkv|flv|sfv|wmv|ogm|ogv|webm|iso FILTER="$(GET f)" SEARCH="$(GET s)" ORDER="$(GET o |grep -m1 -axE 'Date|Name|Length|Group' || printf Name)" -LISTSIZE="$(COOKIE pagesize |grep -m1 -axE '[1-9][0-9]*' || printf 50)" +LISTSIZE="$(COOKIE pagesize |grep -m1 -axE '[1-9][0-9]*' || printf 60)" ITEM="${PATH_INFO%/}" ACTION="$(GET a)" case $ACTION in setprefs) - SET_COOKIE +$((86400 * 90)) pagesize="$(POST pagesize |grep -m1 -axE '[1-9][0-9]*' || printf 50)" + SET_COOKIE +$((86400 * 90)) pagesize="$(POST pagesize |grep -m1 -axE '[1-9][0-9]*' || printf 60)" SET_COOKIE +$((86400 * 90)) mode="$(POST mode |grep -m1 -axE 'browse|index' || printf browse)" SET_COOKIE +$((86400 * 90)) fakemp4="$(POST fakemp4 |grep -m1 -axE 'yes' || printf no)" SET_COOKIE +$((86400 * 90)) downscale="$(POST downscale |grep -m1 -axE 'yes' || printf no)"