Private GIT

Skip to content
Snippets Groups Projects
Commit ed6a19ac authored by Ludovic SARAKHA's avatar Ludovic SARAKHA
Browse files

Implemented subtitles

More option to come such as download subs only for english downloads
/subs folder for xbmc users

and much more
parent 4e1a0eb4
No related branches found
No related tags found
No related merge requests found
Showing
with 388 additions and 11 deletions
......@@ -34,6 +34,8 @@ except:
print "The Python module Cheetah is required"
sys.exit(1)
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), 'lib')))
# We only need this for compiling an EXE and I will just always do that on 2.6+
if sys.hexversion >= 0x020600F0:
from multiprocessing import freeze_support
......
......@@ -827,24 +827,24 @@ config_providers.tmpl
#config-components > h2 {
border-bottom: 4px solid #ddd;
}
#providerOrderList {
#providerOrderList, #service_order_list {
width: 250px;
padding-left: 20px;
list-style-type: none;
}
#providerOrderList li {
#providerOrderList li, #service_order_list li {
padding: 5px;
margin: 5px 0;
font-size: 14px;
}
#providerOrderList input {
#providerOrderList input, #service_order_list input {
margin: 0 2px;
}
.imgLink img {
padding: 0 2px 2px;
}
/* fix drop target height */
#providerOrderList .ui-state-highlight {
#providerOrderList.ui-state-highlight, #service_order_list .ui-state-highlight {
height: 20px;
line-height: 18px;
}
......
/* Example tokeninput style #1: Token vertical list*/
ul.token-input-list {
overflow: hidden;
height: auto !important;
height: 1%;
width: 273px;
border: 1px solid #999;
cursor: text;
font-size: 10px;
font-family: Verdana;
z-index: 999;
margin: 0;
padding: 0 0 1px 0;
background-color: #fff;
list-style-type: none;
/* clear: left; */
border-top-left-radius: 3px;
border-top-right-radius: 3px;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
}
ul.token-input-list li {
list-style-type: none;
}
ul.token-input-list li input {
border: 0;
padding: 3px 4px;
background-color: white;
/* -webkit-appearance: caret; */
}
li.token-input-token {
overflow: hidden;
height: auto !important;
height: 1%;
margin: 3px;
padding: 3px 5px 0 5px;
background-color: #d0efa0;
color: #000;
font-weight: bold;
cursor: default;
display: block;
}
li.token-input-token img {
padding-top: 7px;
padding-right: 4px;
float: left;
}
li.token-input-token input {
padding-top: 2px !important;
padding-right: 4px !important;
float: left;
}
li.token-input-token p {
float: left;
padding: 0;
margin: 0;
line-height: 2.0 !important;
}
li.token-input-token span {
float: right;
color: #777;
cursor: pointer;
}
li.token-input-selected-token {
background-color: #08844e;
color: #fff;
}
li.token-input-selected-token span {
color: #bbb;
}
li.token-input-input-token input {
margin: 3px 3px 3px 3px !important;
}
div.token-input-dropdown {
position: absolute;
width: 273px;
background-color: #fff;
overflow: hidden;
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
cursor: default;
font-size: 11px;
font-family: Verdana;
z-index: 1;
}
div.token-input-dropdown p {
margin: 0;
padding: 3px;
font-weight: bold;
color: #777;
}
div.token-input-dropdown ul {
margin: 0;
padding: 0;
}
div.token-input-dropdown ul li {
background-color: #fff;
padding: 3px;
list-style-type: none;
}
div.token-input-dropdown ul li.token-input-dropdown-item {
background-color: #fafafa;
}
div.token-input-dropdown ul li.token-input-dropdown-item2 {
background-color: #fff;
}
div.token-input-dropdown ul li em {
font-weight: bold;
font-style: normal;
}
div.token-input-dropdown ul li.token-input-selected-dropdown-item {
background-color: #d0efa0;
}
span.token-input-delete-token {
margin: 0 1px;
}
\ No newline at end of file
data/images/closed_captioning.png

337 B

data/images/ee.png

880 B

data/images/subtitles/addic7ed.png

830 B

data/images/subtitles/bierdopje.png

947 B

data/images/subtitles/opensubtitles.png

315 B

data/images/subtitles/podnapisiweb.png

221 B

data/images/subtitles/subscene.png

1.13 KiB

data/images/subtitles/subswiki.png

834 B

data/images/subtitles/subtitlesource.png

485 B

data/images/subtitles/subtitulos.png

642 B

data/images/subtitles/thesubdb.png

524 B

data/images/subtitles/tvsubtitles.png

826 B

......@@ -52,6 +52,13 @@
<span class="component-desc">Send notification when we finish a download?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="xbmc_notify_onsubtitledownload" id="xbmc_notify_onsubtitledownload" #if $sickbeard.XBMC_NOTIFY_ONSUBTITLEDOWNLOAD then "checked=\"checked\"" else ""# />
<label class="clearfix" for="xbmc_notify_onsubtitledownload">
<span class="component-title">Notify on Subtitle Download</span>
<span class="component-desc">Send notification when we finish a subtitle download?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="xbmc_update_library" id="xbmc_update_library" #if $sickbeard.XBMC_UPDATE_LIBRARY then "checked=\"checked\"" else ""# />
<label class="clearfix" for="xbmc_update_library">
......@@ -146,6 +153,13 @@
<span class="component-desc">Send notification when we finish a download?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="plex_notify_onsubtitledownload" id="plex_notify_onsubtitledownload" #if $sickbeard.PLEX_NOTIFY_ONSUBTITLEDOWNLOAD then "checked=\"checked\"" else ""# />
<label class="clearfix" for="plex_notify_onsubtitledownload">
<span class="component-title">Notify on Subtitle Download</span>
<span class="component-desc">Send notification when we finish a subtitle download?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="plex_update_library" id="plex_update_library" #if $sickbeard.PLEX_UPDATE_LIBRARY then "checked=\"checked\"" else ""# />
<label class="clearfix" for="plex_update_library">
......@@ -480,6 +494,13 @@
<span class="component-desc">Send notification when we finish a download?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="growl_notify_onsubtitledownload" id="growl_notify_onsubtitledownload" #if $sickbeard.GROWL_NOTIFY_ONSUBTITLEDOWNLOAD then "checked=\"checked\"" else ""# />
<label class="clearfix" for="growl_notify_onsubtitledownload">
<span class="component-title">Notify on Subtitle Download</span>
<span class="component-desc">Send notification when we finish a subtitle download?</span>
</label>
</div>
<div class="field-pair">
<label class="nocheck clearfix">
<span class="component-title">Growl IP:Port</span>
......@@ -543,6 +564,13 @@
<span class="component-desc">Send notification when we finish a download?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="prowl_notify_onsubtitledownload" id="prowl_notify_onsubtitledownload" #if $sickbeard.PROWL_NOTIFY_ONSUBTITLEDOWNLOAD then "checked=\"checked\"" else ""# />
<label class="clearfix" for="prowl_notify_onsubtitledownload">
<span class="component-title">Notify on Subtitle Download</span>
<span class="component-desc">Send notification when we finish a subtitle download?</span>
</label>
</div>
<div class="field-pair">
<label class="nocheck clearfix">
<span class="component-title">Prowl API key:</span>
......@@ -608,6 +636,13 @@
<span class="component-desc">Send notification when we finish a download?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="notifo_notify_onsubtitledownload" id="notifo_notify_onsubtitledownload" #if $sickbeard.NOTIFO_NOTIFY_ONSUBTITLEDOWNLOAD then "checked=\"checked\"" else ""# />
<label class="clearfix" for="notifo_notify_onsubtitledownload">
<span class="component-title">Notify on Subtitle Download</span>
<span class="component-desc">Send notification when we finish a subtitle download?</span>
</label>
</div>
<div class="field-pair">
<label class="nocheck clearfix">
<span class="component-title">Notifo Username</span>
......@@ -667,6 +702,13 @@
<span class="component-desc">Send notification when we finish a download?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="libnotify_notify_onsubtitledownload" id="libnotify_notify_onsubtitledownload" #if $sickbeard.LIBNOTIFY_NOTIFY_ONSUBTITLEDOWNLOAD then "checked=\"checked\"" else ""# />
<label class="clearfix" for="libnotify_notify_onsubtitledownload">
<span class="component-title">Notify on Subtitle Download</span>
<span class="component-desc">Send notification when we finish a subtitle download?</span>
</label>
</div>
<div class="testNotification" id="testLibnotify-result">Click below to test.</div>
<input type="button" class="btn" value="Test Libnotify" id="testLibnotify" />
<input type="submit" class="btn config_submitter" value="Save Changes" />
......@@ -706,6 +748,13 @@
<span class="component-desc">Send notification when we finish a download?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="pushover_notify_onsubtitledownload" id="pushover_notify_onsubtitledownload" #if $sickbeard.PUSHOVER_NOTIFY_ONSUBTITLEDOWNLOAD then "checked=\"checked\"" else ""# />
<label class="clearfix" for="pushover_notify_onsubtitledownload">
<span class="component-title">Notify on Subtitle Download</span>
<span class="component-desc">Send notification when we finish a subtitle download?</span>
</label>
</div>
<div class="field-pair">
<label class="nocheck clearfix">
<span class="component-title">Pushover User Key</span>
......@@ -754,6 +803,13 @@
<span class="component-desc">Send notification when we finish a download?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="boxcar_notify_onsubtitledownload" id="boxcar_notify_onsubtitledownload" #if $sickbeard.BOXCAR_NOTIFY_ONSUBTITLEDOWNLOAD then "checked=\"checked\"" else ""# />
<label class="clearfix" for="boxcar_notify_onsubtitledownload">
<span class="component-title">Notify on Subtitle Download</span>
<span class="component-desc">Send notification when we finish a subtitle download?</span>
</label>
</div>
<div class="field-pair">
<label class="nocheck clearfix">
<span class="component-title">Boxcar Username</span>
......@@ -803,6 +859,13 @@
<span class="component-desc">Send notification when we finish a download?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="nma_notify_onsubtitledownload" id="nma_notify_onsubtitledownload" #if $sickbeard.NMA_NOTIFY_ONSUBTITLEDOWNLOAD then "checked=\"checked\"" else ""# />
<label class="clearfix" for="nma_notify_onsubtitledownload">
<span class="component-title">Notify on Subtitle Download</span>
<span class="component-desc">Send notification when we finish a subtitle download?</span>
</label>
</div>
<div class="field-pair">
<label class="nocheck clearfix">
<span class="component-title">NMA API key:</span>
......@@ -880,6 +943,13 @@
<span class="component-desc">Send notification when we finish a download?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="twitter_notify_onsubtitledownload" id="twitter_notify_onsubtitledownload" #if $sickbeard.TWITTER_NOTIFY_ONSUBTITLEDOWNLOAD then "checked=\"checked\"" else ""# />
<label class="clearfix" for="twitter_notify_onsubtitledownload">
<span class="component-title">Notify on Subtitle Download</span>
<span class="component-desc">Send notification when we finish a subtitle download?</span>
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Step One</span>
......
#from sickbeard import subtitles
#import sickbeard
#set global $title="Config - Subtitles"
#set global $header="Subtitles"
#set global $sbPath="../.."
#set global $topmenu="config"
#import os.path
#include $os.path.join($sickbeard.PROG_DIR, "data/interfaces/default/inc_top.tmpl")
<script type="text/javascript" src="$sbRoot/js/configSubtitles.js?$sbPID"></script>
<script type="text/javascript" src="$sbRoot/js/config.js"></script>
<script type="text/javascript" src="$sbRoot/js/lib/jquery.tokeninput.js"></script>
<link rel="stylesheet" type="text/css" href="$sbRoot/css/token-input.css" />
<script type="text/javascript">
\$(document).ready(function() {
\$("#subtitles_languages").tokenInput(
[
<%=",\r\n".join("{id: \"" + lang[2] + "\", name: \"" + lang[3] + "\"}" for lang in subtitles.subtitleLanguageFilter())%>
],
{
method: "POST",
hintText: "Write to search a language and select it",
preventDuplicates: true,
prePopulate:
[
<%=
",\r\n".join("{id: \"" + lang + "\", name: \"" + subtitles.getLanguageName(lang) + "\"}" for lang in sickbeard.SUBTITLES_LANGUAGES) if sickbeard.SUBTITLES_LANGUAGES != '' else ''
%>
]
}
);
});
</script>
<div id="config">
<div id="config-content">
<form id="configForm" action="saveSubtitles" method="post">
<div id="config-components">
<div id="core-component-group4" class="component-group clearfix">
<div class="component-group-desc">
<h3>Subtitles Search</h3>
<p>Settings that dictate how Sick Beard handles subtitles search results.</p>
</div>
<fieldset class="component-group-list">
<div class="field-pair">
<input type="checkbox" class="enabler" #if $sickbeard.USE_SUBTITLES then " checked=\"checked\"" else ""# id="use_subtitles" name="use_subtitles">
<label for="use_subtitles" class="clearfix">
<span class="component-title">Search Subtitles</span>
</label>
</div>
<div id="content_use_subtitles">
<div class="field-pair">
<label class="nocheck clearfix">
<span class="component-title">Subtitle Languages</span>
<input type="text" id="subtitles_languages" name="subtitles_languages" style="border: 0px none"/>
</label>
</div>
<div class="field-pair">
<label class="nocheck clearfix">
<span class="component-title">Subtitle Directory</span>
<input type="text" size="35" value="$sickbeard.SUBTITLES_DIR" id="subtitles_dir" name="subtitles_dir">
</label>
<label class="nocheck clearfix">
<span class="component-title">&nbsp;</span>
<span class="component-desc">The directory where Sick Beard should store your <i>Subtitles</i> files.</span>
</label>
<label class="nocheck clearfix">
<span class="component-title">&nbsp;</span>
<span class="component-desc"><b>NOTE:</b> Leave empty if you want store subtitle in episode path.</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="subtitles_history" id="subtitles_history" #if $sickbeard.SUBTITLES_HISTORY then " checked=\"checked\"" else ""#/>
<label class="clearfix" for="subtitles_history">
<span class="component-title">Subtitles History</span>
<span class="component-desc">Log downloaded Subtitle on History page?</span>
</label>
</div>
<br/><input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
</div>
</fieldset>
</div><!-- /component-group1 //-->
<div id="core-component-group2" class="component-group clearfix">
<div class="component-group-desc">
<h3>Subtitle Plugins</h3>
<p>Check off and drag the plugins into the order you want them to be used.</p>
<p class="note">At least one plugin is required.</p>
<p class="note"><span style="color: #654B24; font-size: 16px;">*</span> Web-scraping plugin</p>
</div>
<fieldset class="component-group-list">
<ul id="service_order_list">
#for $curService in $sickbeard.subtitles.sortedServiceList():
#set $curName = $curService.id
<li class="ui-state-default" id="$curName">
<input type="checkbox" id="enable_$curName" class="service_enabler" #if $curService.enabled then "checked=\"checked\"" else ""#/>
<a href="$curService.url" class="imgLink" target="_new">
<img src="$sbRoot/images/subtitles/$curService.image" alt="$curService.name" title="$curService.name" width="16" height="16" />
</a>
$curService.name.capitalize()
#if not $curService.api_based then "*" else ""#
<span class="ui-icon ui-icon-arrowthick-2-n-s pull-right"></span>
</li>
#end for
</ul>
<input type="hidden" name="service_order" id="service_order" value="<%=" ".join([x.get('id')+':'+str(int(x.get('enabled'))) for x in sickbeard.subtitles.sortedServiceList()])%>"/>
<br/><input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
</fieldset>
</div><!-- /component-group2 //-->
<br/><input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
</div><!-- /config-components //-->
</form>
</div></div>
<script type="text/javascript" charset="utf-8">
<!--
jQuery('#subtitles_dir').fileBrowser({ title: 'Select Subtitles Download Directory' });
//-->
</script>
#include $os.path.join($sickbeard.PROG_DIR, "data/interfaces/default/inc_bottom.tmpl")
#import sickbeard
#from sickbeard import subtitles
#import sickbeard.helpers
#from sickbeard.common import *
#import subliminal
#import os.path, os
#import datetime
#set global $title=$show.name
......@@ -46,6 +48,7 @@
<script type="text/javascript" src="$sbRoot/js/displayShow.js?$sbPID"></script>
<script type="text/javascript" src="$sbRoot/js/plotTooltip.js?$sbPID"></script>
<script type="text/javascript" src="$sbRoot/js/ajaxEpSearch.js?$sbPID"></script>
<script type="text/javascript" src="$sbRoot/js/ajaxEpSubtitles.js?$sbPID"></script>
<div class="align-left"><b>Change Show:</b>
<div class="navShow"><img id="prevShow" width="16" height="18" src="$sbRoot/images/prev.gif" alt="&lt;&lt;" title="Prev Show" /></div>
......@@ -95,6 +98,9 @@ replace with: <b><%=", ".join([Quality.qualityStrings[x] for x in sorted(bestQua
</td>
</tr>
<tr><td class="showLegend">Custom Search Names:</td><td>$show.custom_search_names</td></tr>
#if $sickbeard.USE_SUBTITLES
<tr><td class="showLegend">Subtitles: </td><td><img src="$sbRoot/images/#if int($show.subtitles) == 1 then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr>
#end if
<tr><td class="showLegend">Flatten Folders: </td><td><img src="$sbRoot/images/#if $show.flatten_folders == 1 or $sickbeard.NAMING_FORCE_FOLDERS then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr>
<tr><td class="showLegend">Paused: </td><td><img src="$sbRoot/images/#if int($show.paused) == 1 then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr>
<tr><td class="showLegend">Air-by-Date: </td><td><img src="$sbRoot/images/#if int($show.air_by_date) == 1 then "yes16.png\" alt=\"Y" else "no16.png\" alt=\"N"#" width="16" height="16" /></td></tr>
......@@ -148,13 +154,13 @@ Change Audio of selected episodes to
#for $epResult in $sqlResults:
#if int($epResult["season"]) != $curSeason:
<tr><td colspan="9"><a name="season-$epResult["season"]"></a></td></tr>
<tr><td colspan="10"><a name="season-$epResult["season"]"></a></td></tr>
<tr class="seasonheader" id="season-$epResult["season"]">
<td colspan="9">
<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><th>Name</th><th class="nowrap">Airdate</th><th>Filename</th><th>Audio</th><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>NFO</th><th>TBN</th><th>Episode</th><th>Name</th><th class="nowrap">Airdate</th><th>Filename</th><th>Audio</th>#if $sickbeard.USE_SUBTITLES and $show.subtitles then "<th>Subs</th>" else ""#<th>Status</th><th>Search</th></tr>
#set $curSeason = int($epResult["season"])
#end if
......@@ -187,15 +193,31 @@ $epLoc
<td align="center" class="audio_langs_column">
<img src="$sbRoot/images/flags/${epResult["audio_langs"]}.png" alt="$epResult["audio_langs"]" width="16" />
</td>
</small>
</td>
#if $sickbeard.USE_SUBTITLES and $show.subtitles:
<td id="subtitles_column" class="subtitles_column" align="center">
#if $epResult["subtitles"]:
#for $sub_lang in subliminal.language.language_list($epResult["subtitles"].split(',')):
#if sub_lang.alpha2 != ""
<img src="$sbRoot/images/flags/${sub_lang.alpha2}.png" width="16" height="11" alt="${sub_lang}" />
#end if
#end for
#end if
</td>
#end if
#set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($epResult["status"]))
#if $curQuality != Quality.NONE:
<td class="status_column">$statusStrings[$curStatus] <span class="quality $Quality.qualityStrings[$curQuality].replace("720p","HD720p").replace("1080p","HD1080p").replace("RawHD TV", "RawHD").replace("HD TV", "HD720p")">$Quality.qualityStrings[$curQuality]</span></td>
<td class="status_column" align="center">$statusStrings[$curStatus] <span class="quality $Quality.qualityStrings[$curQuality].replace("720p","HD720p").replace("1080p","HD1080p").replace("RawHD TV", "RawHD").replace("HD TV", "HD720p")">$Quality.qualityStrings[$curQuality]</span></td>
#else:
<td class="status_column">$statusStrings[$curStatus]</td>
<td class="status_column" align="center">$statusStrings[$curStatus]</td>
#end if
<td align="center">
#if int($epResult["season"]) != 0:
<a class="epSearch" href="searchEpisode?show=$show.tvdbid&amp;season=$epResult["season"]&amp;episode=$epResult["episode"]"><img src="$sbRoot/images/search16.png" height="16" alt="search" title="Manual Search" /></a>
#end if
#if $sickbeard.USE_SUBTITLES and $show.subtitles and len(set(str($epResult["subtitles"]).split(',')).intersection(set($subtitles.wantedLanguages()))) < len($subtitles.wantedLanguages()) and $epResult["location"]
<a class="epSubtitlesSearch" href="searchEpisodeSubtitles?show=$show.tvdbid&amp;season=$epResult["season"]&amp;episode=$epResult["episode"]"><img src="$sbRoot/images/closed_captioning.png" height="16" alt="search subtitles" title="Search Subtitles" /></a>
#end if
</td>
</tr>
......
......@@ -79,7 +79,7 @@ Custom Search Names: <input type="text" name="custom_search_names" id="custom_se
<br />
Flatten files (no folders): <input type="checkbox" name="flatten_folders" #if $show.flatten_folders == 1 and not $sickbeard.NAMING_FORCE_FOLDERS then "checked=\"checked\"" else ""# #if $sickbeard.NAMING_FORCE_FOLDERS then "disabled=\"disabled\"" else ""#/><br /><br />
Paused: <input type="checkbox" name="paused" #if $show.paused == 1 then "checked=\"checked\"" else ""# /><br /><br />
Download subtitles: <input type="checkbox" name="subtitles"#if $show.subtitles == 1 and $sickbeard.USE_SUBTITLES then " checked=\"checked\"" else ""##if not $sickbeard.USE_SUBTITLES then " disabled=\"disabled\"" else ""#/><br /><br />
Air by date:
<input type="checkbox" name="air_by_date" #if $show.air_by_date == 1 then "checked=\"checked\"" else ""# /><br />
(check this if the show is released as Show.03.02.2010 rather than Show.S02E03)
......
......@@ -48,9 +48,13 @@
#set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($hItem["action"]))
<tr>
<td class="nowrap">$datetime.datetime.strptime(str($hItem["date"]), $history.dateFormat)</td>
<td><a href="$sbRoot/home/displayShow?show=$hItem["showid"]#season-$hItem["season"]">$hItem["show_name"] - <%=str(hItem["season"]) +"x"+ "%02i" % int(hItem["episode"]) %></a></td>
<td align="center">$statusStrings[$curStatus]</td>
<td align="center">
<td align="center" #if $curStatus == SUBTITLED then 'class="subtitles_column"' else ''#><span style="cursor: help;" title="$os.path.basename($hItem["resource"])">$statusStrings[$curStatus]</span>
#if $curStatus == SUBTITLED:
<img width="16" height="11" src="/images/flags/<%= hItem["resource"][len(hItem["resource"])-6:len(hItem["resource"])-4]+'.png'%>">
#end if
</td><td align="center">
#if $curStatus == DOWNLOADED and $str($hItem["provider"]) == '-1':
#set $match = $re.search("\-(\w+)\.\w{3}\Z", $os.path.basename($hItem["resource"]))
#if $match:
......@@ -67,12 +71,16 @@
$hItem["provider"]
#else
#if $len($hItem["provider"]) > 0
#if $curStatus == SNATCHED:
#set $provider = $providers.getProviderClass($generic.GenericProvider.makeID($hItem["provider"]))
#if $provider != None:
<img src="$sbRoot/images/providers/<%=provider.imageName()%>" width="16" height="16" alt="$provider.name" title="$provider.name"/>
#else:
<img src="$sbRoot/images/providers/missing.png" width="16" height="16" alt="missing provider" title="missing provider"/>
#end if
#else:
<img src="$sbRoot/images/subtitles/<%=hItem["provider"]+'.png' %>" width="16" height="16" alt="$hItem["provider"]" title="<%=hItem["provider"].capitalize()%>"/>
#end if
#end if
#end if
</td>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment