From 3e14c3c4f8263e006d30267132d0a1b0ae2ea8d1 Mon Sep 17 00:00:00 2001 From: BenzLeung Date: Tue, 20 Jun 2023 21:32:49 +0800 Subject: [PATCH] Add support for lyrics tag `unsynced lyrics` (#2391) * Add support for lyrics tag `unsynced_lyrics` * Update metadata.go * Update metadata.go resolve lint issue * format the code with `goimports` format the code with `goimports` --- scanner/metadata/metadata.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scanner/metadata/metadata.go b/scanner/metadata/metadata.go index 4f6191675..9516ef165 100644 --- a/scanner/metadata/metadata.go +++ b/scanner/metadata/metadata.go @@ -103,10 +103,12 @@ func (t Tags) Date() (int, string) { return t.getDate("date") } func (t Tags) OriginalDate() (int, string) { return t.getDate("originaldate") } func (t Tags) ReleaseDate() (int, string) { return t.getDate("releasedate") } func (t Tags) Comment() string { return t.getFirstTagValue("comment") } -func (t Tags) Lyrics() string { return t.getFirstTagValue("lyrics", "lyrics-eng") } -func (t Tags) Compilation() bool { return t.getBool("tcmp", "compilation") } -func (t Tags) TrackNumber() (int, int) { return t.getTuple("track", "tracknumber") } -func (t Tags) DiscNumber() (int, int) { return t.getTuple("disc", "discnumber") } +func (t Tags) Lyrics() string { + return t.getFirstTagValue("lyrics", "lyrics-eng", "unsynced_lyrics", "unsynced lyrics", "unsyncedlyrics") +} +func (t Tags) Compilation() bool { return t.getBool("tcmp", "compilation") } +func (t Tags) TrackNumber() (int, int) { return t.getTuple("track", "tracknumber") } +func (t Tags) DiscNumber() (int, int) { return t.getTuple("disc", "discnumber") } func (t Tags) DiscSubtitle() string { return t.getFirstTagValue("tsst", "discsubtitle", "setsubtitle") }