Closed KTSnowy closed 3 years ago
Can't seem to find what's causing this, since the video duration doesn't seem to show up on the search results embed and it doesn't happen with every input.
Commenting out everything related to duration
in the Video.ts file seems to fix this
Ah, my bad. Duration is actually planned to be released in v4 but was postponed to v5, and I don't double-check the durationToMS function.
This happens because the durationToMS function fails to parse YouTube live videos, and the ytsr module is reporting null because live videos don't have live duration yet, unlike YouTubeAPI.
This also doesn't happen on v5 because there is no code for parsing duration yet
This issue is fixed in #662
Fixed in Version 4.42.6
When using the play command to search for a song ("Jukebox play lofi" for example), some searches return:
[error]: TypeError: Cannot read property 'split' of null
Which seems to come from the
durationToMS(duration)
function in the Video.ts file:const args = duration.split(":");