]> git.plutz.net Git - serve0/commitdiff
adopted update in shcgi
authorpaul <paul@plutz.net>
Wed, 5 Aug 2015 20:03:16 +0000 (20:03 +0000)
committerpaul <paul@plutz.net>
Wed, 5 Aug 2015 20:03:16 +0000 (20:03 +0000)
svn path=/trunk/; revision=76

actions/watch.sh
pages/common.sh

index 39ca7e0cecd7833e28ec69c1937b7b54cd281aac..2a91ce89b751f976d128f30787c8c21023f96aaa 100755 (executable)
@@ -8,7 +8,7 @@ filter="${_REF[f]}"
 page="${_REF[pn]}"
 
 watch_link=''
-[ -n "$info" ]   && watch_link="i=$(urlsave "${info}")&"
+[ -n "$info" ]   && watch_link="i=$(urlsafe "${info}")&"
 [ -n "$order" ]  && watch_link="${watch_link}o=${order}&"
 [ -n "$search" ] && watch_link="${watch_link}s=${search}&"
 [ -n "$filter" ] && watch_link="${watch_link}f=${filter}&"
@@ -20,20 +20,20 @@ head -n1 "$meta" |read length width height filename
 [ "$width"  -gt 0 ] || width=0
 [ "$height" -gt 0 ] || height=0
 
-linkinfo="$(urlsave "$info")"
+linkinfo="$(urlsafe "$info")"
 
 if [ "${_COOKIE[fakemp4]}" = yes ] && [ "${info##*.}" != mp4 ]; then
   [ -e "${_DATA}/videos/${info%.*}.mp4" ] || ln -s "${_DATA}/videos/$info" "${_DATA}/mp4/${info%.*}.mp4"
-  videourl="$(urlsave "mp4/${info%.*}.mp4")"
+  videourl="$(urlsafe "mp4/${info%.*}.mp4")"
 else
-  videourl="$(urlsave "videos/$info")"
+  videourl="$(urlsafe "videos/$info")"
 fi
 
 case "${_COOKIE[watch]}" in
   raspi)
     rpiaddr="http://pfostenpanne.helmchyn.no-ip.biz/?player=play&path="
-    [ $height -gt 480 -a $width -gt 480 ] && redirect "${rpiaddr}$(urlsave "http://jupiter:8000/?action=transcode&i=${linkinfo}&t=480")" \
-                                          || redirect "${rpiaddr}$(urlsave "http://jupiter:8000/${videourl}")"
+    [ $height -gt 480 -a $width -gt 480 ] && redirect "${rpiaddr}$(urlsafe "http://jupiter:8000/?action=transcode&i=${linkinfo}&t=480")" \
+                                          || redirect "${rpiaddr}$(urlsafe "http://jupiter:8000/${videourl}")"
   ;;
   480p)
     [ $height -gt 480 ] && redirect "?action=transcode&i=${linkinfo}&t=480" \
index 9926badff68669956584c94c11ddc298cd86f684..38296dfd8e28358bd0983a7b6d17962fdc589fc1 100755 (executable)
@@ -24,7 +24,7 @@ page="${_GET[pn]}" #validated
 pagesize="${_COOKIE[pagesize]}" #validated
 
 page_link=''
-[ -n "$info" ]   && page_link="i=$(urlsave "$info")&"
+[ -n "$info" ]   && page_link="i=$(urlsafe "$info")&"
 [ -n "$order" ]  && page_link="${page_link}o=${order}&"
 [ -n "$search" ] && page_link="${page_link}s=${search}&"
 [ -n "$filter" ] && page_link="${page_link}f=${filter}&"
@@ -58,9 +58,9 @@ _printVideo(){
     [ -z "$height" ] && height=0
 
     tags="$(sed -n 2p "$meta")"
-    video="$(urlsave "videos/$info")"
-    thumb="$(urlsave "thumbs/$info.jpg")"
-    linkinfo="$(urlsave "$info")"
+    video="$(urlsafe "videos/$info")"
+    thumb="$(urlsafe "thumbs/$info.jpg")"
+    linkinfo="$(urlsafe "$info")"
 
     [ "$(($length % 60))" -lt 10 ] && minutes="$(($length / 60)):0$(($length % 60))" \
                                    || minutes="$(($length / 60)):$(($length % 60))"