Always treat podcasts, audiobooks and compilations as audio, even if video stream is present

This commit is contained in:
ejurgensen 2015-08-05 22:36:28 +02:00
parent 68912efa1f
commit 317ad2ba41
2 changed files with 11 additions and 7 deletions

View File

@ -699,6 +699,13 @@ filescanner_process_media(char *path, time_t mtime, off_t size, int type, struct
mfi->time_modified = mtime;
mfi->file_size = size;
if (type & F_SCAN_TYPE_COMPILATION)
mfi->compilation = 1;
if (type & F_SCAN_TYPE_PODCAST)
mfi->media_kind = MEDIA_KIND_PODCAST; /* podcast */
if (type & F_SCAN_TYPE_AUDIOBOOK)
mfi->media_kind = MEDIA_KIND_AUDIOBOOK; /* audiobook */
if (type & F_SCAN_TYPE_FILE)
{
mfi->data_kind = DATA_KIND_FILE;
@ -742,13 +749,6 @@ filescanner_process_media(char *path, time_t mtime, off_t size, int type, struct
goto out;
}
if (type & F_SCAN_TYPE_COMPILATION)
mfi->compilation = 1;
if (type & F_SCAN_TYPE_PODCAST)
mfi->media_kind = MEDIA_KIND_PODCAST; /* podcast */
if (type & F_SCAN_TYPE_AUDIOBOOK)
mfi->media_kind = MEDIA_KIND_AUDIOBOOK; /* audiobook */
if (!mfi->item_kind)
mfi->item_kind = 2; /* music */
if (!mfi->media_kind)

View File

@ -427,6 +427,10 @@ scan_metadata_ffmpeg(char *file, struct media_file_info *mfi)
break;
}
#endif
// We treat these as audio no matter what
if (mfi->compilation || (mfi->media_kind & (MEDIA_KIND_PODCAST | MEDIA_KIND_AUDIOBOOK)))
break;
if (!video_stream)
{
DPRINTF(E_DBG, L_SCAN, "File has video (stream %d)\n", i);