Closed thenerdoflight closed 2 years ago
Song object is undefined in certain cases after a failed ytsr search due to the hardcoded limit of 1. There is no song object in position 0 if the first search result is a movie. Expanding that limit to 3 and forcing a while loop on it fixes it but adds a delay between song query and play.
Bug Description Util.best may fail a search and the song object is undefined. Queue.play does not check if song object is undefined and will throw and error when Song.data is accessed.
Expected Result Should instead throw a DMP error if this happens. Nor should the code access an undefined property.
Attachments
Can reproduce by searching "lucky" in ytsr and getting the first result