(partial) Fix #742: add Date Added column

This commit is contained in:
zacaj
2025-11-11 03:36:30 +00:00
parent 360391e832
commit b0d918b93e
8 changed files with 49 additions and 10 deletions
@@ -435,6 +435,7 @@ func toTrack(ch *jellyfin.Song) *mediaprovider.Track {
}
lastPlayed, _ := time.Parse(time.RFC3339Nano, ch.UserData.LastPlayedDate)
dateAdded, _ := time.Parse(time.RFC3339Nano, ch.DateCreated)
t := &mediaprovider.Track{
ID: ch.Id,
@@ -454,6 +455,7 @@ func toTrack(ch *jellyfin.Song) *mediaprovider.Track {
Favorite: ch.UserData.IsFavorite,
PlayCount: ch.UserData.PlayCount,
LastPlayed: lastPlayed,
DateAdded: dateAdded,
}
if len(ch.MediaSources) > 0 {
t.FilePath = ch.MediaSources[0].Path
+1
View File
@@ -152,6 +152,7 @@ type Track struct {
SampleRate int
BitDepth int
Channels int
DateAdded time.Time
}
type ReplayGainInfo struct {
@@ -589,6 +589,7 @@ func toTrack(ch *subsonic.Child) *mediaprovider.Track {
Favorite: !ch.Starred.IsZero(),
PlayCount: int(ch.PlayCount),
LastPlayed: ch.Played,
DateAdded: ch.Created,
FilePath: ch.Path,
Size: ch.Size,
BitRate: ch.BitRate,