Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PICARD-3012: Sort files by disc no. when submitting cluster as release #2572

Merged
merged 5 commits into from
Jan 8, 2025

Conversation

phw
Copy link
Member

@phw phw commented Jan 7, 2025

This ensures the disc numbers are in order even if the cluster gets edited after clustering.

Summary

  • This is a…
    • Bug fix
    • Feature addition
    • Refactoring
    • Minor / simple change (like a typo)
    • Other
  • Describe this change in 1-2 sentences:

Problem

When submitting a cluster as release the files inside the cluster are expected to be ordered by discnumber. Directly after clustering this is the case, but if files get added to the cluster later or if the discnumber tags on clustered files get edited, this is no longer true.

Since the consecutive indexing of submitted mediums relies on disc number changing to create a new disc this breaks.

Solution

Sort the files by discnumber when gathering the submission data.

@phw phw requested a review from zas January 7, 2025 15:22
picard/browser/addrelease.py Show resolved Hide resolved
This ensures the disc numbers are in order even if the cluster gets edited
after clustering.
@phw phw force-pushed the PICARD-3012-submit-cluster-sort-files branch from d508438 to 6c43142 Compare January 7, 2025 16:12
@phw phw force-pushed the PICARD-3012-submit-cluster-sort-files branch from 6c43142 to 7e34d9d Compare January 7, 2025 16:15
test/test_browser_addrelease.py Show resolved Hide resolved
Copy link
Collaborator

@zas zas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@phw phw merged commit 44ef68f into metabrainz:master Jan 8, 2025
48 checks passed
@phw phw deleted the PICARD-3012-submit-cluster-sort-files branch January 8, 2025 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants