From c935f8cc3b1a1b5d1b82eccc242ee2e3407302c2 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Mon, 21 Oct 2013 22:52:04 +0200 Subject: [PATCH] Extend conditions identifying podcasts (media_kind=4) - if path contains "/Podcasts/" - if iTunes XML says it's a podcast --- src/filescanner_ffmpeg.c | 4 ++++ src/filescanner_itunes.c | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/src/filescanner_ffmpeg.c b/src/filescanner_ffmpeg.c index 7b5f7928..b4c7da4c 100644 --- a/src/filescanner_ffmpeg.c +++ b/src/filescanner_ffmpeg.c @@ -617,6 +617,10 @@ scan_metadata_ffmpeg(char *file, struct media_file_info *mfi) mfi->media_kind = 2; } /* Podcasts are either media_kind 4, 6 or 7 - unsure what the difference is */ + else if (mfi->path && strstr(mfi->path, "/Podcasts/")) + { + mfi->media_kind = 4; + } else if ((mdcount > 0) && mfi->genre && (strcmp(mfi->genre,"Podcast") == 0)) { mfi->media_kind = 4; diff --git a/src/filescanner_itunes.c b/src/filescanner_itunes.c index 8764adf3..46a727fb 100644 --- a/src/filescanner_itunes.c +++ b/src/filescanner_itunes.c @@ -419,6 +419,13 @@ process_track_file(plist_t trk) } } + /* Set media_kind to 4 (Podcast) if Podcast is true */ + ret = get_dictval_bool_from_key(trk, "Podcast", &boolean); + if ((ret == 0) && boolean) + { + mfi->media_kind = 4; + } + /* Don't let album_artist set to "Unknown artist" if we've * filled artist from the iTunes data in the meantime */