aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java
index 40c1cdb0..230b87d3 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java
@@ -193,6 +193,14 @@ public class OfflineMusicService extends RESTMusicService {
entry.setBitRate(Integer.parseInt((bitrate != null) ? bitrate : "0") / 1000);
String length = metadata.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION);
entry.setDuration(Integer.parseInt(length) / 1000);
+ String artist = metadata.extractMetadata(MediaMetadataRetriever.METADATA_KEY_ARTIST);
+ if(artist != null) {
+ entry.setArtist(artist);
+ }
+ String album = metadata.extractMetadata(MediaMetadataRetriever.METADATA_KEY_ALBUM);
+ if(album != null) {
+ entry.setAlbum(album);
+ }
metadata.release();
} catch(Exception e) {
Log.i(TAG, "Device doesn't properly support MediaMetadataRetreiver");