Differentiate release groups with same title, but different type (e.g., EP/single/album) clash #231

Closed
opened 2024-12-27 10:24:13 +01:00 by wojtek · 10 comments
Owner

Follow up to #160

Not differentiating causes only one of them to display when there should be more than one. MB does not have this issue as it relies on MBIDs.

Follow up to #160 Not differentiating causes only one of them to display when there should be more than one. MB does not have this issue as it relies on MBIDs.
wojtek added this to the v1.0.0-alpha.1 milestone 2024-12-27 10:24:13 +01:00
wojtek added the
bug
label 2024-12-27 10:24:13 +01:00
wojtek added this to the Album tracking project 2024-12-27 10:24:13 +01:00
wojtek changed title from Different release groups with same title, but different type (e.g., EP/single/album) clash to Differentiate release groups with same title, but different type (e.g., EP/single/album) clash 2024-12-30 23:43:33 +01:00
wojtek added
enhancement
and removed
bug
labels 2024-12-30 23:43:37 +01:00
Author
Owner
  1. Find album in collection using MBID if it exists, falling back to name. Move MBID to AlbumId.
  2. Use primary type in sorting - ensure it's also saved for finding the same location after a fetch.
1. Find album in collection using MBID if it exists, falling back to name. Move MBID to AlbumId. 2. Use primary type in sorting - ensure it's also saved for finding the same location after a fetch.
wojtek added reference 231---differentiate-release-groups-with-same-title-but-different-type-clash 2025-01-01 12:45:51 +01:00
Author
Owner

Problem:

  • Library does not store MBID
  • Upon startup the library/database merge needs to identify which one is owned
  • Adding a DB flag for "owned" is not sufficient as new albums can be added to the library
Problem: - Library does not store MBID - Upon startup the library/database merge needs to identify which one is owned - Adding a DB flag for "owned" is not sufficient as new albums can be added to the library
Author
Owner

Adding a release group MBID to the library would solve it, but that means the MBID becomes a requirement which is not desirable

Adding a release group MBID to the library would solve it, but that means the MBID becomes a requirement which is not desirable
Author
Owner

Best solution from user perspective:

  • Library/database merge is fully automated if no new albums have been added to the library
    • this requires an owned flag
  • If a new album is added and there is only one possible match it is automatic
  • If there is a clash, the user is asked which one to match it with
    • current library/database merge is assumed to be fully automated with no user input
    • would have to be implemented as a follow up step
      • during merge insert as new entry with no MBID (and possible flag as a clash)
      • post-merge scan all albums and find clashes and ask user
    • in this issue write code to find clashes and raise as critical error - resolve once an example is known
      • likely to happen soon, but it requires an album to be added to the library after a fetch has already been performed which will not be the case at the moment
Best solution from user perspective: - Library/database merge is fully automated if no new albums have been added to the library - this requires an owned flag - If a new album is added and there is only one possible match it is automatic - If there is a clash, the user is asked which one to match it with - current library/database merge is assumed to be fully automated with no user input - would have to be implemented as a follow up step - during merge insert as new entry with no MBID (and possible flag as a clash) - post-merge scan all albums and find clashes and ask user - in this issue write code to find clashes and raise as critical error - resolve once an example is known - likely to happen soon, but it requires an album to be added to the library after a fetch has already been performed which will not be the case at the moment
Author
Owner

What if two albums with same name are owned (e.g., EP + album)?

  • Not the case at the moment
    • Name clashes usually happen such that I archive the single/EP when adding the album with the same name
What if two albums with same name are owned (e.g., EP + album)? - Not the case at the moment - Name clashes usually happen such that I archive the single/EP when adding the album with the same name
Author
Owner

Require library to return a unique album ID

  • beets already provides one accessible via $album_id
  • other library executors are not a problem for today
  • create a mapping and store the map in the database
    • allows for other executors or other ids in the future
  • store this ID in AlbumId as the owned flag - unambiguous matching
  • add some extra logic
    • if an album has a libid but is found missing remove libid
    • a new album must find a match, first do it by title, in case of a clash flag it for later processing
Require library to return a unique album ID - beets already provides one accessible via $album_id - other library executors are not a problem for today - create a mapping and store the map in the database - allows for other executors or other ids in the future - store this ID in AlbumId as the owned flag - unambiguous matching - add some extra logic - if an album has a libid but is found missing remove libid - a new album must find a match, first do it by title, in case of a clash flag it for later processing
Author
Owner

Therefore solution is:

  1. Add a libid field to AlbumInfo
  2. Add a disambig field to AlbumId
  • Suggested fields: LibId, MbId - guarantees always one unique ID
  • Do not use for sorting
  • When checking for equality do not compare field if it is missing on either side
  • Merging library with database will be more complicated
    • First merge by LibId
    • Then merge by title - if multiple entries have the same title, flag as a clash
  1. Add primary type to sort key
Therefore solution is: 1. Add a libid field to AlbumInfo 2. Add a disambig field to AlbumId - Suggested fields: LibId, MbId - guarantees always one unique ID - Do not use for sorting - When checking for equality do not compare field if it is missing on either side - Merging library with database will be more complicated - First merge by LibId - Then merge by title - if multiple entries have the same title, flag as a clash 3. Add primary type to sort key
Author
Owner
  • Adding LibId solves the problem for albums which are owned.
  • Need to move MBID to AlbumId to also solve the problem for albums that are not owned yet.
- Adding LibId solves the problem for albums which are owned. - Need to move MBID to AlbumId to also solve the problem for albums that are not owned yet.
Author
Owner

Once MBID is part of AlbumId also make MBID part of ArtistId for consistency

Once MBID is part of AlbumId also make MBID part of ArtistId for consistency
Author
Owner

Contemplate renaming db_id to mbref to make it clear what it is

Contemplate renaming db_id to mbref to make it clear what it is
wojtek referenced this issue from a commit 2025-01-02 22:54:54 +01:00
Sign in to join this conversation.
No Milestone v1.0.0-alpha.1
No project Album tracking
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wojtek/musichoard#231
No description provided.