aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--subsonic-android/res/menu/nowplaying_context.xml5
-rw-r--r--subsonic-android/res/menu/nowplaying_context_offline.xml5
-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
5 files changed, 37 insertions, 24 deletions
diff --git a/subsonic-android/res/menu/nowplaying_context.xml b/subsonic-android/res/menu/nowplaying_context.xml
index 82ef2e8b..f42c3644 100644
--- a/subsonic-android/res/menu/nowplaying_context.xml
+++ b/subsonic-android/res/menu/nowplaying_context.xml
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:id="@+id/menu_info"
+ android:title="@string/common.info"
+ />
+
<item
android:id="@+id/menu_show_album"
android:title="@string/download.menu_show_album"/>
diff --git a/subsonic-android/res/menu/nowplaying_context_offline.xml b/subsonic-android/res/menu/nowplaying_context_offline.xml
index 25d5031b..78fa6ba8 100644
--- a/subsonic-android/res/menu/nowplaying_context_offline.xml
+++ b/subsonic-android/res/menu/nowplaying_context_offline.xml
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:id="@+id/menu_info"
+ android:title="@string/common.info"
+ />
+
<item
android:id="@+id/menu_show_album"
android:title="@string/download.menu_show_album"/>
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();