mirror of
https://git.sr.ht/~phw/scotty
synced 2025-05-02 14:47:04 +02:00
Uppercase acronyms (ISRC / JSPF)
This commit is contained in:
parent
409acccebe
commit
36cc41d05d
14 changed files with 28 additions and 28 deletions
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue