]> git.plutz.net Git - serve0/commitdiff
consider height *and* width when deciding whether raspi should transcode
authorpaul <paul@plutz.net>
Mon, 25 May 2015 12:40:48 +0000 (12:40 +0000)
committerpaul <paul@plutz.net>
Mon, 25 May 2015 12:40:48 +0000 (12:40 +0000)
svn path=/trunk/; revision=50

pages/common.sh

index 739f4caf1726629f685055a24afa62d12b48dbd0..5e233142f7d289ffb354fbe3d868f7c70cce5081 100755 (executable)
@@ -67,10 +67,10 @@ _printVideo(){
       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")"
+    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="<a class=\"videolink alt raspi\" href=\"${rpicgi}\">RasPi</a>" \
     || raspi="<a class=\"videolink alt raspi\" href=\"${rpidull}\">RasPi</a>"
     [ $height -gt 480 ] && \