aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-02-04 18:45:55 -0800
committerScott Jackson <daneren2005@gmail.com>2013-02-04 18:45:55 -0800
commit703e6987a90fb20854b3b50240f5002823efee9d (patch)
tree415d86717fdb8190aa8be8fa5559dc7580c5695b /subsonic-android
parent96882caf4fce5d4ce442282d038940a7f743b0bc (diff)
downloaddsub-703e6987a90fb20854b3b50240f5002823efee9d.tar.gz
dsub-703e6987a90fb20854b3b50240f5002823efee9d.tar.bz2
dsub-703e6987a90fb20854b3b50240f5002823efee9d.zip
Closes #105 Remove Track # from song name in offline mode
Diffstat (limited to 'subsonic-android')
-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);