mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-05-10 04:01:37 +02:00
Bump dependencies
This commit is contained in:
parent
e927334db6
commit
cd4b42a8f6
5 changed files with 852 additions and 811 deletions
|
@ -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
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue