فهرست منبع

FIX: don't fail if there is no show Now

boyska 2 سال پیش
والد
کامیت
aa63315491
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      player.js

+ 5 - 1
player.js

@@ -64,11 +64,15 @@ async function main() {
         urls = urls.map(httpsIze)
         player.changeStreamURLs(urls)
         document.querySelector('#radio-name').textContent = radio.getName()
-        const show = radio.getShowAtTime()
         let showName = ''
+        try {
+        const show = radio.getShowAtTime()
         if (show !== null) {
             showName = show.getName()
         }
+        } catch {
+            true;
+        }
         document.querySelector('#program-name').textContent = showName
 
         setupProgrammi()