diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/update.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/update.c b/src/update.c index 9f3f6c22f..cf0331049 100644 --- a/src/update.c +++ b/src/update.c @@ -447,13 +447,6 @@ update_regular_file(struct directory *directory, const char* pathname = map_directory_child_fs(directory, name); struct directory* contdir = dirvec_find(&directory->children, name); - // is there already a song for this file? - if (song != NULL) - { - delete_song(directory, song); - song = NULL; - } - // directory exists already if (contdir != NULL) { @@ -471,6 +464,13 @@ update_regular_file(struct directory *directory, // contdir doesn't yet exist if (contdir == NULL) { + // is there already a song for this file? + if (song != NULL && (plugin->container_scan(pathname, 1) != NULL)) + { + delete_song(directory, song); + song = NULL; + } + // reset flag if there are no vtracks no_container = true; |