[Android] Revert "MediaWrapper: add cond to udpateMeta for title"
Duncan McNamara
git at videolan.org
Wed Jan 25 13:06:59 UTC 2023
vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Wed Jan 25 11:45:31 2023 +0100| [f747fa333a718063c897629a9bd3297e750ada0f] | committer: Duncan McNamara
Revert "MediaWrapper: add cond to udpateMeta for title"
This reverts commit 82936d2205cf5aaeb73f0157fccefe71b787df4f.
This commit creates issues when displaying network share names, and is
reverted, so that we can find a better fix for the original issue #2722
> https://code.videolan.org/videolan/vlc-android/commit/f747fa333a718063c897629a9bd3297e750ada0f
---
.../interfaces/media/MediaWrapper.java | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/medialibrary/src/org/videolan/medialibrary/interfaces/media/MediaWrapper.java b/medialibrary/src/org/videolan/medialibrary/interfaces/media/MediaWrapper.java
index 009cb9a4ea..6b54d477f0 100644
--- a/medialibrary/src/org/videolan/medialibrary/interfaces/media/MediaWrapper.java
+++ b/medialibrary/src/org/videolan/medialibrary/interfaces/media/MediaWrapper.java
@@ -381,26 +381,8 @@ public abstract class MediaWrapper extends MediaLibraryItem implements Parcelabl
return meta != null ? trim ? meta.trim() : meta : defaultMeta;
}
- /**
- * This returns the updated title meta for the media. Though it checks that the title media in
- * libvlc isn't just the filename as this would mean that libvlc doesn't have any title meta.
- * This is to ensure that medialibrary titles don't get overriden by default filename.
- * An example of this would be for a stream in a m3u8 file with and #EXTINF: title parameter.
- * libvlc won't have access to this meta, and if the stream doesn't send updated metas, then it
- * will be replaced with the filename even though the medialibrary has a correct title.
- * @param media media to update
- * @return title string
- */
- private String updateTitleMeta(IMedia media) {
- String libvlcTitle = getMetaId(media, mTitle, Media.Meta.Title, true);
- String fileName = getFileName();
- if (!TextUtils.isEmpty(libvlcTitle) && !TextUtils.isEmpty(fileName) && !libvlcTitle.equals(fileName))
- return libvlcTitle;
- return getTitle();
- }
-
- private void updateMeta(IMedia media) {
- mTitle = updateTitleMeta(media);
+ private void updateMeta(IMedia media) {
+ mTitle = getMetaId(media, mTitle, Media.Meta.Title, true);
mArtist = getMetaId(media, mArtist, Media.Meta.Artist, true);
mAlbum = getMetaId(media, mAlbum, Media.Meta.Album, true);
mGenre = getMetaId(media, mGenre, Media.Meta.Genre, true);
More information about the Android
mailing list