[Android] Read the nowplaying tag when reading metadata

Alexandre Perraud git at videolan.org
Tue Nov 25 11:39:02 CET 2014


vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Mon Nov 24 18:34:22 2014 +0100| [872cbfb803bbf36a3637ff79e70d4d51f8596dc2] | committer: Jean-Baptiste Kempf

Read the nowplaying tag when reading metadata

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=872cbfb803bbf36a3637ff79e70d4d51f8596dc2
---

 libvlc/jni/libvlcjni-track.c                  |    1 +
 libvlc/src/org/videolan/libvlc/Media.java     |    1 +
 libvlc/src/org/videolan/libvlc/TrackInfo.java |    1 +
 3 files changed, 3 insertions(+)

diff --git a/libvlc/jni/libvlcjni-track.c b/libvlc/jni/libvlcjni-track.c
index eba0b5c..53ea64c 100644
--- a/libvlc/jni/libvlcjni-track.c
+++ b/libvlc/jni/libvlcjni-track.c
@@ -154,6 +154,7 @@ jobjectArray read_track_info_internal(JNIEnv *env, jobject thiz, libvlc_media_t*
                 setString(env, item, "Album", libvlc_media_get_meta(p_m, libvlc_meta_Album));
                 setString(env, item, "Genre", libvlc_media_get_meta(p_m, libvlc_meta_Genre));
                 setString(env, item, "ArtworkURL", libvlc_media_get_meta(p_m, libvlc_meta_ArtworkURL));
+                setString(env, item, "NowPlaying", libvlc_media_get_meta(p_m, libvlc_meta_NowPlaying));
                 continue;
             }
 
diff --git a/libvlc/src/org/videolan/libvlc/Media.java b/libvlc/src/org/videolan/libvlc/Media.java
index 29b9d94..5f10054 100644
--- a/libvlc/src/org/videolan/libvlc/Media.java
+++ b/libvlc/src/org/videolan/libvlc/Media.java
@@ -158,6 +158,7 @@ public class Media implements Comparable<Media> {
                 mAlbum = getValueWrapper(track.Album, UnknownStringType.Album);
                 mGenre = getValueWrapper(track.Genre, UnknownStringType.Genre);
                 mArtworkURL = track.ArtworkURL;
+                mNowPlaying = track.NowPlaying;
                 Log.d(TAG, "Title " + mTitle);
                 Log.d(TAG, "Artist " + mArtist);
                 Log.d(TAG, "Genre " + mGenre);
diff --git a/libvlc/src/org/videolan/libvlc/TrackInfo.java b/libvlc/src/org/videolan/libvlc/TrackInfo.java
index b55dc55..b651540 100644
--- a/libvlc/src/org/videolan/libvlc/TrackInfo.java
+++ b/libvlc/src/org/videolan/libvlc/TrackInfo.java
@@ -50,4 +50,5 @@ public class TrackInfo {
     public String Album;
     public String Genre;
     public String ArtworkURL;
+    public String NowPlaying;
 }



More information about the Android mailing list