From: Paul Hänsch Date: Tue, 28 Aug 2018 14:18:50 +0000 (+0200) Subject: enable forced index update X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=a383b5e7023bf2961354f5ec26d4061bc9993e98;p=serve0 enable forced index update --- diff --git a/index.cgi b/index.cgi index eebe106..ad110e0 100755 --- a/index.cgi +++ b/index.cgi @@ -26,6 +26,7 @@ case $ACTION in 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)" + [ "$(POST index)" = "update" ] && touch -cd @0 "${_DATA}/.index/meta" REDIRECT "$(POST ref)" ;; bookmark) diff --git a/widgets.sh b/widgets.sh index 3e77017..2736f66 100644 --- a/widgets.sh +++ b/widgets.sh @@ -141,6 +141,7 @@ w_prefs(){ [radio "mode" "index" %s #prefs_modeindex ] [label for=prefs_modeindex View Full Index][br] [checkbox "fakemp4" "yes" %s #prefs_fmp4] [label for=prefs_fmp4 Fake .MP4 file type][br] [checkbox "downscale" "yes" %s #prefs_downscale] [label for=prefs_downscale Prefer downscale to 480p][br] + [submit "index" "update" Force Index Update][br] [submit "store" "store" Set Cookie] ] ' \