Few metacritic changes. Formatting on artist page, css & fixed replacements in artist name

This commit is contained in:
rembo10
2015-05-19 16:23:43 -07:00
parent 18af7d6392
commit 93dbf13d88
3 changed files with 6 additions and 5 deletions

View File

@@ -70,7 +70,7 @@
<th id="albumname">Name</th>
<th id="reldate">Date</th>
<th id="type">Type</th>
<th id="score">Score</th>
<th id="score">Metacritic</th>
<th id="status">Status</th>
<th id="have">Have</th>
<th id="bitrate">Bitrate</th>

View File

@@ -1445,6 +1445,7 @@ div#artistheader h2 a {
#album_table td#albumname,
#album_table td#reldate,
#album_table td#type,
#album_table td#score,
#track_table td#duration,
#upcoming_table td#select,
#upcoming_table td#status,
@@ -1455,6 +1456,7 @@ div#artistheader h2 a {
}
#album_table td#status,
#album_table td#bitrate,
#album_table td#score,
#album_table td#albumformat,
#album_table td#wantlossless {
font-size: 13px;

View File

@@ -26,11 +26,10 @@ def update(artist_name,release_groups):
# We could just do a search, then take the top result, but at least this will
# cut down on api calls. If it's ineffective then we'll switch to search
replacements = {" & " : " "}
pattern = re.compile(r'\b(' + '|'.join(replacements.keys()) + r')\b')
mc_artist_name = pattern.sub(lambda x: replacements[x.group()], artist_name)
replacements = {" & " : " ", "." : ""}
mc_artist_name = helpers.replace_all(artist_name.lower(),replacements)
mc_artist_name = artist_name.lower().replace(" ","-")
mc_artist_name = mc_artist_name.replace(" ","-")
url = "http://www.metacritic.com/person/" + mc_artist_name + "?filter-options=music&sort_options=date&num_items=100"