Browse Source

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

boyska 2 năm trước cách đây
mục cha
commit
aa63315491
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  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()