A fork of https://github.com/teal-fm/piper

changes

+7 -2
+2
service/playingnow/playingnow.go
··· 158 } 159 160 // Update the record 161 input := atproto.RepoPutRecord_Input{ 162 Collection: "fm.teal.alpha.actor.status", 163 Repo: sess.DID,
··· 158 } 159 160 // Update the record 161 + //TODO this is failing with InvalidSwap: Record was at "prevouis cid" 162 + //2025/09/22 08:03:29 spotify: Updated! 163 input := atproto.RepoPutRecord_Input{ 164 Collection: "fm.teal.alpha.actor.status", 165 Repo: sess.DID,
+5 -2
service/spotify/spotify.go
··· 538 } `json:"external_urls"` 539 DurationMs int `json:"duration_ms"` 540 } `json:"item"` 541 - ProgressMS int `json:"progress_ms"` 542 } 543 544 err = json.Unmarshal(bodyBytes, &response) // Use bodyBytes here 545 if err != nil { 546 return nil, fmt.Errorf("failed to unmarshal spotify response: %w", err) 547 } 548 - 549 var artists []models.Artist 550 for _, artist := range response.Item.Artists { 551 artists = append(artists, models.Artist{
··· 538 } `json:"external_urls"` 539 DurationMs int `json:"duration_ms"` 540 } `json:"item"` 541 + ProgressMS int `json:"progress_ms"` 542 + IsPlaying bool `json:"is_playing"` 543 } 544 545 err = json.Unmarshal(bodyBytes, &response) // Use bodyBytes here 546 if err != nil { 547 return nil, fmt.Errorf("failed to unmarshal spotify response: %w", err) 548 } 549 + if response.IsPlaying == false { 550 + return nil, nil 551 + } 552 var artists []models.Artist 553 for _, artist := range response.Item.Artists { 554 artists = append(artists, models.Artist{