aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src
diff options
context:
space:
mode:
Diffstat (limited to 'subsonic-android/src')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java
index b4c48bde..1ac8e9cc 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java
@@ -148,6 +148,7 @@ public class OfflineMusicService extends RESTMusicService {
entry.setSize(file.length());
String root = FileUtil.getMusicDirectory(context).getPath();
entry.setPath(file.getPath().replaceFirst("^" + root + "/" , ""));
+ String title = name;
if (file.isFile()) {
entry.setArtist(file.getParentFile().getParentFile().getName());
entry.setAlbum(file.getParentFile().getName());
@@ -165,8 +166,11 @@ public class OfflineMusicService extends RESTMusicService {
} catch(Exception e) {
Log.i(TAG, "Device doesn't properly support MediaMetadataRetreiver");
}
+
+ title = title.substring(title.indexOf('-') + 1);
}
- entry.setTitle(name);
+
+ entry.setTitle(title);
entry.setSuffix(FileUtil.getExtension(file.getName().replace(".complete", "")));
File albumArt = FileUtil.getAlbumArtFile(context, entry);