X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=pages%2Fcommon.sh;h=7dfec96f5b539c565d7ca218fe9a392a104baa95;hb=91b7ecbc9eff99427974cebdd96ad0bef1c76929;hp=aad976930adc3bcbd6f39107c59e7baa455a0438;hpb=563bd9812b0eb73ae4e49de012e0f67ed836faaf;p=serve0 diff --git a/pages/common.sh b/pages/common.sh index aad9769..7dfec96 100755 --- a/pages/common.sh +++ b/pages/common.sh @@ -20,17 +20,17 @@ filter="$_GET[\"f\"]" search="$_GET[\"s\"]" order=$(echo -E "$_GET[\"o\"]" |egrep '^(Name|Date|Length)$') -page=$(echo -E "$_GET[\"p\"]" |egrep '^[0-9]+$') +page=$(echo -E "$_GET[\"pn\"]" |egrep '^[0-9]+$') [ -z "$page" ] && page=0 page_link='' -[ -n "$info" ] && page_link="i=$(echo -En "$info" |sed -r 's:%:%25:g;s:\&:%26:g;')&" +[ -n "$info" ] && page_link="i=$(urlsave "$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}&" -page_prev="${page_link}p=$([ "$page" = 0 ] && echo 0 || echo $(($page - 1)) )" -page_next="${page_link}p=$(($page + 1))" -page_this="${page_link}p=$page" +page_prev="${page_link}pn=$([ "$page" = 0 ] && echo 0 || echo $(($page - 1)) )" +page_next="${page_link}pn=$(($page + 1))" +page_this="${page_link}pn=$page" taglist=$( [ -r ${_DATA}/cache/taglist ] && cat ${_DATA}/cache/taglist ||\ @@ -66,11 +66,11 @@ _printVideo(){ minutes="$(($length / 60)):0$(($length % 60))" ||\ minutes="$(($length / 60)):$(($length % 60))" - rpiaddr="$(host pfostenpanne |sed -r 's;^.* ([0-9\.]+)$;\1;')" - rpidull="http://${rpiaddr}/?path=http://jupiter:8000/${video}" - rpicgi="http://${rpiaddr}/?path=$(urlsave "http://jupiter:8000/?action=transcode&i=${linkinfo}&t=480")" + rpiaddr="pfostenpanne.helmchyn.no-ip.biz" + rpidull="http://${rpiaddr}/?player=play&path=http://jupiter:8000/${video}" + rpicgi="http://${rpiaddr}/?player=play&path=$(urlsave "http://jupiter:8000/?action=transcode&i=${linkinfo}&t=480")" - [ $height -gt 480 ] && \ + [ $height -gt 480 -a $width -gt 480 ] && \ raspi="RasPi" \ || raspi="RasPi" [ $height -gt 480 ] && \ @@ -102,7 +102,7 @@ _by_date(){ ls -c ${_DATA}/videos/ |egrep -i "$file_pattern" } _by_length(){ find ${_DATA}/by_length/ -mindepth 1 -maxdepth 1 -printf '%f\n' |sort |sed -r 's:[0-9]{5} - ::' } thumblist() { - cache="${_DATA}/cache/?o=${order}&s=${search}&f=${filter}&p=${page}" + cache="${_DATA}/cache/?o=${order}&s=${search}&f=${filter}&pn=${page}" if [ "$cache" -nt ${_DATA}/videos -a "$cache" -nt ${_DATA}/meta ]; then cat "$cache" else