Don't show the Download column when the download_url is not set

This commit is contained in:
Kevin Lemonnier 2015-01-15 11:11:32 +01:00
parent 39edad882e
commit 53c9418084
1 changed files with 6 additions and 8 deletions

View File

@ -377,7 +377,9 @@
#end if
<th class="col-name">Name</th>
<th class="col-airdate">Airdate</th>
#if len($sickbeard.DOWNLOAD_URL) > 0
<th class="col-ep">Download</th>
#end if
#if $sickbeard.USE_SUBTITLES and $show.subtitles:
<th class="col-subtitles">Subtitles</th>
#end if
@ -473,8 +475,8 @@
<span class="${fuzzydate}">#if int($epResult['airdate']) == 1 then 'never' else $sbdatetime.sbdatetime.sbfdate($sbdatetime.sbdatetime.convert_to_setting($network_timezones.parse_date_time($epResult['airdate'],$show.airs,$show.network)))#</span>
</td>
<td>
#if len($sickbeard.DOWNLOAD_URL) > 0 and len($epResult['location']) > 0
<td>
#set $filename = $epResult['location']
#for $rootDir in $sickbeard.ROOT_DIRS.split('|')
#if $rootDir.startswith('/')
@ -483,14 +485,10 @@
#end for
#set $filename = $sickbeard.DOWNLOAD_URL + $urllib.quote($filename.encode('utf8'))
<center><a href="$filename">Download</a></center>
#else
#if $epLoc and $show._location and $epLoc.lower().startswith($show._location.lower()):
$epLoc[len($show._location)+1:]
#elif $epLoc and (not $epLoc.lower().startswith($show._location.lower()) or not $show._location):
$epLoc
#end if
#end if
</td>
#elif len($sickbeard.DOWNLOAD_URL) > 0
<td></td>
#end if
#if $sickbeard.USE_SUBTITLES and $show.subtitles:
<td class="col-subtitles" align="center">