[Android] Consider any track longer than 1h as a podcast
Geoffrey Métais
git at videolan.org
Tue Nov 20 09:50:03 CET 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Nov 20 09:49:36 2018 +0100| [ee8e0129b2ef13b3b8e836465acc99c32a1d20f0] | committer: Geoffrey Métais
Consider any track longer than 1h as a podcast
> https://code.videolan.org/videolan/vlc-android/commit/ee8e0129b2ef13b3b8e836465acc99c32a1d20f0
---
medialibrary/src/org/videolan/medialibrary/media/MediaWrapper.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/medialibrary/src/org/videolan/medialibrary/media/MediaWrapper.java b/medialibrary/src/org/videolan/medialibrary/media/MediaWrapper.java
index 8d8b8b025..358ec20c1 100644
--- a/medialibrary/src/org/videolan/medialibrary/media/MediaWrapper.java
+++ b/medialibrary/src/org/videolan/medialibrary/media/MediaWrapper.java
@@ -87,6 +87,7 @@ public class MediaWrapper extends MediaLibraryItem implements Parcelable {
// threshold lentgh between song and podcast ep, set to 15 minutes
private static final long PODCAST_THRESHOLD = 900000L;
+ private static final long PODCAST_ABSOLUTE = 3600000L;
protected String mDisplayTitle;
private String mArtist;
@@ -415,7 +416,8 @@ public class MediaWrapper extends MediaLibraryItem implements Parcelable {
}
public boolean isPodcast() {
- return mType == TYPE_AUDIO && (TextUtils.isEmpty(mAlbum) && mLength > PODCAST_THRESHOLD
+ return mType == TYPE_AUDIO && (mLength > PODCAST_ABSOLUTE
+ || TextUtils.isEmpty(mAlbum) && mLength > PODCAST_THRESHOLD
|| "podcast".equalsIgnoreCase(mGenre)
|| "audiobooks".equalsIgnoreCase(mGenre)
|| "audiobook".equalsIgnoreCase(mGenre)
More information about the Android
mailing list