From 868be734b84228ef691d0f7ca4104e763cc1d9a6 Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Sun, 6 Feb 2011 17:36:35 +0100 Subject: [PATCH] Don't scan artwork files Based on a patch from Dominic Evans . --- src/filescanner.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/filescanner.c b/src/filescanner.c index a7287cee..888d031d 100644 --- a/src/filescanner.c +++ b/src/filescanner.c @@ -263,6 +263,12 @@ process_media_file(char *file, time_t mtime, off_t size, int compilation) if (ret == 0) mfi.data_kind = 1; /* url/stream */ } + else if ((strcmp(ext, ".png") == 0) + || (strcmp(ext, ".jpg") == 0)) + { + /* Artwork - don't scan */ + goto out; + } } /* 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); - free_mfi(&mfi, 1); - return; + goto out; } mfi.compilation = compilation; @@ -296,6 +301,7 @@ process_media_file(char *file, time_t mtime, off_t size, int compilation) else db_file_update(&mfi); + out: free_mfi(&mfi, 1); }