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

Classical music metadata support #2601

Open
wants to merge 103 commits into
base: master
Choose a base branch
from
Open

Conversation

certuna
Copy link
Contributor

@certuna certuna commented Nov 9, 2023

Implements #275

Builds on Multiple artist support #2524 , ideally that one should get merged first.

Navidrome follows the is_classical and showmovement tags (used by Picard and Apple) to set if a mediafile should be treated as Classical.

For files that don't have these tags, there's a new option scanner.AutoDetectClassical = true/false which enables "auto-detect" if a track is Classical. The criteria are either/or:

  • file has both composer AND movementname tags
  • one of the genre tags is "Classical" (note: I don't 100% like this, since it's not language-neutral, but it's quite user-friendly)

If a track is Classical, Navidrome does the following:

  • Adds all Composers, Conductors and Performers as additional song artists
  • Uses Movement Number (movement/mvin)+ Movement Name (movementname/mvnm) tags instead of Track Title (title/tit2) tag
  • Displays the Work Name (work/tit1) + Composers/Arrangers in the album tracklist (Navidrome Web UI only, not Subsonic API)
  • Albums and tracks have a property classical=true/false that can be used in smart playlists
{
  "all": [
    {"is": {"classical": true}}
  ],
  "sort": "year",
  "order": "asc",
  "limit": 100
}

No changes for users without Classical music in their collection

Screenshot 2023-11-09 at 15 22 34

Screenshot 2023-11-09 at 15 00 42

Sort by Artist = Album Artist first, so it shows an artist's own albums first, and appearances on other albums second.
Alias match_album_artist, allows for sorting by an artist's own albums first, then his appearances on compilations/etc.
forgot args in line 89
removed comment about Subsonic, it's irrelevant since this query is never done through the Subsonic API.
updated with multi-artist tags
Add function to remove duplicate values but keep the order intact
Add test for RemoveDuplicateStr()
Copy link

github-actions bot commented Nov 9, 2023

Download the artifacts for this pull request:

@Tolriq
Copy link

Tolriq commented Nov 11, 2023

Please check the OpenSubsonic part about contributors and roles, if you support composers and all the relatives they can be exposed properly to OpenSubsonic clients that could make great use of the data. (Will require that you store the data accordingly in the DB even if not exposing it yet as OS data, properly preparing the data will help if you add future support)

@certuna
Copy link
Contributor Author

certuna commented Nov 11, 2023

OpenSubsonic support with roles/etc will likely have to wait until we do a full refactoring of the database.

I could do it in a hacky way and put multiple role/artist (or role/artistID)pairs in a single DB field (like id3 does it with TMCL/TIPL) and then pull them out and split for the API, but I don't really want to do that, not if a DB refactoring with proper m2m relations is around the corner.

Up to Deluan to say, I think.

@Tolriq
Copy link

Tolriq commented Nov 11, 2023

I was mostly pointing that since the future is OpenSubsonic for clients to be able to consume the data, it's important that what you do now does not become a much more complicated breaking change later.
Anything not OpenSubsonic or Subsonic from API pov is limited to the Navidrome web interface and not usable from other clients.

@certuna certuna mentioned this pull request Nov 30, 2023
5 tasks
@MRodneyMcKay
Copy link

Can we have an ETA on the DB refactoring, so this could get merged?

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.

None yet

3 participants