]> git.plutz.net Git - serve0/commitdiff
Raspi quick play link
authorpaul <paul@plutz.net>
Fri, 24 Apr 2015 13:40:18 +0000 (13:40 +0000)
committerpaul <paul@plutz.net>
Fri, 24 Apr 2015 13:40:18 +0000 (13:40 +0000)
svn path=/trunk/; revision=38

pages/videoview.sh

index 02974481de6cf6ad0b8938eb9a6d4b17e405bb37..5a8f225765df7fc5cf67bcb8e4dece8587013938 100755 (executable)
@@ -84,15 +84,10 @@ _printVideo(){
     [ -z "$width" ] && width=0
     [ -z "$height" ] && height=0
 
-#    reenc="${_DATA}/vp8/$(sed -r 's:^(.*)\.[a-zA-Z0-9]{3,4}$:\1:' <<<"$info" )"
-#    mpfake="${_DATA}/mp4/$(sed -r 's:^(.*)\.[a-zA-Z0-9]{3,4}$:\1.mp4:' <<<"$info" )"
-#    [ -f "$reenc.mp4" ] && reenc="$reenc.mp4" || reenc="$reenc.mkv"
     [ -r "$meta" ] || ". ${_EXEC}/helpers/genmeta.sh" "$video" "$meta"
     [ -r "$thumb" ] || ". ${_EXEC}/helpers/genthumb.sh" "$video" "$thumb"
-#    [ -L "$mpfake" ] || ln -s "../videos/$info" "$mpfake"
     video="$(urlsave "videos/$info")"
     thumb="$(urlsave "thumbs/$info.jpg")"
-#    mpfake="$(urlsave "$info" |sed -r 's:^(.*)\.[a-zA-Z0-9]{3,4}$:mp4/\1.mp4:')"
 
     [ "$(($length % 60))" -lt 10 ] &&\
       minutes="$(($length / 60)):0$(($length % 60))" ||\
@@ -100,6 +95,11 @@ _printVideo(){
 
     linkinfo="$(urlsave "$info")"
 
+    rpibase="http://pfostenpanne/?path=http://jupiter:8000/"
+
+    [ $height -gt 480 ] && \
+       raspi="<a class=\"videolink alt raspi\" href=\"${rpibase}?action=transcode&i=${linkinfo}&t=480\">RasPi</a>"
+    || raspi="<a class=\"videolink alt raspi\" href=\"${rpibase}${video}\">RasPi</a>"
     [ $height -gt 480 ] && \
       alt480="<a class=\"videolink alt 480p\" href=\"?action=transcode&i=${linkinfo}&t=480\">480p</a>" \
     ||unset alt480
@@ -113,9 +113,7 @@ _printVideo(){
           <img src="$thumb">
         </a>
         <a class="videolink" href="$video">$info</a>
-        ${alt480} ${alt320} ${alt240} <br>
-        <!-- a href="$reenc">VP8</a -->
-        <!-- a class="videolink fake-mp4" href="$mpfake">fake-mp4</a -->
+        ${alt480} ${alt320} ${alt240} ${raspi}<br>
         
         <input type="checkbox" name="tagsel" value="$info">
         <span class="info property">${minutes}min</span>