now-playing: 再生情報の取得に失敗したときのエラーハンドリングを追加 #21

Merged
usbharu merged 1 commits from now-playing into master 2024-03-19 10:35:26 +00:00
1 changed files with 3 additions and 1 deletions

View File

@ -48,7 +48,9 @@ func main() {
for {
playing, err := client.PlayerCurrentlyPlaying(ctx)
if err != nil {
log.Fatal(err)
log.Println(err)
time.Sleep(10 * time.Minute)
continue
}
if !playing.Playing {