Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5f06c7d5d
|
||
|
|
66f7773598
|
@@ -244,7 +244,23 @@ public class LastFmService {
|
||||
if (info == null) {
|
||||
return null;
|
||||
}
|
||||
return new ArtistBio(processWikiText(info.getWikiSummary()),
|
||||
|
||||
String wiki = info.getWikiSummary().trim();
|
||||
boolean isEnglish = locale.getLanguage().equals(Locale.ENGLISH.getLanguage());
|
||||
// try to detect empty bio
|
||||
if (!isEnglish && (wiki.length() < 250 &&
|
||||
wiki.startsWith("<a href=\"https://www.last.fm/music/") && wiki.endsWith("on Last.fm</a>"))
|
||||
) {
|
||||
LOG.debug("Got empty bio for " + artistName + ", retry English");
|
||||
Artist info1 = Artist.getInfo(artistName, Locale.ENGLISH, null /* username */, LAST_FM_KEY);
|
||||
if (info1 != null) {
|
||||
// ensure we do not replace non-null with null & NPE...
|
||||
info = info1;
|
||||
wiki = info.getWikiSummary().trim();
|
||||
}
|
||||
}
|
||||
|
||||
return new ArtistBio(processWikiText(wiki),
|
||||
info.getMbid(),
|
||||
info.getUrl(),
|
||||
info.getImageURL(ImageSize.MEDIUM),
|
||||
|
||||
@@ -90,3 +90,30 @@
|
||||
.mejs__captions-layer a {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
|
||||
/* HACKS */
|
||||
.mejs__time-total {
|
||||
background: white;
|
||||
border-radius:3px;
|
||||
}
|
||||
.mejs__time-loaded {
|
||||
background: rgb(142, 191, 255);
|
||||
border-radius:3px;
|
||||
}
|
||||
.mejs__time-current, .mejs__time-handle-content {
|
||||
background: #00448c;
|
||||
border-radius:3px;
|
||||
}
|
||||
.mejs__time-hovered.negative {
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
.mejs__container {
|
||||
width: 500px !important;
|
||||
}
|
||||
|
||||
div#player {
|
||||
width: 500px !important;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user