diff --git a/src/filescanner.c b/src/filescanner.c index 39a47db4..ff78a9c4 100644 --- a/src/filescanner.c +++ b/src/filescanner.c @@ -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) diff --git a/src/filescanner_ffmpeg.c b/src/filescanner_ffmpeg.c index aeefecf3..9cb83448 100644 --- a/src/filescanner_ffmpeg.c +++ b/src/filescanner_ffmpeg.c @@ -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);