From 99a36aa4d012f4f75dd77511b5e96c526bff500c Mon Sep 17 00:00:00 2001 From: Erin Date: Fri, 2 Mar 2018 16:04:34 -0600 Subject: [PATCH] fix youtube search presence check --- nowplaying.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nowplaying.py b/nowplaying.py index a3cedbe..f24910f 100644 --- a/nowplaying.py +++ b/nowplaying.py @@ -52,7 +52,7 @@ class NowplayingBot(PineappleBot): # make a best-effort guess at the youtube link for this track yt_search = search_youtube(str(currently_playing), key=self.config.youtube_key) - if yt_search is not None: + if len(yt_search) > 0: yt_link = f"https://www.youtube.com/watch?v={yt_search[0]['id']}" else: yt_link = ':sparkler: no youtube link, sorry :sparkler:'