Fix for default language
This commit is contained in:
parent
0bd8e4292d
commit
93afb33e0d
2 changed files with 15 additions and 11 deletions
|
|
@ -273,12 +273,14 @@ public class AlbumDetailActivity extends AbsSlidingMusicPanelActivity implements
|
||||||
final String wikiContent = lastFmAlbum.getAlbum().getWiki().getContent();
|
final String wikiContent = lastFmAlbum.getAlbum().getWiki().getContent();
|
||||||
if (wikiContent != null && !wikiContent.trim().isEmpty()) {
|
if (wikiContent != null && !wikiContent.trim().isEmpty()) {
|
||||||
wiki = Html.fromHtml(wikiContent);
|
wiki = Html.fromHtml(wikiContent);
|
||||||
} else if (lang != null) {
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If the "lang" parameter is set and no wiki is given, retry with default language
|
// If the "lang" parameter is set and no wiki is given, retry with default language
|
||||||
|
if (wiki == null && lang != null) {
|
||||||
loadWiki(null);
|
loadWiki(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!Util.isAllowedToDownloadMetadata(AlbumDetailActivity.this)) {
|
if (!Util.isAllowedToDownloadMetadata(AlbumDetailActivity.this)) {
|
||||||
if (wiki != null) {
|
if (wiki != null) {
|
||||||
|
|
|
||||||
|
|
@ -239,15 +239,17 @@ public class ArtistDetailActivity extends AbsSlidingMusicPanelActivity implement
|
||||||
public void onResponse(@NonNull Call<LastFmArtist> call, @NonNull Response<LastFmArtist> response) {
|
public void onResponse(@NonNull Call<LastFmArtist> call, @NonNull Response<LastFmArtist> response) {
|
||||||
final LastFmArtist lastFmArtist = response.body();
|
final LastFmArtist lastFmArtist = response.body();
|
||||||
if (lastFmArtist != null && lastFmArtist.getArtist() != null) {
|
if (lastFmArtist != null && lastFmArtist.getArtist() != null) {
|
||||||
String bio = lastFmArtist.getArtist().getBio().getContent();
|
final String bioContent = lastFmArtist.getArtist().getBio().getContent();
|
||||||
if (bio != null && !bio.trim().isEmpty()) {
|
if (bioContent != null && !bioContent.trim().isEmpty()) {
|
||||||
biography = Html.fromHtml(bio);
|
biography = Html.fromHtml(bioContent);
|
||||||
} else if (lang != null) {
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If the "lang" parameter is set and no biography is given, retry with default language
|
// If the "lang" parameter is set and no biography is given, retry with default language
|
||||||
|
if (biography == null && lang != null) {
|
||||||
loadBiography(null);
|
loadBiography(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!Util.isAllowedToDownloadMetadata(ArtistDetailActivity.this)) {
|
if (!Util.isAllowedToDownloadMetadata(ArtistDetailActivity.this)) {
|
||||||
if (biography != null) {
|
if (biography != null) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue