Don't add duplicates (same fname, artist, album and title), issue #85

This commit is contained in:
ejurgensen
2015-01-14 22:06:27 +01:00
parent 4df4c50c35
commit 70365422b4
3 changed files with 33 additions and 0 deletions

View File

@@ -678,6 +678,19 @@ filescanner_process_media(char *path, time_t mtime, off_t size, int type, struct
fixup_tags(mfi);
if (db_file_is_duplicate(mfi))
{
DPRINTF(E_LOG, L_SCAN, "Skipping '%s' (duplicate filename, artist, album and title)\n", mfi->path);
/* Can't just disable because db_file_ping() will reenable on startup */
if (mfi->id > 0)
{
db_file_delete_bypath(mfi->path);
cache_artwork_delete_by_path(mfi->path);
}
goto out;
}
if (mfi->id == 0)
db_file_add(mfi);
else