Skip to content

Commit

Permalink
Fix genre pills in displayShow.mako when show can't be mapped to imdb. (
Browse files Browse the repository at this point in the history
pymedusa#1539)

* Fix genre pills in displayShow.mako when show can't be mapped to imdb.

* Use the shows get_genres().

* Fixed typo.

* Re-ordered the if thens.

* Somehow my editor is chaning % in f. dunno why?

* Apparently I should test before commit.
  • Loading branch information
p0psicles authored and fernandog committed Nov 14, 2016
1 parent 0ca7603 commit 0ff730e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions views/displayShow.mako
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,13 @@
</div>
<div id="tags">
<ul class="tags">
% if show.imdb_info.get('genres'):
% for imdbgenre in show.imdb_info['genres'].replace('Sci-Fi','Science-Fiction').split('|'):
<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
% elif show.genre:
% 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>
% endfor
% for genre in show.get_genres():
% if not show.genre:
<a href="${anon_url('http://www.imdb.com/search/title?count=100&title_type=tv_series&genres=', genre.lower())}" target="_blank" title="View other popular ${genre} shows on IMDB."><li>${genre}</li></a>
% else:
<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>
% endif
% endfor
</ul>
</div>
Expand Down

0 comments on commit 0ff730e

Please sign in to comment.