now-playing: 再生情報の取得に失敗したときのエラーハンドリングを追加
This commit is contained in:
+3
-1
@@ -48,7 +48,9 @@ func main() {
|
|||||||
for {
|
for {
|
||||||
playing, err := client.PlayerCurrentlyPlaying(ctx)
|
playing, err := client.PlayerCurrentlyPlaying(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Println(err)
|
||||||
|
time.Sleep(10 * time.Minute)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if !playing.Playing {
|
if !playing.Playing {
|
||||||
|
|||||||
Reference in New Issue
Block a user