diff options
| author | RblSb <msrblsb@gmail.com> | 2025-01-24 08:42:34 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2025-01-24 19:37:02 +0300 |
| commit | 6ead98595d71afba9d11d3300756b46f18fd6bda (patch) | |
| tree | d087094f9a124a31adad290a5040a8f7d4902186 /src/server/Cache.hx | |
| parent | a843ae530b07b92fc7341754b4722cdcb8dfb831 (diff) | |
Add server pause when leader disconnects
Diffstat (limited to 'src/server/Cache.hx')
| -rw-r--r-- | src/server/Cache.hx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/Cache.hx b/src/server/Cache.hx index 8681ea2..450a893 100644 --- a/src/server/Cache.hx +++ b/src/server/Cache.hx @@ -61,8 +61,8 @@ class Cache { } final ytdl:Dynamic = untyped require("@distube/ytdl-core"); log(client, 'Caching $url to $outName...'); - final opts = {playerClients: ["IOS", "WEB_CREATOR"]}; - final promise:Promise<YouTubeVideoInfo> = ytdl.getInfo(url, opts); + // final opts = {playerClients: ["IOS", "WEB_CREATOR"]}; + final promise:Promise<YouTubeVideoInfo> = ytdl.getInfo(url); promise.then(info -> { // trace(info.formats.filter(item -> item.audioCodec != null)); trace('Get info with ${info.formats.length} formats'); @@ -85,14 +85,14 @@ class Cache { final dlVideo:Readable<Dynamic> = ytdl(url, { format: videoFormat, - playerClients: opts.playerClients + // playerClients: opts.playerClients }); dlVideo.pipe(Fs.createWriteStream('$cacheDir/input-video')); dlVideo.on("error", err -> log(client, "Error during video download: " + err)); final dlAudio:Readable<Dynamic> = ytdl(url, { format: audioFormat, - playerClients: opts.playerClients + // playerClients: opts.playerClients }); dlAudio.pipe(Fs.createWriteStream('$cacheDir/input-audio')); dlAudio.on("error", err -> log(client, "Error during audio download: " + err)); |
