Skip to content

Commit

Permalink
Fixed an issue preventing artwork from loading on certain devices
Browse files Browse the repository at this point in the history
  • Loading branch information
timusus committed Aug 30, 2019
1 parent a3d0213 commit 8b27edc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/simplecity/amp_library/model/Album.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ private void setArtworkKey() {
public String getRemoteArtworkUrl() {
try {
return "https://artwork.shuttlemusicplayer.app/api/v1/artwork"
+ "?artist=" + URLEncoder.encode(albumArtistName, Charset.forName("UTF-8").toString())
+ "&album=" + URLEncoder.encode(name, Charset.forName("UTF-8").toString());
+ "?artist=" + URLEncoder.encode(albumArtistName, Charset.forName("UTF-8").name())
+ "&album=" + URLEncoder.encode(name, Charset.forName("UTF-8").name());
} catch (UnsupportedEncodingException e) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public int hashCode() {
@Override
public String getRemoteArtworkUrl() {
try {
return "https://artwork.shuttlemusicplayer.app/api/v1/artwork?artist=" + URLEncoder.encode(name, Charset.forName("UTF-8").toString());
return "https://artwork.shuttlemusicplayer.app/api/v1/artwork?artist=" + URLEncoder.encode(name, Charset.forName("UTF-8").name());
} catch (UnsupportedEncodingException e) {
return null;
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/simplecity/amp_library/model/Song.java
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ private void setArtworkKey() {
public String getRemoteArtworkUrl() {
try {
return "https://artwork.shuttlemusicplayer.app/api/v1/artwork"
+ "?artist=" + URLEncoder.encode(albumArtistName, Charset.forName("UTF-8").toString())
+ "&album=" + URLEncoder.encode(albumName, Charset.forName("UTF-8").toString());
+ "?artist=" + URLEncoder.encode(albumArtistName, Charset.forName("UTF-8").name())
+ "&album=" + URLEncoder.encode(albumName, Charset.forName("UTF-8").name());
} catch (UnsupportedEncodingException e) {
return null;
}
Expand Down

0 comments on commit 8b27edc

Please sign in to comment.