Skip to content

Commit

Permalink
vorbis: return artist instead of performer (#97)
Browse files Browse the repository at this point in the history
* Return artist instead of performer for vorbis tags

Also fix possibly a mistake where the empty performer tag would be returned for the composer mathod.

* Add missing performer comment
  • Loading branch information
melvyn2 authored Jun 30, 2023
1 parent adf36e8 commit 978a092
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions vorbis.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,10 @@ func (m *metadataVorbis) Title() string {
}

func (m *metadataVorbis) Artist() string {
// PERFORMER
// The artist(s) who performed the work. In classical music this would be the
// conductor, orchestra, soloists. In an audio book it would be the actor who
// did the reading. In popular music this is typically the same as the ARTIST
// and is omitted.
if m.c["performer"] != "" {
return m.c["performer"]
}
// ARTIST
// The artist generally considered responsible for the work. In popular music
// this is usually the performing band or singer. For classical music it would
// be the composer. For an audio book it would be the author of the original text.
return m.c["artist"]
}

Expand All @@ -195,15 +191,16 @@ func (m *metadataVorbis) AlbumArtist() string {
}

func (m *metadataVorbis) Composer() string {
// ARTIST
// The artist generally considered responsible for the work. In popular music
// this is usually the performing band or singer. For classical music it would
// be the composer. For an audio book it would be the author of the original text.
if m.c["composer"] != "" {
return m.c["composer"]
}
if m.c["performer"] == "" {
return ""
// PERFORMER
// The artist(s) who performed the work. In classical music this would be the
// conductor, orchestra, soloists. In an audio book it would be the actor who
// did the reading. In popular music this is typically the same as the ARTIST
// and is omitted.
if m.c["performer"] != "" {
return m.c["performer"]
}
return m.c["artist"]
}
Expand Down

0 comments on commit 978a092

Please sign in to comment.