X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=index.cgi;h=421b81e95ece53ff9c0c58f096518b596062bb0c;hb=fd407665aaedc1bea44ac34ec1440fa2e9cf8795;hp=8367f92f7bd4ab31e8de6d8569e35bc4fc3588f6;hpb=515c2d0ff3d2858990a1d8343467191b8484268f;p=serve0 diff --git a/index.cgi b/index.cgi index 8367f92..421b81e 100755 --- a/index.cgi +++ b/index.cgi @@ -48,6 +48,9 @@ if [ "$ITEM" = "/style.css" ]; then . "$_EXEC/cgilite/file.sh" [ -r "$_DATA/$ITEM" ] && FILE "$_DATA/$ITEM" \ || FILE "$_EXEC/style.css" +elif [ "$ITEM" = "/stereoview.js" ]; then + . "$_EXEC/cgilite/file.sh" + FILE "$_EXEC/stereoview.js" elif [ -f "$_DATA/$ITEM" ]; then case $ACTION in tag) @@ -62,30 +65,30 @@ elif [ -f "$_DATA/$ITEM" ]; then ;; delete) ;; - *) . "$_EXEC/cgilite/file.sh" + download) . "$_EXEC/cgilite/file.sh" fakemp4="$(COOKIE fakemp4)" FILE "$_DATA/$ITEM" "$([ "$fakemp4" = yes ] && printf 'video/mp4')" ;; + *) . "$_EXEC/view.sh" esac elif [ -d "$_DATA/$ITEM" ]; then case $ACTION in advsearch) . "$_EXEC/advsearch.sh" ;; - multitag) - if [ "$(POST spawn)" = spawn ]; then - case "$(POST recursive)" in - yes) find "$_DATA/$ITEM" \ - -depth -type d \! -name .index \ - -exec mkdir -p '{}'/.index \; - ;; - *) mkdir -p "$_DATA/$ITEM/.index";; - esac + spawnindex) + if [ "$(POST recursive)" = yes ]; then + find "$_DATA/$ITEM" -depth -type d \! -name .index \ + -exec mkdir -p '{}'/.index \; else - . "$_EXEC/multitag.sh" + mkdir -p "$_DATA/$ITEM/.index" fi REDIRECT "$(POST ref)" ;; + multitag) + . "$_EXEC/multitag.sh" + REDIRECT "$(POST ref)" + ;; *) . "$_EXEC/list.sh" ;; esac