Break out of disambiguation loop once disambig has been added

Instead of iterating over all the path parts and added disambiguation to
each, it now only adds the disambiguation to the first match.
This commit is contained in:
Frederik “Freso” S. Olesen
2017-04-29 14:34:07 +02:00
parent f3e3748d75
commit e5f2afe0db

View File

@@ -250,6 +250,7 @@ class Program:
templateParts[i] += ' (%s)' % self.metadata.catalogNumber
elif self.metadata.barcode:
templateParts[i] += ' (%s)' % self.metadata.barcode
break
template = os.path.join(*templateParts)
logger.debug('Disambiguated template to %r' % template)