Added logic to catch empty playlist edgecast
This commit is contained in:
parent
34e662c1da
commit
b5a8fdd593
1 changed files with 6 additions and 0 deletions
|
|
@ -925,6 +925,12 @@ class playlistHandler{
|
|||
return;
|
||||
}
|
||||
|
||||
//If we found an empy playlist
|
||||
if(foundPlaylist.media.length <= 0){
|
||||
//ignore it!
|
||||
return;
|
||||
}
|
||||
|
||||
//Pick a random video ID based on the playlist's length
|
||||
const foundID = Math.round(Math.random() * (foundPlaylist.media.length - 1));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue