[Android] Remove Unknown artist and Album for now playing

Habib Kazemi git at videolan.org
Tue Aug 28 13:47:26 CEST 2018


vlc-android | branch: master | Habib Kazemi <kazemihabib1996 at gmail.com> | Thu Aug 16 20:12:37 2018 +0430| [c7f57d801268e6727be296ff35f2720f9ba9cf3e] | committer: Geoffrey Métais

Remove Unknown artist and Album for now playing

Fix #635

Signed-off-by: Geoffrey Métais <geoffrey.metais at gmail.com>

> https://code.videolan.org/videolan/vlc-android/commit/c7f57d801268e6727be296ff35f2720f9ba9cf3e
---

 vlc-android/src/org/videolan/vlc/media/MediaUtils.kt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/media/MediaUtils.kt b/vlc-android/src/org/videolan/vlc/media/MediaUtils.kt
index ac11de885..7b8fb2ea7 100644
--- a/vlc-android/src/org/videolan/vlc/media/MediaUtils.kt
+++ b/vlc-android/src/org/videolan/vlc/media/MediaUtils.kt
@@ -145,13 +145,13 @@ object MediaUtils {
         })
     }
 
-    fun getMediaArtist(ctx: Context, media: MediaWrapper?) = media?.artist ?: getMediaString(ctx, R.string.unknown_artist)
+    fun getMediaArtist(ctx: Context, media: MediaWrapper?) = media?.artist ?: if (media?.nowPlaying != null) "" else getMediaString(ctx, R.string.unknown_artist)
 
-    fun getMediaReferenceArtist(ctx: Context, media: MediaWrapper?) = media?.artist ?: getMediaString(ctx, R.string.unknown_artist)
+    fun getMediaReferenceArtist(ctx: Context, media: MediaWrapper?) = getMediaArtist(ctx, media)
 
     fun getMediaAlbumArtist(ctx: Context, media: MediaWrapper?) = media?.albumArtist ?: getMediaString(ctx, R.string.unknown_artist)
 
-    fun getMediaAlbum(ctx: Context, media: MediaWrapper?) = media?.album ?: getMediaString(ctx, R.string.unknown_album)
+    fun getMediaAlbum(ctx: Context, media: MediaWrapper?) = media?.album ?: if (media?.nowPlaying != null) "" else getMediaString(ctx, R.string.unknown_album)
 
     fun getMediaGenre(ctx: Context, media: MediaWrapper?) = media?.genre ?: getMediaString(ctx, R.string.unknown_genre)
 



More information about the Android mailing list