mirror of
https://github.com/BluemediaGER/muse.git
synced 2024-11-12 21:05:29 +01:00
Bump dependencies
This commit is contained in:
parent
e927334db6
commit
cd4b42a8f6
38
package.json
38
package.json
|
@ -29,21 +29,21 @@
|
|||
"@types/debug": "^4.1.5",
|
||||
"@types/fluent-ffmpeg": "^2.1.14",
|
||||
"@types/fs-capacitor": "^2.0.0",
|
||||
"@types/node": "^14.0.6",
|
||||
"@types/node": "^14.6.0",
|
||||
"@types/node-emoji": "^1.8.1",
|
||||
"@types/spotify-web-api-node": "^4.0.1",
|
||||
"@types/validator": "^13.0.0",
|
||||
"@types/ws": "^7.2.4",
|
||||
"@typescript-eslint/eslint-plugin": "^3.0.2",
|
||||
"@typescript-eslint/parser": "^3.0.2",
|
||||
"eslint": "^7.1.0",
|
||||
"eslint-config-xo": "^0.29.1",
|
||||
"eslint-config-xo-typescript": "^0.29.0",
|
||||
"@types/validator": "^13.1.0",
|
||||
"@types/ws": "^7.2.6",
|
||||
"@typescript-eslint/eslint-plugin": "^3.10.0",
|
||||
"@typescript-eslint/parser": "^3.10.0",
|
||||
"eslint": "^7.7.0",
|
||||
"eslint-config-xo": "^0.32.1",
|
||||
"eslint-config-xo-typescript": "^0.32.0",
|
||||
"husky": "^4.2.5",
|
||||
"nodemon": "^2.0.4",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"ts-node": "^8.10.2",
|
||||
"typescript": "^3.9.3"
|
||||
"ts-node": "^9.0.0",
|
||||
"typescript": "^4.0.2"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
|
@ -70,27 +70,27 @@
|
|||
"@discordjs/opus": "^0.3.2",
|
||||
"array-shuffle": "^1.0.1",
|
||||
"debug": "^4.1.1",
|
||||
"delay": "^4.3.0",
|
||||
"discord.js": "^12.2.0",
|
||||
"delay": "^4.4.0",
|
||||
"discord.js": "^12.3.1",
|
||||
"dotenv": "^8.2.0",
|
||||
"fluent-ffmpeg": "^2.1.2",
|
||||
"fs-capacitor": "^6.2.0",
|
||||
"get-youtube-id": "^1.0.1",
|
||||
"got": "^11.1.4",
|
||||
"got": "^11.5.2",
|
||||
"hasha": "^5.2.0",
|
||||
"inversify": "^5.0.1",
|
||||
"iso8601-duration": "^1.2.0",
|
||||
"make-dir": "^3.1.0",
|
||||
"node-emoji": "^1.10.0",
|
||||
"p-limit": "^2.3.0",
|
||||
"p-limit": "^3.0.2",
|
||||
"sequelize": "^5.21.11",
|
||||
"sequelize-typescript": "^1.1.0",
|
||||
"spotify-uri": "^2.0.0",
|
||||
"spotify-uri": "^2.1.0",
|
||||
"spotify-web-api-node": "^4.0.0",
|
||||
"sqlite3": "^4.2.0",
|
||||
"sqlite3": "^5.0.0",
|
||||
"unique-random-array": "^2.0.0",
|
||||
"youtube.ts": "^0.1.3",
|
||||
"ytdl-core": "^2.1.5",
|
||||
"ytsr": "^0.1.14"
|
||||
"youtube.ts": "^0.1.6",
|
||||
"ytdl-core": "^3.2.2",
|
||||
"ytsr": "^0.1.21"
|
||||
}
|
||||
}
|
||||
|
|
16
src/packages.d.ts
vendored
16
src/packages.d.ts
vendored
|
@ -1,19 +1,3 @@
|
|||
declare module 'ytsr' {
|
||||
interface VideoResult {
|
||||
title: string;
|
||||
duration: string;
|
||||
link: string;
|
||||
live: boolean;
|
||||
type: string;
|
||||
}
|
||||
|
||||
interface SearchResult {
|
||||
items: VideoResult[];
|
||||
}
|
||||
|
||||
export default function (search: string, options: Record<string, unknown>): Promise<SearchResult>;
|
||||
}
|
||||
|
||||
declare module 'array-shuffle' {
|
||||
export default function <T>(arr: T[]): T[];
|
||||
}
|
||||
|
|
|
@ -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…
Reference in a new issue