Metadata comparison for recordings raises exception if length is None

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Normal
    • 2.11.0rc1
    • Affects Version/s: 2.10.0
    • Component/s: Tags & Metadata
    • None

      If the there is no length for a recording loaded in MB the following exception is logged:

        File "/home/phw/devel/musicbrainz/picard/picard/metadata.py", line 371, in compare_to_track
          score = self.length_score(a, b)
                  ^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/phw/devel/musicbrainz/picard/picard/metadata.py", line 209, in length_score
          return (1.0 - min(abs(a - b),
                                ~~^~~
      TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'

            Assignee:
            Philipp Wolfer
            Reporter:
            Philipp Wolfer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2.11.0rc1