[Android] Show 'nowplaying' as title when available
Geoffrey Métais
git at videolan.org
Tue Jan 26 15:36:27 CET 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jan 26 14:34:57 2016 +0100| [e22fd965210bfb6b8ffbd010f0f6e508271dcb8d] | committer: Geoffrey Métais
Show 'nowplaying' as title when available
> https://code.videolan.org/videolan/vlc-android/commit/e22fd965210bfb6b8ffbd010f0f6e508271dcb8d
---
vlc-android/src/org/videolan/vlc/PlaybackService.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index fa2c2dc..c2acbb9 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1438,8 +1438,8 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
public String getArtist() {
if (hasCurrentMedia()) {
final MediaWrapper media = getCurrentMedia();
- return media.isArtistUnknown() && media.getNowPlaying() != null ?
- media.getNowPlaying()
+ return media.getNowPlaying() != null ?
+ media.getTitle()
: MediaUtils.getMediaArtist(PlaybackService.this, media);
} else
return null;
@@ -1464,7 +1464,7 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
@MainThread
public String getTitle() {
if (hasCurrentMedia())
- return getCurrentMedia().getTitle();
+ return getCurrentMedia().getNowPlaying() != null ? getCurrentMedia().getNowPlaying() : getCurrentMedia().getTitle();
else
return null;
}
More information about the Android
mailing list