Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-3012

Wrong disc numbers when submitting release

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.13
    • 2.12.3
    • Data Submission
    • None
    • Windows 10

      As an example I put 2 folders in unclustered files, the first being tagged with "Disc Number = 1, Disc Subtitle = Bass" the second "Disc Number = 2, Disc Subtitle = Drums: Hats and Miscellaneous Percussion". They also had an artist, album, title and track number tag. Then after randomly selecting sections, clustering them, and submitting it as a release it'll try to enter as 12 media, without medium name, with correct track numbers but in the wrong order (23, 24, 6, 29...). It seems to be ignoring the metadata and instead submitting in whatever order the files are clustered together.

          [PICARD-3012] Wrong disc numbers when submitting release

          Fix is merged and backported for next Picard 2 release in https://github.com/metabrainz/picard/commit/8383958b86ea2cf8929ff535cc4bd43b7f84934d

          Philipp Wolfer added a comment - Fix is merged and backported for next Picard 2 release in https://github.com/metabrainz/picard/commit/8383958b86ea2cf8929ff535cc4bd43b7f84934d

          Thanks, great! For information, I was not using the plugin.

          RandomMushroom128 added a comment - Thanks, great! For information, I was not using the plugin.

          I think I finally figured out what is happening. All works well if you cluster the files all in one go with existing tags. When clustering the files get sorted by discnumber, tracknumber.

          But when manipulating a cluster later, e.g. by adding additional files or editing tags then it can happen that the discs are not in order. But the submission iterates over the files in cluster order and everytime the disc number changes it considers this a new disc.

          I submitted a PR which will fix the issue.

          Philipp Wolfer added a comment - I think I finally figured out what is happening. All works well if you cluster the files all in one go with existing tags. When clustering the files get sorted by discnumber, tracknumber. But when manipulating a cluster later, e.g. by adding additional files or editing tags then it can happen that the discs are not in order. But the submission iterates over the files in cluster order and everytime the disc number changes it considers this a new disc. I submitted a PR which will fix the issue.

          GitHub Bot added a comment -

          See code changes in pull request #2572 submitted by phw.

          GitHub Bot added a comment - See code changes in pull request #2572 submitted by phw .

          Philipp Wolfer added a comment - - edited

          RandomMushroom128 When I load your files from the download, cluster them into Picard and submit this cluster with "Submit cluster as release..." I get a properly sorted playlist:

           

          The submission form confirmation on MB also shows the disc numbers and track numbers:

          Are you maybe using the "Add cluster as release" plugin instead of the builtin "Submit cluster as release"?

           

          Philipp Wolfer added a comment - - edited RandomMushroom128 When I load your files from the download, cluster them into Picard and submit this cluster with "Submit cluster as release..." I get a properly sorted playlist:   The submission form confirmation on MB also shows the disc numbers and track numbers: Are you maybe using the "Add cluster as release" plugin instead of the builtin "Submit cluster as release"?  

          Rohan20-10 Here's a download including the first 30 files of the first 2 media from the glitch with friends sample pack I submitted when encountering this issue. It also has a short demo video. The original download does not include track and disc numbers in the metadata, I added those based on alphabetical order of the files and folders.

          RandomMushroom128 added a comment - Rohan20-10 Here's a download including the first 30 files of the first 2 media from the glitch with friends sample pack I submitted when encountering this issue. It also has a short demo video. The original download does not include track and disc numbers in the metadata, I added those based on alphabetical order of the files and folders.

          Rohan20-10 I couldn't reproduce the issue with disc numbers not getting submitted, it is working for me. If you can reproduce the issue that would be great.

          For the submission of disc subtitles, which is also mentioned above, I added a separate ticket PICARD-3020. You are welcomed to work on this if you want.

          Take a look at https://github.com/metabrainz/picard/blob/master/picard/browser/addrelease.py, all the submission is handled there. Specifically for the disc number look at the _add_track_data function. Also see https://musicbrainz.org/doc/Development/Seeding/Release_Editor#Mediums for what data can be seeded.

          Philipp Wolfer added a comment - Rohan20-10 I couldn't reproduce the issue with disc numbers not getting submitted, it is working for me. If you can reproduce the issue that would be great. For the submission of disc subtitles, which is also mentioned above, I added a separate ticket PICARD-3020 . You are welcomed to work on this if you want. Take a look at https://github.com/metabrainz/picard/blob/master/picard/browser/addrelease.py, all the submission is handled there. Specifically for the disc number look at the _add_track_data function. Also see https://musicbrainz.org/doc/Development/Seeding/Release_Editor#Mediums for what data can be seeded.

          outsidecontext RandomMushroom128 I am interested to work on this issue would you provide me more details about it.
          The folders which you actually supplied to test it.

          Rohan Jayprakash Parab added a comment - outsidecontext RandomMushroom128 I am interested to work on this issue would you provide me more details about it. The folders which you actually supplied to test it.

          The tags are correct, I added them with the auto-fill / drop-down

          When clustering normally the submitted release is as expected (except the lack of disc subtitles)
          But something can go wrong more easily with a release with 10+ media

          RandomMushroom128 added a comment - The tags are correct, I added them with the auto-fill / drop-down When clustering normally the submitted release is as expected (except the lack of disc subtitles) But something can go wrong more easily with a release with 10+ media

          I can't reproduce this here. I suspect your files contain the disc number in a different tag then what Picard expects. Can you check how the tag name is displayed when editing the disc number tag? The tag name is supposed to be "discnumber" as shown in the screenshot:

          See also https://picard-docs.musicbrainz.org/en/appendices/tag_mapping.html#disc-number

          Philipp Wolfer added a comment - I can't reproduce this here. I suspect your files contain the disc number in a different tag then what Picard expects. Can you check how the tag name is displayed when editing the disc number tag? The tag name is supposed to be "discnumber" as shown in the screenshot: See also https://picard-docs.musicbrainz.org/en/appendices/tag_mapping.html#disc-number

            outsidecontext Philipp Wolfer
            RandomMushroom128 RandomMushroom128
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Version Package
                2.13