feat: support track level year tags (#661)

* [ PR Year @ Track-level ] This resolves issue #549

* Update db/migrations.go

Co-authored-by: Senan Kelly <senan@senan.xyz>

* [ PR #661 ] Fixes proposed by Sentriz (file indentation, simpler call to functions)

* [ PR #661 ] Fix File indentation for construct_by_folder

* [ PR #661 ] Set known tracks year field to their parent (album) year value ; until next deep scan.

* [ PR #661 ] Fix database field names in sql query

* Update db/migrations.go

Co-authored-by: Senan Kelly <senan@senan.xyz>

* Update db/migrations.go

Co-authored-by: Senan Kelly <senan@senan.xyz>

---------

Co-authored-by: Senan Kelly <senan@senan.xyz>
This commit is contained in:
Kynn | Cherryblue
2026-04-26 03:00:49 +02:00
committed by yaemiku
co-authored by Senan Kelly
parent d42ce531c6
commit e4a07750e4
5 changed files with 24 additions and 2 deletions

No files matched your search

@@ -79,13 +79,13 @@ func NewTCTrackByFolder(t *db.Track, parent *db.Album) *TrackChild {
),
ParentID: parent.SID(),
Duration: t.Length,
Year: parent.TagYear,
Bitrate: t.Bitrate,
IsDir: false,
Type: "music",
MusicBrainzID: t.TagBrainzID,
CreatedAt: t.CreatedAt,
AverageRating: formatRating(t.AverageRating),
Year: t.TagYear,
}
if trCh.Title == "" {
trCh.Title = t.Filename
@@ -97,9 +97,9 @@ func NewTrackByTags(t *db.Track, album *db.Album) *TrackChild {
DiscNumber: t.TagDiscNumber,
Type: "music",
MusicBrainzID: t.TagBrainzID,
Year: album.TagYear,
AverageRating: formatRating(t.AverageRating),
TranscodeMeta: TranscodeMeta{},
Year: t.TagYear,
}
switch {