diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-03-18 19:13:06 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-03-18 19:13:06 -0700 |
commit | 7d277c55af2defb1d08ef882d7ac8c80a1c4cee3 (patch) | |
tree | fddabf55076baf3947e1a7b3d3c5fe607f42fbd1 | |
parent | bdaea96b3bf875c32fc3e66bf555072979250a76 (diff) | |
download | dsub-7d277c55af2defb1d08ef882d7ac8c80a1c4cee3.tar.gz dsub-7d277c55af2defb1d08ef882d7ac8c80a1c4cee3.tar.bz2 dsub-7d277c55af2defb1d08ef882d7ac8c80a1c4cee3.zip |
Fix Show Artist for online songs in offline mode
-rw-r--r-- | src/github/daneren2005/dsub/fragments/DownloadFragment.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/github/daneren2005/dsub/fragments/DownloadFragment.java b/src/github/daneren2005/dsub/fragments/DownloadFragment.java index 198cc9d2..9f2b10a9 100644 --- a/src/github/daneren2005/dsub/fragments/DownloadFragment.java +++ b/src/github/daneren2005/dsub/fragments/DownloadFragment.java @@ -600,15 +600,20 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe if(Util.isOffline(context)) {
try {
- // This should only be succesful if this is a online song in offline mode
+ // This should only be successful if this is a online song in offline mode
Integer.parseInt(entry.getParent());
String root = FileUtil.getMusicDirectory(context).getPath();
String id = root + "/" + entry.getPath();
id = id.substring(0, id.lastIndexOf("/"));
- intent.putExtra(Constants.INTENT_EXTRA_NAME_ID, id);
+ if(menuItemId == R.id.menu_show_album) {
+ intent.putExtra(Constants.INTENT_EXTRA_NAME_ID, id);
+ }
id = id.substring(0, id.lastIndexOf("/"));
- intent.putExtra(Constants.INTENT_EXTRA_NAME_PARENT_ID, id);
- intent.putExtra(Constants.INTENT_EXTRA_NAME_PARENT_NAME, entry.getArtist());
+ if(menuItemId != R.id.menu_show_album) {
+ intent.putExtra(Constants.INTENT_EXTRA_NAME_ID, id);
+ intent.putExtra(Constants.INTENT_EXTRA_NAME_NAME, entry.getArtist());
+ intent.removeExtra(Constants.INTENT_EXTRA_NAME_CHILD_ID);
+ }
} catch(Exception e) {
// Do nothing, entry.getParent() is fine
}
|