mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
Fixed web_root issues, Play videos directly from browser when displaying show via HTML5/JS ** WORK IN PROGRESS **
This commit is contained in:
parent
c3a13814f1
commit
04f6b8fc8b
BIN
gui/slick/images/play.gif
Normal file
BIN
gui/slick/images/play.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 898 B |
@ -11,8 +11,10 @@
|
||||
#set $exceptions_string = " | ".join($show.exceptions)
|
||||
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl")
|
||||
|
||||
<script type="text/javascript" src="$sbRoot/js/lib/jquery.bookmarkscroll.js?$sbPID"></script>
|
||||
<link href="//vjs.zencdn.net/4.6/video-js.css" rel="stylesheet">
|
||||
<script src="//vjs.zencdn.net/4.6/video.js"></script>
|
||||
|
||||
<script type="text/javascript" src="$sbRoot/js/lib/jquery.bookmarkscroll.js?$sbPID"></script>
|
||||
|
||||
#if $show_message:
|
||||
<div id="show_message" class="ui-corner-all">$show_message</div><br />
|
||||
@ -28,6 +30,10 @@
|
||||
<script type="text/javascript" src="$sbRoot/js/ajaxEpRetry.js?$sbPID"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
<!--
|
||||
player1 = V('video-player');
|
||||
jQuery('.vjs-big-play-button').live('click', function(event) {
|
||||
player1.requestFullScreen(); });
|
||||
|
||||
\$(document).ready(function(){
|
||||
#set $fuzzydate = 'airdate'
|
||||
#if $sickbeard.FUZZY_DATING:
|
||||
@ -305,13 +311,13 @@
|
||||
#end if
|
||||
|
||||
#if int($epResult["season"]) != $curSeason:
|
||||
<tr><td colspan="11" style="height: 0px; padding:0; margin:0;"><a name="season-$epResult["season"]"></a></td></tr>
|
||||
<tr><td colspan="12" style="height: 0px; padding:0; margin:0;"><a name="season-$epResult["season"]"></a></td></tr>
|
||||
<tr class="seasonheader" id="season-$epResult["season"]" >
|
||||
<td colspan="11">
|
||||
<td colspan="12">
|
||||
<h2>#if int($epResult["season"]) == 0 then "Specials" else "Season "+str($epResult["season"])#</h2>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="season-$epResult["season"]-cols"><th width="1%"><input type="checkbox" class="seasonCheck" id="$epResult["season"]" /></th><th>NFO</th><th>TBN</th><th>Episode</th>#if $show.is_anime then "<th>Absolute</th>" else ""# #if $scene then "<th>Scene #</th>" else ""# #if $scene_anime then "<th>Scene Absolute</th>" else ""#<th>Name</th><th class="nowrap">Airdate</th>#if $sickbeard.USE_SUBTITLES and $show.subtitles then "<th>Subtitles</th>" else ""#<th>Status</th><th>Search</th></tr>
|
||||
<tr id="season-$epResult["season"]-cols"><th width="1%"><input type="checkbox" class="seasonCheck" id="$epResult["season"]" /></th><th>Video</th><th>NFO</th><th>TBN</th><th>Episode</th>#if $show.is_anime then "<th>Absolute</th>" else ""# #if $scene then "<th>Scene #</th>" else ""# #if $scene_anime then "<th>Scene Absolute</th>" else ""#<th>Name</th><th class="nowrap">Airdate</th>#if $sickbeard.USE_SUBTITLES and $show.subtitles then "<th>Subtitles</th>" else ""#<th>Status</th><th>Search</th></tr>
|
||||
#set $curSeason = int($epResult["season"])
|
||||
#end if
|
||||
|
||||
@ -322,6 +328,16 @@
|
||||
#if int($epResult["status"]) != $UNAIRED
|
||||
<input type="checkbox" class="epCheck" id="<%=str(epResult["season"])+'x'+str(epResult["episode"])%>" name="<%=str(epResult["season"]) +"x"+str(epResult["episode"]) %>" />
|
||||
#end if
|
||||
</td>
|
||||
<td>
|
||||
#if $epResult["location"] != "" and $epResult["location"] != None:
|
||||
<div class="video-container">
|
||||
<video id="$epResult["name"]" class="video-js vjs-default-skin video-small yjh5v_center" controls width="64" height="64"poster="http://video-js.zencoder.com/oceans-clip.jpg" autoplay="false "preload="auto">
|
||||
<source src="file:///$epResult["location"]" type='video/mp4' />
|
||||
<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
|
||||
</video>
|
||||
</div>
|
||||
#end if
|
||||
</td>
|
||||
<td align="center"><img src="$sbRoot/images/#if $epResult["hasnfo"] == 1 then "nfo.gif\" alt=\"Y" else "nfo-no.gif\" alt=\"N"#" width="23" height="11" /></td>
|
||||
<td align="center"><img src="$sbRoot/images/#if $epResult["hastbn"] == 1 then "tbn.gif\" alt=\"Y" else "tbn-no.gif\" alt=\"N"#" width="23" height="11" /></td>
|
||||
@ -374,7 +390,7 @@
|
||||
<img style="padding-top: 3px;" src="$sbRoot/images/info32.png" width="16" height="16" class="plotInfo" alt="" id="plot_info_$show.indexerid<%="_"+str(epResult["season"])+"_"+str(epResult["episode"])%>" />
|
||||
#end if
|
||||
$epResult["name"]
|
||||
</td>
|
||||
</td>
|
||||
<td align="center" class="nowrap"><span class="${fuzzydate}">#if int($epResult["airdate"]) == 1 then "never" else $sbdatetime.sbdatetime.sbfdate($network_timezones.parse_date_time($epResult["airdate"],$show.airs,$show.network))#</span></td>
|
||||
#if $sickbeard.USE_SUBTITLES and $show.subtitles:
|
||||
<td id="subtitles_column" class="subtitles_column" align="left">
|
||||
|
@ -165,7 +165,7 @@ class MainHandler(RequestHandler):
|
||||
if status_code == 401:
|
||||
self.finish(self.http_error_401_handler())
|
||||
elif status_code == 404:
|
||||
self.redirect('/home/')
|
||||
redirect('/home/')
|
||||
else:
|
||||
logger.log(traceback.format_exc(), logger.DEBUG)
|
||||
super(MainHandler, self).write_error(status_code, **kwargs)
|
||||
|
@ -80,9 +80,9 @@ class SRWebServer(threading.Thread):
|
||||
|
||||
# Main Handler
|
||||
self.app.add_handlers(".*$", [
|
||||
(r"%s" % self.options['web_root'], RedirectHandler, {'url': '%s/home/' % self.options['web_root']}),
|
||||
(r'%s/api/(.*)(/?)' % self.options['web_root'], webapi.Api),
|
||||
(r'%s/(.*)(/?)' % self.options['web_root'], webserve.MainHandler)
|
||||
(r'%s/(.*)(/?)' % self.options['web_root'], webserve.MainHandler),
|
||||
(r'(.*)', webserve.MainHandler)
|
||||
])
|
||||
|
||||
# Static Path Handler
|
||||
|
Loading…
Reference in New Issue
Block a user