Bump dependencies

This commit is contained in:
Max Isom 2020-08-24 14:53:18 -05:00
parent e927334db6
commit cd4b42a8f6
No known key found for this signature in database
GPG key ID: 25C9B1A7F6798880
5 changed files with 852 additions and 811 deletions

View file

@ -188,14 +188,14 @@ export default class {
const {items} = await ytsr(`"${track.name}" "${track.artists[0].name}" offical`, {limit: 5});
const video = items.find(item => item.type === 'video');
if (!video) {
if (!video || video.type !== 'video') {
throw new Error('No video found for query.');
}
return {
title: video.title,
artist: track.artists[0].name,
length: parseTime(video.duration),
length: video.duration ? parseTime(video.duration) : 0,
url: video.link,
playlist,
isLive: video.live

View file

@ -338,7 +338,7 @@ export default class {
// Don't cache livestreams or long videos
const MAX_CACHE_LENGTH_SECONDS = 30 * 60; // 30 minutes
shouldCacheVideo = !info.player_response.videoDetails.isLiveContent && parseInt(info.length_seconds, 10) < MAX_CACHE_LENGTH_SECONDS && !options.seek;
shouldCacheVideo = !info.player_response.videoDetails.isLiveContent && parseInt(info.videoDetails.lengthSeconds, 10) < MAX_CACHE_LENGTH_SECONDS && !options.seek;
ffmpegInputOptions.push(...[
'-reconnect',