aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src/github/daneren2005
diff options
context:
space:
mode:
Diffstat (limited to 'subsonic-android/src/github/daneren2005')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java3
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java24
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java24
3 files changed, 27 insertions, 24 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
index abb6f6bd..78e4e44c 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
@@ -657,6 +657,9 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi
songs.add(song.getSong());
addToPlaylist(songs);
return true;
+ case R.id.menu_info:
+ displaySongInfo(song.getSong());
+ return true;
default:
return false;
}
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
index 105bb5c5..9ca1744f 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
@@ -731,28 +731,4 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
}
}.execute();
}
-
- private void displaySongInfo(final MusicDirectory.Entry song) {
- String msg = "Artist: " + song.getArtist() + "\nAlbum: " + song.getAlbum();
- if(!song.getGenre().isEmpty()) {
- msg += "\nGenre: " + song.getGenre();
- }
- if(song.getYear() != null && song.getYear() != 0) {
- msg += "\nYear: " + song.getYear();
- }
- msg += "\nFormat: " + song.getSuffix();
- if(song.getBitRate() != null && song.getBitRate() != 0) {
- msg += "\nBitrate: " + song.getBitRate() + " kpbs";
- }
- if(song.getDuration() != null && song.getDuration() != 0) {
- msg += "\nLength: " + Util.formatDuration(song.getDuration());
- }
- msg += "\nSize: " + Util.formatBytes(song.getSize());
-
- new AlertDialog.Builder(this)
- .setIcon(android.R.drawable.ic_dialog_alert)
- .setTitle(song.getTitle())
- .setMessage(msg)
- .show();
- }
}
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java
index c6edeef9..19e01045 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java
@@ -484,6 +484,30 @@ public class SubsonicTabActivity extends SherlockActivity {
AlertDialog dialog = builder.create();
dialog.show();
}
+
+ public void displaySongInfo(final MusicDirectory.Entry song) {
+ String msg = "Artist: " + song.getArtist() + "\nAlbum: " + song.getAlbum();
+ if(!song.getGenre().isEmpty()) {
+ msg += "\nGenre: " + song.getGenre();
+ }
+ if(song.getYear() != null && song.getYear() != 0) {
+ msg += "\nYear: " + song.getYear();
+ }
+ msg += "\nFormat: " + song.getSuffix();
+ if(song.getBitRate() != null && song.getBitRate() != 0) {
+ msg += "\nBitrate: " + song.getBitRate() + " kpbs";
+ }
+ if(song.getDuration() != null && song.getDuration() != 0) {
+ msg += "\nLength: " + Util.formatDuration(song.getDuration());
+ }
+ msg += "\nSize: " + Util.formatBytes(song.getSize());
+
+ new AlertDialog.Builder(this)
+ .setIcon(android.R.drawable.ic_dialog_alert)
+ .setTitle(song.getTitle())
+ .setMessage(msg)
+ .show();
+ }
private void setUncaughtExceptionHandler() {
Thread.UncaughtExceptionHandler handler = Thread.getDefaultUncaughtExceptionHandler();