Skip to content
Snippets Groups Projects
Commit e72b1c1c authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Add isPodcast method to MediaWrapper

parent 3b57c8a6
No related branches found
No related tags found
No related merge requests found
......@@ -82,6 +82,9 @@ public class MediaWrapper extends MediaLibraryItem implements Parcelable {
private static final StringBuilder sb = new StringBuilder();
// threshold lentgh between song and podcast ep, set to 15 minutes
private static final long PODCAST_THRESHOLD = 900000L;
protected String mDisplayTitle;
private String mArtist;
private String mGenre;
......@@ -391,6 +394,11 @@ public class MediaWrapper extends MediaLibraryItem implements Parcelable {
return mType;
}
public boolean isPodcast() {
return mType == TYPE_AUDIO && (TextUtils.isEmpty(mAlbum) && mLength > PODCAST_THRESHOLD)
|| ("podcast".equalsIgnoreCase(mGenre));
}
public void setType(int type){
mType = type;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment