mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-21 07:04:02 +00:00
Use archived analysis from Ogg and FLAC files
This commit is contained in:
@@ -47,6 +47,9 @@ class VCommentFile(File):
|
||||
if start > 0:
|
||||
name += ':' + value[start + 2:-1]
|
||||
value = value[:start]
|
||||
elif name == "fingerprint" and value.startswith("MusicMagic Fingerprint"):
|
||||
name = "musicip_fingerprint"
|
||||
value = value[22:]
|
||||
metadata.add(name, value)
|
||||
self._info(metadata, file)
|
||||
return metadata
|
||||
@@ -74,6 +77,9 @@ class VCommentFile(File):
|
||||
name, desc = name.split(':', 1)
|
||||
if desc:
|
||||
value += ' (%s)' % desc
|
||||
elif name == "musicip_fingerprint":
|
||||
name = "fingerprint"
|
||||
value = "MusicMagic Fingerprint%s" % value
|
||||
tags.setdefault(name.upper().encode('utf-8'), []).append(value)
|
||||
file.tags.update(tags)
|
||||
kwargs = {}
|
||||
|
||||
@@ -141,7 +141,8 @@ class OFA(QtCore.QObject):
|
||||
# use cached fingerpring
|
||||
fingerprints = file.metadata.getall('musicip_fingerprint')
|
||||
if fingerprints:
|
||||
self._lookup_fingerprint(file, next, result=(fingerprints[0], 0))
|
||||
self._lookup_fingerprint(self.tagger.analyze_queue.next,
|
||||
file.filename, result=(fingerprints[0], 0))
|
||||
return
|
||||
# calculate fingerprint
|
||||
if ofa is not None:
|
||||
|
||||
Reference in New Issue
Block a user