Closed andrewzah closed 3 years ago
Thanks for the report. Are you using the (default) taglib
scanner or the ffmpeg
scanner?
I'm using the default one. For some reason, easytag
puts its fields in lowercase. Using metaflac I fixed it, but ideally the scanner should be case insensitive, no?
Update: I don't know what I did with easytags. But upon editing another album, it did use capital case. However comment is set under DESCRIPTION
and url is set under CONTACT
.
Weird thing is that it is.... Can you attach a problematic file so I can take a look? I don't have easytag installed, could be another issue with tags created by it
@deluan github won't let me upload .flac, but you can replicate with
for f in *.flac; do metaflac --remove-tag comment "$f"; done
and
for f in *.flac; do metaflac --set-tag "comment=test1" "$f"; done
In my testing it turns out navidrome actually does read both COMMENT
and comment
. I just had to do a hard refresh with ctrl-shift-r. Oops...
However, it looks like easytag actually sets DESCRIPTION
instead of COMMENT
. I did somehow get comment
initially...
$ metaflac --list Bill\ Evans\ -\ Another\ Time-\ The\ Hilversum\ Concert\ -\ 01\ You\'re\ Gonna\ Hear\ from\ Me.flac
METADATA block #0
type: 0 (STREAMINFO)
is last: false
length: 34
minimum blocksize: 4096 samples
maximum blocksize: 4096 samples
minimum framesize: 1425 bytes
maximum framesize: 16939 bytes
sample_rate: 96000 Hz
channels: 2
bits-per-sample: 24
total samples: 25929706
MD5 signature: 8d646e2c42c05a7f177c3220145cc40f
METADATA block #1
type: 4 (VORBIS_COMMENT)
is last: false
length: 236
vendor string: reference libFLAC 1.3.2 20170101
comments: 8
comment[0]: TITLE=You're Gonna Hear From Me
comment[1]: ARTIST=Bill Evans
comment[2]: ALBUMARTIST=Bill Evans
comment[3]: ALBUM=Another Time (The Hilversum Concert)
comment[4]: DATE=1968
comment[5]: GENRE=Jazz
comment[6]: DESCRIPTION=HCD-2031
comment[7]: comment=test1
METADATA block #2
type: 1 (PADDING)
is last: true
length: 129221
Is Description
a standard field? Or Is it some weird behaviour from easytag? Any thoughts @certuna ?
Well Vorbis doesn’t have any formal standard what fields are allowed or what name they should have, so all fields are “custom”. If some taggers or players use DESCRIPTION, and it catches on, then that’s just as valid as any other Vorbis field.
id3v2 does have an official “subtitle/description” (TIT3). The original idea with id3 back in 1999/2000 was:
That was the theory at least, but in practice almost no players support TIT1 or TIT3, although Beatport uses TIT3 to store remix names, and as a result some DJ mixing apps use it.
And then Apple came in six years ago and introduced a fourth title field, Movement (MVNM, for the individual pieces in a Work). Why they didn’t just use TIT2 for that is anyone’s guess, but hey, it’s a thing now. And they also added yet another field, Grouping (GRP1), the purpose of which isn’t totally clear to anyone but everybody just seems to use it as a generic extra field.
Anyway, would be nice if Navidrome supported all these fields, although how you’d display all this stuff in the web UI is probably requires some thinking. The Subsonic API has only one song title field anyway, so even if ND supported a hundred fields, it would be no use to 3rd party clients.
Yeah, but the main question is: Should we import "Description" as "Comment"? What happens if the file has both?
It seems like using description as comment is nonstandard.
TIT3
The 'Subtitle/Description refinement' frame is used for information directly related to the contents title (e.g. "Op. 16" or "Performed live at Wembley").
DESCRIPTION
A short text description of the contents
https://www.xiph.org/vorbis/doc/v-comment.html
If both are set, one could put the description text above where the comment text is.
example DESCRIPTION
usages in my library:
METADATA block #1
type: 4 (VORBIS_COMMENT)
is last: false
length: 198
vendor string: reference libFLAC 1.3.2 20170101
comments: 7
comment[0]: TITLE=Five
comment[1]: ARTIST=Bill Evans
comment[2]: ALBUMARTIST=Bill Evans
comment[3]: ALBUM=Another Time (The Hilversum Concert)
comment[4]: DATE=1968
comment[5]: GENRE=Jazz
comment[6]: DESCRIPTION=HCD-2031
METADATA block #1
type: 4 (VORBIS_COMMENT)
is last: false
length: 174
vendor string: Lavf56.1.100
comments: 7
comment[0]: DESCRIPTION=www.dvdvideosoft.com
comment[1]: ENCODER=Lavf56.1.100
comment[2]: Album=We Like It Here
comment[3]: Artist=Snarky Puppy
comment[4]: Title=5 Kite
comment[5]: DATE=2014
comment[6]: TRACKNUMBER=5
METADATA block #2
type: 4 (VORBIS_COMMENT)
is last: false
length: 293
vendor string: reference libFLAC 1.3.1 20141125
comments: 10
comment[0]: ARTIST=Jake & Elwood
comment[1]: TITLE=Sweet Home Chicago
comment[2]: ALBUM=The Blues Brothers (Music From The Soundtrack)
comment[3]: DATE=1980
comment[4]: TRACKNUMBER=10
comment[5]: ALBUMARTIST=Various Artists
comment[6]: DISCNUMBER=1
comment[7]: TOTALDISCS=1
comment[8]: TOTALTRACKS=11
comment[9]: DESCRIPTION=EAC v.1.3 + FLAC
METADATA block #1
type: 4 (VORBIS_COMMENT)
is last: false
length: 712
vendor string: reference libFLAC 1.3.1 20141125
comments: 29
comment[0]: TITLE=Birthday
comment[1]: ARTIST=The Beatles
comment[2]: ALBUMARTIST=The Beatles
comment[3]: ALBUM=The Beatles {PCS 7067-8}
comment[4]: DISCNUMBER=01
comment[5]: DATE=1968
comment[6]: TRACKNUMBER=18
comment[7]: TRACKTOTAL=30
comment[8]: GENRE=Rock
comment[9]: DESCRIPTION=Final Master
comment[10]: DISCOGS_LABEL_ID=25693
comment[11]: DISCOGS_VOTES=424
comment[12]: TVSEASON=0
comment[13]: DISCOGS_CATALOG=PCS 7067/8
comment[14]: STYLE=Rock & Roll
comment[15]: STYLE=Pop Rock
comment[16]: STYLE=Psychedelic Rock
comment[17]: STYLE=Experimental
comment[18]: DISCOGS_COUNTRY=UK
comment[19]: DISCOGS_RELEASE_MONTH=11
comment[20]: DISCOGS_RELEASED=1968-11-22
comment[21]: DISCOGS_RELEASE_ID=1113362
comment[22]: DISCOGS_ARTIST_ID=82730
comment[23]: DISCOGS_RATING=4.59
comment[24]: ITUNESMEDIATYPE=Unknown
comment[25]: TVEPISODE=0
comment[26]: BPM=00000 BPM
comment[27]: DISCOGS_LABEL=Apple Records
comment[28]: DISCOGS_MASTER_RELEASE_ID=46402
METADATA block #3
type: 4 (VORBIS_COMMENT)
is last: false
length: 336
vendor string: reference libFLAC 1.3.2 20170101
comments: 10
comment[0]: ALBUM=Journeys Into Rhythm EP
comment[1]: ALBUMARTIST=Audio One
comment[2]: ARTIST=Audio One
comment[3]: COMPOSER=Jörg Burger
comment[4]: DATE=1989
comment[5]: DESCRIPTION=Cat#: ROOM 001 | http://www.discogs.com/release/108387
comment[6]: GENRE=Electronic, House, Deep House
comment[7]: ORGANIZATION=Room Service Records
comment[8]: TITLE=Falling
comment[9]: TRACKNUMBER=3
Supporting Description is fine, but it is track-level metadata, it should be a column in the tracks list, not one field at the album level. What do you do with two tracks on one album, with different Description fields?
I feel the same about the Comments field btw, I think it’s a mistake to use it in Navidrome as “album comments”, since each track can have its own Comments.
@certuna navidrome already shows the comment for each track in the detailed view. Description could easily go there as well if it's not the same across tracks.
In both of the source I linked above, COMMENT
referred to information pertaining to the contents
, not necessarily the individual track. Also in my library, for every album that had a comment, it was the same for every track anyways.
The most common one being from bandcamp, but others contain the cd release id, ripping/transcode information, etc.
comment[10]: COMMENT=Verve / Polygram 831 133-2, Bonus Tracks
...
comment[3]: COMMENT=Visit http://oohyo.bandcamp.com
comment[3]: COMMENT=Visit http://oohyo.bandcamp.com
I wonder why they're using COMMENT
here and not CONTACT
?
CONTACT Contact information for the creators or distributors of the track. This could be a URL, an email address, the physical address of the producing label.
But the thing is, the Comments frame in id3v2 (COMM
) is a bit more complex.
TIT3
Subtitle/Description, but most of them support COMM
.4.10. Comments
This frame is intended for any kind of full text information that
does not fit in any other frame. It consists of a frame header
followed by encoding, language and content descriptors and is ended
with the actual comment as a text string. Newline characters are
allowed in the comment text string. There may be more than one
comment frame in each tag, but only one with the same language and
content descriptor.
<Header for 'Comment', ID: "COMM">
Text encoding $xx
Language $xx xx xx
Short content descrip. <text string according to encoding> $00 (00)
The actual text <full text string according to encoding>
Vorbis/FLAC as usual, has nothing strictly defined, so there too COMMENTS
doesn't necessarily hold album-level info, although it certainly can - nobody will stop you if you do.
The Xiph recommendations say though: COMMENT additional comments of any nature.
Like every field in Vorbis, you can store multiple frames of the same field, so you're allowed to store COMMENTS
= "This is a great album, it was made by Alice and Bob and released to universal acclaim in 1998, sweeping the Grammy's" (album comment) and COMMENTS
= "This track was recorded by Alice and Bob with Carol on lead guitar and features kazoo playing by none other than Dave" (track comment) both in the same file.
TLDR; "Description" was supposed to be song metadata (but people may store album metadata there in practice), and "Comments" may refer to album metadata, or song metadata, as a music player you cannot know in advance.
I would probably suggest that Navidrome treats both as media_file
-level in principle, and we add some logic that if this field is equal for all media_files
in an album, it gets rolled up to album. @deluan is this difficult to implement on the scanner/db side?
I wonder why they're using COMMENT here and not CONTACT?
I don't know, but it's the same for any album downloaded from bandcamp. I can send them an email about it.
I think we discussed this before, but for comment, we could consider it an album-level comment if all comments from all songs are the same. If not, they only appear in the song details, and the album comment stays empty. Thoughts?
Agree.
Ok, will do this for comment
. Two more questions:
description
? Should it be supported at all? Thoughts?In the case the comment is the same for all tracks and we set it as the album's comment, should we hide the comment from each track?
If we keep it, hiding the full comment until it's clicked like in the album page would be nice. See the previous image I uploaded for an example of what long comments end up looking like currently.
Also, we should keep in mind that it's possible to have multiple COMMENT tags. The docs certuna linked state
If one of these tags appears more than once, its last appearance should be displayed if there is only room to display one instance of the tag.
What to do with description? Should it be supported at all? Thoughts?
It seems best to me to follow the "standard" tags as mentioned by certuna. It would be nice if the detailed song view supported these, like composer, arranger, etc. I also found more tags here: https://help.mp3tag.de/main_tags.html
I don't know why easytag maps comment->description. (I think I should stop using easytag). Maybe if both comment and description are the same for all songs on an album, the description can go before the comment in the album view?
I took a shot at implementing @deluan's suggestion:
I think we discussed this before, but for comment, we could consider it an album-level comment if all comments from all songs are the same. If not, they only appear in the song details, and the album comment stays empty. Thoughts?
Should we also remove the comments from the songs in that case?
Hey @caiocotts, thanks for the PR, looks good.
I think we should hide the comments from the songs in that case.
In the current state, it may be challenging to hide the comments from songs in the UI as we don't have the album info everywhere we would need it (ex: in SongDetails.js
). Maybe we can add a flag to the media_file
table in the DB, something like is_album_comment
? This would appear as a song attribute in the UI, making it easier to show/hide it.
Any ideas @certuna ?
This also has parallels with https://github.com/navidrome/navidrome/issues/846 : if any metadata is the same for all tracks, should the Navidrome UI then hide it (and move it to the album details section)? Because it doesn't end with comment, year or artist, we'll soon have the same discussion with things like Producer credits: if one producer did all tracks, should it then show as a credit for each individual track, or as an album-level credit?
I don't think is_album_comment
is a bad idea in isolation, but we might soon have such a flag for a dozen fields.
Would this be workable?
/album
endpoint/track
endpoint, but drop them from the tracklist of the webUI if they're all the same (clientside)That way we have the maximum amount of information at the API level, and the most flexibility towards the future.
Would this be workable?
- roll up comments to a field in the album table in the DB if they're all the same (so, serverside by the scanner), and send that to the webUI as part of response for the
/album
endpoint- send track comments as part of the
/track
endpoint, but drop them from the tracklist of the webUI if they're all the same (clientside)
Yes, this is workable. The issue is in the SongList and PlaylistSongs views : When listing tracks detached from their albums, there is no way to know if the comment in the track is an album-level or track-level comment as we don't have the album information, only the data that is part of the track. Should we ignore this fact and always show the comment? Example showing songs from the same album, with album-level comment:
If we are ok repeating the comment in all tracks of an album where we don't have the album info (basically anywhere except in the Album view), then we can implement this on the UI side (in the Album view) as suggested. If not, we need a way to flag the comment as album-level or track-level.
I'm ok with always showing all info as track level when the album info is not available. Just want to be sure we are doing The Right Thing ™️
@caiocotts Regardless of the approach we take from the options above, we will need to write a DB migration, to roll-up album comments for the music that is already imported. Let me know if you have any questions.
@deluan please my PR and see if there's anything missing.
@caiocotts, looks good, thanks!
@certuna / @andrewzah, the PR makes comment
behaves as we discussed above, I'll merge it.
What should we do re: description
? Leave as it is now (not imported)?
DESCRIPTION
doesn't seem to have standard usage at all. About 8 albums out of my ~245 albums have it set. So I'm not sure if it's worth adding a field for that.
If it is added, perhaps it could be shown underneath COMMENT
, if all tracks have the same value?
artists/Oscar Peterson/Oscar Peterson Trio - Night Train/08 - Things Ain't What They Used to Be.flac:
comment[0]: Description=1997 Verve Records / 314 521 440-2
---
artists/The Beatles/The Beatles - White Album/19 - Yer Blues.flac:
comment[9]: DESCRIPTION=Final Master
---
artists/Snarky Puppy/We Like It Here/4 Jambone.flac:
comment[0]: DESCRIPTION=www.dvdvideosoft.com
---
artists/Bill Evans/Another Time- The Hilversum Concert/Bill Evans - Another Time- The Hilversum Concert - 07 Nardis.flac:
comment[6]: DESCRIPTION=HCD-2031
---
If it is a nonstandard, not commonly used field, I rather not add support for it, as it is more code to maintain for such an edge case.
I'll close this for now, but feel free to reopen if you sill have any concerns.
I am late to this discussion, but came from the enhancements tracker. Let me know if there is a better way to express this:
I like the way unified comments for an album are displayed. But I am hoping for an optional column to display track comments in the album view (like Rating, BPM, etc . . .). Perhaps the album comments can indicate that there are "varied" comments within the tracks or that comments are present for some songs. This is most applicable to albums with Bonus Discs or remixes/other special stuff tacked on at the end.
For what it's worth, I just went through my mp3's ID3 tags and made sure the info I wanted was in the "COMM" section. If this isn't a good approach for Navidrome, then I can move track specific comments to the track title (TIT2).
. . .
4.10. Comments This frame is intended for any kind of full text information that does not fit in any other frame. It consists of a frame header followed by encoding, language and content descriptors and is ended with the actual comment as a text string. Newline characters are allowed in the comment text string. There may be more than one comment frame in each tag, but only one with the same language and content descriptor. <Header for 'Comment', ID: "COMM"> Text encoding $xx Language $xx xx xx Short content descrip. <text string according to encoding> $00 (00) The actual text <full text string according to encoding>
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Description
The UI doesn't show comments from flac tags.
Expected Behaviour
I expect the UI to show comments from flac tags.
Steps to reproduce
Platform information
0.41.0-SNAPSHOT (d5434d41)
78.8.0esr (64-bit)
Additional information
This album DOES show the comment.
metaflac output: https://gist.github.com/andrewzah/ed008321799651ded9c2cac32b511697
This album also does show the comment, but not the description: