Uppercase acronyms (ISRC / JSPF)

This commit is contained in:
Philipp Wolfer 2023-11-23 08:26:45 +01:00
parent 409acccebe
commit 36cc41d05d
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
14 changed files with 28 additions and 28 deletions

View file

@ -68,7 +68,7 @@ func (b *SubsonicApiBackend) ExportLoves(oldestTimestamp time.Time, results chan
func (b *SubsonicApiBackend) filterSongs(songs []*subsonic.Child, oldestTimestamp time.Time) models.LovesList {
loves := make(models.LovesList, len(songs))
for i, song := range songs {
love := SongToLove(*song, b.client.User)
love := SongAsLove(*song, b.client.User)
if love.Created.Unix() > oldestTimestamp.Unix() {
loves[i] = love
}
@ -78,7 +78,7 @@ func (b *SubsonicApiBackend) filterSongs(songs []*subsonic.Child, oldestTimestam
return loves
}
func SongToLove(song subsonic.Child, username string) models.Love {
func SongAsLove(song subsonic.Child, username string) models.Love {
love := models.Love{
UserName: username,
Created: song.Starred,

View file

@ -46,7 +46,7 @@ func TestSongToLove(t *testing.T) {
DiscNumber: 1,
Track: 5,
}
love := subsonic.SongToLove(song, user)
love := subsonic.SongAsLove(song, user)
assert := assert.New(t)
assert.Equal(time.Unix(1699574369, 0).Unix(), love.Created.Unix())
assert.Equal(user, love.UserName)