Private GIT

Skip to content
Snippets Groups Projects
Commit 476cdf15 authored by Fernando's avatar Fernando Committed by fernandog
Browse files

Fix issue where genre wasn't showing and year and empty year

Seems the empty year is was causing the tag not showing

The only way to show the genre tag is removing "not show.imdbid" - don't know why

But I also can't understand why there's another minor empty tag

Workign show:
![1](https://cloud.githubusercontent.com/assets/2620870/11717754/9c187e4e-9f39-11e5-9514-5afd43cd82b5.png)

Before:
![2](https://cloud.githubusercontent.com/assets/2620870/11717755/9c746fc4-9f39-11e5-89fd-de05679c7cda.png)

After:
![image](https://cloud.githubusercontent.com/assets/2620870/11718585/d0f28764-9f3d-11e5-81a1-855ae0b3a655.png)
parent 895d065c
Branches
Tags
No related merge requests found
...@@ -126,9 +126,12 @@ ...@@ -126,9 +126,12 @@
<img src="${srRoot}/images/blank.png" class="country-flag flag-${country}" width="16" height="11" style="margin-left: 3px; vertical-align:middle;" /> <img src="${srRoot}/images/blank.png" class="country-flag flag-${country}" width="16" height="11" style="margin-left: 3px; vertical-align:middle;" />
% endfor % endfor
% endif % endif
% if 'year' in show.imdb_info: <span>
<span>(${show.imdb_info['year']}) - ${show.imdb_info['runtimes']} minutes - </span> % if 'year' in show.imdb_info and show.imdb_info['year']:
(${show.imdb_info['year']}) -
% endif % endif
${show.imdb_info['runtimes']} minutes</span>
<a href="${anon_url('http://www.imdb.com/title/', _show.imdbid)}" rel="noreferrer" onclick="window.open(this.href, '_blank'); return false;" title="http://www.imdb.com/title/${show.imdbid}"><img alt="[imdb]" height="16" width="16" src="${srRoot}/images/imdb.png" style="margin-top: -1px; vertical-align:middle;"/></a> <a href="${anon_url('http://www.imdb.com/title/', _show.imdbid)}" rel="noreferrer" onclick="window.open(this.href, '_blank'); return false;" title="http://www.imdb.com/title/${show.imdbid}"><img alt="[imdb]" height="16" width="16" src="${srRoot}/images/imdb.png" style="margin-top: -1px; vertical-align:middle;"/></a>
% endif % endif
<a href="${anon_url(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"] + str(show.indexerid)}"><img alt="${sickbeard.indexerApi(show.indexer).name}" height="16" width="16" src="${srRoot}/images/${sickbeard.indexerApi(show.indexer).config["icon"]}" style="margin-top: -1px; vertical-align:middle;"/></a> <a href="${anon_url(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"] + str(show.indexerid)}"><img alt="${sickbeard.indexerApi(show.indexer).name}" height="16" width="16" src="${srRoot}/images/${sickbeard.indexerApi(show.indexer).config["icon"]}" style="margin-top: -1px; vertical-align:middle;"/></a>
...@@ -139,14 +142,13 @@ ...@@ -139,14 +142,13 @@
<div id="tags"> <div id="tags">
<ul class="tags"> <ul class="tags">
% if not show.imdbid and show.genre: % if ('genres' not in show.imdb_info or not show.imdb_info['genres']) and show.genre:
% for genre in show.genre[1:-1].split('|'): % for genre in show.genre[1:-1].split('|'):
<a href="${anon_url('http://trakt.tv/shows/popular/?genres=', genre.lower())}" target="_blank" title="View other popular ${genre} shows on trakt.tv."><li>${genre}</li></a> <a href="${anon_url('http://trakt.tv/shows/popular/?genres=', genre.lower())}" target="_blank" title="View other popular ${genre} shows on trakt.tv."><li>${genre}</li></a>
% endfor % endfor
% endif % elif 'genres' in show.imdb_info and show.imdb_info['genres']:
% if 'year' in show.imdb_info:
% for imdbgenre in show.imdb_info['genres'].replace('Sci-Fi','Science-Fiction').split('|'): % for imdbgenre in show.imdb_info['genres'].replace('Sci-Fi','Science-Fiction').split('|'):
<a href="${anon_url('http://trakt.tv/shows/popular/?genres=', imdbgenre.lower())}" target="_blank" title="View other popular ${imdbgenre} shows on trakt.tv."><li>${imdbgenre}</li></a> <a href="${anon_url('http://www.imdb.com/search/title?count=100&title_type=tv_series&genres=', imdbgenre.lower())}" target="_blank" title="View other popular ${imdbgenre} shows on IMDB."><li>${imdbgenre}</li></a>
% endfor % endfor
% endif % endif
</ul> </ul>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment