[scan] Always use compilation_artist for tracks in compilation dir

Reason is that tracks in compilation dir are not to be trusted when it comes
to album_artist.

See afee99d5db (commitcomment-31807556).
This commit is contained in:
ejurgensen
2018-12-31 14:13:57 +01:00
parent 9929832b5f
commit 19c39bf133
3 changed files with 14 additions and 8 deletions

View File

@@ -66,7 +66,7 @@
" artwork INTEGER DEFAULT 0," \
" rating INTEGER DEFAULT 0," \
" play_count INTEGER DEFAULT 0," \
" skip_count INTEGER DEFAULT 0," \
" skip_count INTEGER DEFAULT 0," \
" seek INTEGER DEFAULT 0," \
" data_kind INTEGER DEFAULT 0," \
" media_kind INTEGER DEFAULT 0," \
@@ -76,7 +76,7 @@
" time_added INTEGER DEFAULT 0," \
" time_modified INTEGER DEFAULT 0," \
" time_played INTEGER DEFAULT 0," \
" time_skipped INTEGER DEFAULT 0," \
" time_skipped INTEGER DEFAULT 0," \
" disabled INTEGER DEFAULT 0," \
" sample_count INTEGER DEFAULT 0," \
" codectype VARCHAR(5) DEFAULT NULL," \

View File

@@ -509,14 +509,18 @@ process_regular_file(const char *file, struct stat *sb, int type, int flags, int
else
{
mfi.data_kind = DATA_KIND_FILE;
mfi.file_size = sb->st_size;
if (type & F_SCAN_TYPE_AUDIOBOOK)
mfi.media_kind = MEDIA_KIND_AUDIOBOOK;
else if (type & F_SCAN_TYPE_PODCAST)
mfi.media_kind = MEDIA_KIND_PODCAST;
mfi.compilation = (type & F_SCAN_TYPE_COMPILATION);
mfi.file_size = sb->st_size;
if (type & F_SCAN_TYPE_COMPILATION)
{
mfi.compilation = 1;
mfi.album_artist = safe_strdup(cfg_getstr(cfg_getsec(cfg, "library"), "compilation_artist"));
}
ret = scan_metadata_ffmpeg(file, &mfi);
if (ret < 0)