This repository has been archived by the owner on Nov 13, 2017. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
partial change for new search system
- Loading branch information
Showing
10 changed files
with
109 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,42 @@ | ||
<%inherit file="body.html"/> | ||
<div id="container-tracks"> | ||
% if len(c.artists) == 0 and len(c.albums) == 0 and len(c.tracks) == 0: | ||
<div style="margin:20px">nothing found</div> | ||
% endif | ||
|
||
% if len(c.artists): | ||
<div class="searchresultsbox"> | ||
<h4>artists</h4> | ||
<ul id="list"> | ||
% for a in c.artists: | ||
<% | ||
fixed_artist = a.decode('utf-8') | ||
|
||
<style> | ||
body { | ||
margin:0; | ||
padding:0; | ||
background-color:#eeeeee; | ||
overflow-x:hidden; | ||
} | ||
</style> | ||
try: | ||
if a.startswith(('The ','THE ','the ')): | ||
firstchar = fixed_artist[4].lower() | ||
else: | ||
firstchar = fixed_artist[0].lower() | ||
except IndexError: | ||
firstchar = '' | ||
%> | ||
<li><a onclick="artistAlbums('${h.escape_js(fixed_artist)}')">${fixed_artist}</a></li> | ||
% endfor | ||
</ul> | ||
</div> | ||
% endif | ||
|
||
<div id="container-tracks"> | ||
<ul id="list"> | ||
% if len(c.results) == 0: | ||
<div style="margin:20px">no tracks found</div> | ||
% endif | ||
% for t in c.results: | ||
<% h.format_title_search(t) %> | ||
<li><a onclick="addToPlaylist('${h.html.url_escape(t['file'])}')"><img src="/img/add.png" /> ${t['formattedtrack']}</a></li> | ||
% endfor | ||
</ul> | ||
% if len(c.albums): | ||
<div class="searchresultsbox"> | ||
<h4>albums</h4> | ||
<ul id="list"> | ||
% for a in c.albums: | ||
<% | ||
artist_utf8 = a[0].decode('utf-8') | ||
album_utf8 = a[1].decode('utf-8') | ||
%> | ||
<li><a onclick="artistAlbums('${h.escape_js(artist_utf8)}');albumTracks('${h.escape_js(artist_utf8)}','${h.escape_js(album_utf8)}')">${artist_utf8} - ${album_utf8}</a></li> | ||
% endfor | ||
</ul> | ||
% endif | ||
</div> | ||
|