Don't scan artwork files

Based on a patch from Dominic Evans <oldmanuk@gmail.com>.
This commit is contained in:
Julien BLACHE 2011-02-06 17:36:35 +01:00
parent 4806b2c20c
commit 868be734b8

View File

@ -263,6 +263,12 @@ process_media_file(char *file, time_t mtime, off_t size, int compilation)
if (ret == 0) if (ret == 0)
mfi.data_kind = 1; /* url/stream */ mfi.data_kind = 1; /* url/stream */
} }
else if ((strcmp(ext, ".png") == 0)
|| (strcmp(ext, ".jpg") == 0))
{
/* Artwork - don't scan */
goto out;
}
} }
/* General case */ /* General case */
@ -276,8 +282,7 @@ process_media_file(char *file, time_t mtime, off_t size, int compilation)
{ {
DPRINTF(E_INFO, L_SCAN, "Could not extract metadata for %s\n", file); DPRINTF(E_INFO, L_SCAN, "Could not extract metadata for %s\n", file);
free_mfi(&mfi, 1); goto out;
return;
} }
mfi.compilation = compilation; mfi.compilation = compilation;
@ -296,6 +301,7 @@ process_media_file(char *file, time_t mtime, off_t size, int compilation)
else else
db_file_update(&mfi); db_file_update(&mfi);
out:
free_mfi(&mfi, 1); free_mfi(&mfi, 1);
} }