PICARD-2007: Disable fingerprinting for MIDI files

Audio fingerprinting can by design not work on MIDI files
This commit is contained in:
Philipp Wolfer
2020-11-05 08:31:03 +01:00
parent 9c4794c239
commit 9d2dd7cf35
2 changed files with 6 additions and 3 deletions

View File

@@ -54,3 +54,6 @@ class MIDIFile(File):
@classmethod
def supports_tag(cls, name):
return False
def can_analyze(self):
return False

View File

@@ -798,9 +798,9 @@ class Tagger(QtWidgets.QApplication):
return
files = self.get_files_from_objects(objs)
for file in files:
file.set_pending()
self._acoustid.analyze(file, partial(file._lookup_finished,
File.LOOKUP_ACOUSTID))
if file.can_analyze():
file.set_pending()
self._acoustid.analyze(file, partial(file._lookup_finished, File.LOOKUP_ACOUSTID))
def generate_fingerprints(self, objs):
"""Generate the fingerprints without matching the files."""