Fixed a problem with table layout when the song is not available.
Periods (.) are now also stripped from the album search query.
This commit is contained in:
parent
4ffd817961
commit
c639414ec3
1 changed files with 4 additions and 4 deletions
|
@ -54,7 +54,7 @@ songsearch='http://www.lyricsstation.com/search.asp?R1=V1&txtSearch='
|
||||||
bandtip='Search for this artist on Google.'
|
bandtip='Search for this artist on Google.'
|
||||||
bandsearch='"http://www.google.com/search?cat=gwd%2FTop%2FArts%2FMusic&q='
|
bandsearch='"http://www.google.com/search?cat=gwd%2FTop%2FArts%2FMusic&q='
|
||||||
|
|
||||||
# The album search tooltip URL
|
# The album search tooltip and URL
|
||||||
albumtip='Search for this album on freedb.'
|
albumtip='Search for this album on freedb.'
|
||||||
albumsearch='http://www.freedb.org/freedb_search.php?allfields=NO&fields=artist&fields=title&allcats=YES&grouping=cats&words='
|
albumsearch='http://www.freedb.org/freedb_search.php?allfields=NO&fields=artist&fields=title&allcats=YES&grouping=cats&words='
|
||||||
|
|
||||||
|
@ -72,11 +72,11 @@ if len(sys.argv) > 1:
|
||||||
except IOError:
|
except IOError:
|
||||||
lines = ''
|
lines = ''
|
||||||
|
|
||||||
song = ''
|
song = '<tr valign="top">'
|
||||||
|
|
||||||
# Song
|
# Song
|
||||||
if len(m.group(2)) >= 1:
|
if len(m.group(2)) >= 1:
|
||||||
song += '<tr valign="top"><td><a title="' + songtip + '" href="' + songsearch + urllib.quote_plus(m.group(2)) + '" target="_blank">' + cgi.escape(m.group(2)) + '</a></td>'
|
song += '<td><a title="' + songtip + '" href="' + songsearch + urllib.quote_plus(m.group(2)) + '" target="_blank">' + cgi.escape(m.group(2)) + '</a></td>'
|
||||||
else:
|
else:
|
||||||
song += '<td><font color="gray">n/a</font></td>'
|
song += '<td><font color="gray">n/a</font></td>'
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ if len(sys.argv) > 1:
|
||||||
|
|
||||||
# Album
|
# Album
|
||||||
if len(m.group(3)) >= 1:
|
if len(m.group(3)) >= 1:
|
||||||
song += '<td><a title="'+ albumtip + '" href="' + albumsearch + urllib.quote_plus((m.group(1) + ' ' + m.group(3)).replace('(', '').replace(')', '')) + '" target="_blank">' + cgi.escape(m.group(3)) + '</a></td>'
|
song += '<td><a title="'+ albumtip + '" href="' + albumsearch + urllib.quote_plus((m.group(1) + ' ' + m.group(3)).replace('(', '').replace(')', '').replace('.', '')) + '" target="_blank">' + cgi.escape(m.group(3)) + '</a></td>'
|
||||||
else:
|
else:
|
||||||
song += '<td><font color="gray">n/a</font></td>'
|
song += '<td><font color="gray">n/a</font></td>'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue