Extend conditions identifying podcasts (media_kind=4)

- if path contains "/Podcasts/"
- if iTunes XML says it's a podcast
This commit is contained in:
ejurgensen 2013-10-21 22:52:04 +02:00
parent c70496bb58
commit c935f8cc3b
2 changed files with 11 additions and 0 deletions

View File

@ -617,6 +617,10 @@ scan_metadata_ffmpeg(char *file, struct media_file_info *mfi)
mfi->media_kind = 2; mfi->media_kind = 2;
} }
/* Podcasts are either media_kind 4, 6 or 7 - unsure what the difference is */ /* 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)) else if ((mdcount > 0) && mfi->genre && (strcmp(mfi->genre,"Podcast") == 0))
{ {
mfi->media_kind = 4; mfi->media_kind = 4;

View File

@ -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 /* Don't let album_artist set to "Unknown artist" if we've
* filled artist from the iTunes data in the meantime * filled artist from the iTunes data in the meantime
*/ */