Switch to Distube's ytdl-core fork (resolves playback issue) (#1042)

This commit is contained in:
MarcoCoreDuo 2024-07-18 06:32:16 +02:00 committed by GitHub
parent 29b61cc0b6
commit fcc8d8881a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 100 additions and 195 deletions

View file

@ -1,7 +1,7 @@
import {VoiceChannel, Snowflake} from 'discord.js';
import {Readable} from 'stream';
import hasha from 'hasha';
import ytdl, {videoFormat} from 'ytdl-core';
import ytdl, {videoFormat} from '@distube/ytdl-core';
import {WriteStream} from 'fs-capacitor';
import ffmpeg from 'fluent-ffmpeg';
import shuffle from 'array-shuffle';
@ -280,8 +280,8 @@ export default class {
if (this.getCurrent() && this.status !== STATUS.PAUSED) {
await this.play();
} else {
this.audioPlayer?.stop(true);
this.status = STATUS.IDLE;
this.audioPlayer?.stop(true);
const settings = await getGuildSettings(this.guildId);