* If a new file is noticed by inotify, check if it is cover art for existing files, and update them if so.

This commit is contained in:
Justin Maggard
2009-07-08 19:20:32 +00:00
parent 038356bf78
commit b1f4c35017
5 changed files with 95 additions and 4 deletions

View File

@ -22,6 +22,7 @@
#include "utils.h"
#include "sql.h"
#include "scanner.h"
#include "albumart.h"
#include "log.h"
#define EVENT_SIZE ( sizeof (struct inotify_event) )
@ -268,6 +269,10 @@ inotify_insert_file(char * name, const char * path)
enum media_types type = ALL_MEDIA;
struct media_dir_s * media_path = media_dirs;
/* Is it cover art for another file? */
if( is_image(path) )
update_if_album_art(path);
/* Check if we're supposed to be scanning for this file type in this directory */
while( media_path )
{