From fcc8d8881aa338c5011f1173ad2d16efa13591c3 Mon Sep 17 00:00:00 2001 From: MarcoCoreDuo <90222533+MarcoCoreDuo@users.noreply.github.com> Date: Thu, 18 Jul 2024 06:32:16 +0200 Subject: Switch to Distube's ytdl-core fork (resolves playback issue) (#1042) --- src/services/player.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/services/player.ts b/src/services/player.ts index 0da80a4..5e284a6 100644 --- a/src/services/player.ts +++ b/src/services/player.ts @@ -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); -- cgit v1.2.3