Updated tasks.py to process replace flag

This commit is contained in:
RenonDis 2018-06-22 15:13:48 +02:00 committed by Eliot Berriot
parent 8103ea541f
commit f3f07c1f8d
No known key found for this signature in database
GPG Key ID: DD6965E2476E5C27
1 changed files with 2 additions and 2 deletions

View File

@ -136,8 +136,8 @@ def _do_import(import_job, use_acoustid=False):
track_file = None
if replace:
logger.info("[Import Job %s] replacing existing audio file", import_job.pk)
track_file = track.files.first()
logger.info("[Import Job %s] deleting existing audio file", import_job.pk)
track.files.all().delete()
elif track.files.count() > 0:
logger.info(
"[Import Job %s] skipping, we already have a file for this track",