Fix for daily searcher NoneType error.

Added XEM icon to show display, indicates if show has scene mapping available or not plus clicking on the icon will take you to the XEM mapping page.
This commit is contained in:
echel0n 2014-05-30 04:06:51 -07:00
parent 70e7f1bfce
commit db6cf0b22b
5 changed files with 21 additions and 18 deletions

BIN
gui/slick/images/xem.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View file

@ -72,14 +72,12 @@
<div class="showInfo"> <div class="showInfo">
<h1 class="title" id="scene_exception_$show.indexerid"><a>$show.name</a></h1> <h1 class="title" id="scene_exception_$show.indexerid"><a>$show.name</a></h1>
<span class="headerInfo" style="color: #b7b7b7; line-height: 16px;"> <span class="headerInfo" style="color: #b7b7b7; line-height: 16px;">
<span class="tvshowLink" style="vertical-align: text-top">
#if not $show.imdbid #if not $show.imdbid
($show.startyear) - $show.runtime min ($show.startyear) - $show.runtime min
#if $show.genre: #if $show.genre:
- $show.genre[1:-1].replace('|',' | ') - $show.genre[1:-1].replace('|',' | ')
#end if #end if
<span class="tvshowLink" style="vertical-align: text-top">
<a href="$sickbeard.indexerApi($show.indexer).config["show_url"]$show.indexerid" onclick="window.open(this.href, '_blank'); return false;" title="$sickbeard.indexerApi($show.indexer).config["show_url"]$show.indexerid"><img alt="$sickbeard.indexerApi($show.indexer).name" height="16" width="16" src="$sbRoot/images/$sickbeard.indexerApi($show.indexer).config["icon"] "style="margin-top: -1px;"/></a>
</span>
#else #else
#if 'country_codes' in $show.imdb_info: #if 'country_codes' in $show.imdb_info:
#for $country in $show.imdb_info['country_codes'].split('|') #for $country in $show.imdb_info['country_codes'].split('|')
@ -89,11 +87,13 @@
#if 'year' in $show.imdb_info: #if 'year' in $show.imdb_info:
($show.imdb_info['year']) - $show.imdb_info['runtimes'] min - $show.imdb_info['genres'].replace('|',' | ') ($show.imdb_info['year']) - $show.imdb_info['runtimes'] min - $show.imdb_info['genres'].replace('|',' | ')
#end if #end if
<span class="tvshowLink" style="vertical-align: text-top"> <a href="http://www.imdb.com/title/$show.imdbid" rel="noreferrer" onclick="window.open('${sickbeard.ANON_REDIRECT}' + this.href, '_blank'); return false;" title="http://www.imdb.com/title/$show.imdbid"><img alt="[imdb]" height="16" width="16" src="$sbRoot/images/imdb.png" style="margin-top: -1px;"/>
<a href="http://www.imdb.com/title/$show.imdbid" rel="noreferrer" onclick="window.open('${sickbeard.ANON_REDIRECT}' + this.href, '_blank'); return false;" title="http://www.imdb.com/title/$show.imdbid"><img alt="[imdb]" height="16" width="16" src="$sbRoot/images/imdb.png" style="margin-top: -1px;"/>
<a href="$sickbeard.indexerApi($show.indexer).config["show_url"]$show.indexerid" rel="noreferrer" onclick="window.open('${sickbeard.ANON_REDIRECT}' + this.href, '_blank'); return false;" title="$sickbeard.indexerApi($show.indexer).config["show_url"]$show.indexerid"><img alt="$sickbeard.indexerApi($show.indexer).name" height="16" width="16" src="$sbRoot/images/$sickbeard.indexerApi($show.indexer).config["icon"] "style="margin-top: -1px;"/></a>
</span>
#end if #end if
<a href="$sickbeard.indexerApi($show.indexer).config["show_url"]$show.indexerid" onclick="window.open(this.href, '_blank'); return false;" title="$sickbeard.indexerApi($show.indexer).config["show_url"]$show.indexerid"><img alt="$sickbeard.indexerApi($show.indexer).name" height="16" width="16" src="$sbRoot/images/$sickbeard.indexerApi($show.indexer).config["icon"] "style="margin-top: -1px;"/></a>
#if $xem_numbering or $xem_absolute_numbering:
<a href="http://thexem.de/search?q=$show.name" rel="noreferrer" onclick="window.open('${sickbeard.ANON_REDIRECT}' + this.href, '_blank'); return false;" title="http://thexem.de/search?q-$show.name"><img alt="[xem]" height="16" width="16" src="$sbRoot/images/xem.png" style="margin-top: -1px;"/>
#end if
</span>
</span> </span>
#if $seasonResults: #if $seasonResults:
##There is a special/season_0?## ##There is a special/season_0?##

View file

@ -56,9 +56,12 @@
6: { sorter: false}, 6: { sorter: false},
7: { sorter: false}, 7: { sorter: false},
8: { sorter: false}, 8: { sorter: false},
9: { sorter: false} 9: { sorter: false},
10: { sorter: false},
11: { sorter: false},
12: { sorter: false}
#if $sickbeard.USE_SUBTITLES #if $sickbeard.USE_SUBTITLES
, 10: { sorter: false} , 13: { sorter: false}
#end if #end if
} }
}); });
@ -79,10 +82,11 @@
<th width="1%">Edit<br/> <th width="1%">Edit<br/>
<input type="checkbox" class="bulkCheck" id="editCheck" /> <input type="checkbox" class="bulkCheck" id="editCheck" />
</th> </th>
<!-- <th>Lang</th>//-->
<th class="nowrap" style="text-align: left;">Show Name</th> <th class="nowrap" style="text-align: left;">Show Name</th>
<th>Quality</th> <th>Quality</th>
<th>Sports</th> <th>Sports</th>
<th>Scene</th>
<th>Anime</th> <th>Anime</th>
<th>Flat Folders</th> <th>Flat Folders</th>
<th>Paused</th> <th>Paused</th>
@ -100,7 +104,7 @@
<tfoot> <tfoot>
<tr> <tr>
<td rowspan="1" colspan="1" class="align-center alt"><input class="btn" type="button" value="Edit Selected" id="submitMassEdit" /></td> <td rowspan="1" colspan="1" class="align-center alt"><input class="btn" type="button" value="Edit Selected" id="submitMassEdit" /></td>
<td rowspan="1" colspan="#if $sickbeard.USE_SUBTITLES then 11 else 10#" class="align-right alt"><input class="btn btn-primary" type="button" value="Submit" id="submitMassUpdate" /></td> <td rowspan="1" colspan="#if $sickbeard.USE_SUBTITLES then 13 else 12#" class="align-right alt"><input class="btn btn-primary" type="button" value="Submit" id="submitMassUpdate" /></td>
</tr> </tr>
</tfoot> </tfoot>
<tbody> <tbody>
@ -137,7 +141,6 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name))
<tr> <tr>
<td align="center"><input type="checkbox" class="editCheck" id="edit-$curShow.indexerid" /></td> <td align="center"><input type="checkbox" class="editCheck" id="edit-$curShow.indexerid" /></td>
<!-- <td align="center"><img src="$sbRoot/images/flags/${curShow.lang}.png" width="16" height="11" alt="$curShow.lang" /></td>//-->
<td class="tvShow"><a href="$sbRoot/home/displayShow?show=$curShow.indexerid">$curShow.name</a></td> <td class="tvShow"><a href="$sbRoot/home/displayShow?show=$curShow.indexerid">$curShow.name</a></td>
#if $curShow.quality in $qualityPresets: #if $curShow.quality in $qualityPresets:
<td align="center"><span class="quality $qualityPresetStrings[$curShow.quality]">$qualityPresetStrings[$curShow.quality]</span></td> <td align="center"><span class="quality $qualityPresetStrings[$curShow.quality]">$qualityPresetStrings[$curShow.quality]</span></td>
@ -145,6 +148,7 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name))
<td align="center"><span class="quality Custom">Custom</span></td> <td align="center"><span class="quality Custom">Custom</span></td>
#end if #end if
<td align="center"><img src="$sbRoot/images/#if int($curShow.is_sports) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td> <td align="center"><img src="$sbRoot/images/#if int($curShow.is_sports) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td>
<td align="center"><img src="$sbRoot/images/#if int($curShow.is_scene) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td>
<td align="center"><img src="$sbRoot/images/#if int($curShow.is_anime) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td> <td align="center"><img src="$sbRoot/images/#if int($curShow.is_anime) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td>
<td align="center"><img src="$sbRoot/images/#if int($curShow.flatten_folders) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td> <td align="center"><img src="$sbRoot/images/#if int($curShow.flatten_folders) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td>
<td align="center"><img src="$sbRoot/images/#if int($curShow.paused) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td> <td align="center"><img src="$sbRoot/images/#if int($curShow.paused) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td>
@ -155,7 +159,6 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name))
#if $sickbeard.USE_SUBTITLES: #if $sickbeard.USE_SUBTITLES:
<td align="center">$curSubtitle</td> <td align="center">$curSubtitle</td>
#end if #end if
<!-- <td align="center"><input type="checkbox" class="metadataCheck" id="metadata-$curShow.indexerid" /></td>//-->
<td align="center">$curDelete</td> <td align="center">$curDelete</td>
</tr> </tr>
#end for #end for

View file

@ -79,11 +79,11 @@ class DailySearcher():
else: else:
todaysEps[show].append(ep) todaysEps[show].append(ep)
sql_l.append(ep.get_sql()) sql_l.append(ep.get_sql())
if len(sql_l) > 0: if len(sql_l) > 0:
myDB = db.DBConnection() myDB = db.DBConnection()
myDB.mass_action(sql_l) myDB.mass_action(sql_l)
if len(todaysEps): if len(todaysEps):
for show in todaysEps: for show in todaysEps:

View file

@ -2963,7 +2963,7 @@ class Home:
showObj.exceptions = scene_exceptions.get_scene_exceptions(showObj.indexerid) showObj.exceptions = scene_exceptions.get_scene_exceptions(showObj.indexerid)
# Update scene numbering in DB # Update scene numbering in DB
sickbeard.scene_numbering.xem_refresh(showObj.indexerid, showObj.indexer, True) sickbeard.scene_numbering.xem_refresh(showObj.indexerid, showObj.indexer)
myDB = db.DBConnection() myDB = db.DBConnection()