mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-17 22:00:00 +00:00
4.7.3: ffmpeg should quit when download is abruptly cut off
This commit is contained in:
parent
64dad9ee70
commit
06d4d8a5b0
3 changed files with 8 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "cobalt",
|
"name": "cobalt",
|
||||||
"description": "save what you love",
|
"description": "save what you love",
|
||||||
"version": "4.7.2",
|
"version": "4.7.3",
|
||||||
"author": "wukko",
|
"author": "wukko",
|
||||||
"exports": "./src/cobalt.js",
|
"exports": "./src/cobalt.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"version": "4.7",
|
"version": "4.7",
|
||||||
"title": "we're better together! thank you for bug reports.",
|
"title": "we're better together! thank you for bug reports.",
|
||||||
"banner": "bettertogether.webp",
|
"banner": "bettertogether.webp",
|
||||||
"content": "this update includes a bunch of improvements, many of which were made thanks to the community :D\n\nservice-related improvements:\n*; private soundcloud links are now supported (#68);\n*; tiktok usernames with dots in them no longer confuse cobalt (#71);\n*; .ogg files no longer wrongfully include a video channel (#67);\n*; fixed an issue that caused cobalt to freak out when user attempted to download an audio from audio-only service with \"mute video\" option enabled.\n\nui improvements:\n*; popup padding has been evened out. popups are now able to fit in more information on scroll, especially on mobile;\n*; all buttons are now of even size and are displayed without any padding issues across all modern browsers and devices;\n*; checkbox is no longer crippled on ios;\n*; many explanation texts have been simplified to get rid of unnecessary bloat (no bullshit, remember?);\n*; moved tiktok section in video settings higher due to higher priority.\n\nstability improvements:\n*; ffmpeg process now actually quits upon finishing the render;\n*; fixed a memory leak that was caused by misconfigured stream information caching (#63).\n\ninternal improvements:\n*; requested streams are now stored in cache for 2 minutes instead of 1000 hours (yes, 1000 hours, i fucked up);\n*; cached data is now reused if user requests same content within 2 minutes;\n*; page render module is now even cleaner than before;\n*; proper support for bullet-points in loc strings.\n\nyou can suggest features or report bugs on <a class=\"text-backdrop\" href=\"{repo}\" target=\"_blank\">github</a> or <a class=\"text-backdrop\" href=\"https://twitter.com/justusecobalt\" target=\"_blank\">twitter</a>. both work just fine, use whichever you're more comfortable with.\n\nthank you for using cobalt, and thank you for reading this changelog.\n\nyou're amazing, keep it up :)"
|
"content": "this update includes a bunch of improvements, many of which were made thanks to the community :D\n\nservice-related improvements:\n*; private soundcloud links are now supported (#68);\n*; tiktok usernames with dots in them no longer confuse cobalt (#71);\n*; .ogg files no longer wrongfully include a video channel (#67);\n*; fixed an issue that caused cobalt to freak out when user attempted to download an audio from audio-only service with \"mute video\" option enabled.\n\nui improvements:\n*; popup padding has been evened out. popups are now able to fit in more information on scroll, especially on mobile;\n*; all buttons are now of even size and are displayed without any padding issues across all modern browsers and devices;\n*; checkbox is no longer crippled on ios;\n*; many explanation texts have been simplified to get rid of unnecessary bloat (no bullshit, remember?);\n*; moved tiktok section in video settings higher due to higher priority.\n\nstability improvements:\n*; ffmpeg process now should end upon finishing the render;\n*; ffmpeg should also quit when download is abruptly cut off;\n*; fixed a memory leak that was caused by misconfigured stream information caching (#63).\n\ninternal improvements:\n*; requested streams are now stored in cache for 2 minutes instead of 1000 hours (yes, 1000 hours, i fucked up);\n*; cached data is now reused if user requests same content within 2 minutes;\n*; page render module is now even cleaner than before;\n*; proper support for bullet-points in loc strings.\n\nyou can suggest features or report bugs on <a class=\"text-backdrop\" href=\"{repo}\" target=\"_blank\">github</a> or <a class=\"text-backdrop\" href=\"https://twitter.com/justusecobalt\" target=\"_blank\">twitter</a>. both work just fine, use whichever you're more comfortable with.\n\nthank you for using cobalt, and thank you for reading this changelog.\n\nyou're amazing, keep it up :)"
|
||||||
},
|
},
|
||||||
"history": [{
|
"history": [{
|
||||||
"version": "4.6",
|
"version": "4.6",
|
||||||
|
|
|
@ -49,6 +49,8 @@ export function streamLiveRender(streamInfo, res) {
|
||||||
res.setHeader('Content-Disposition', `attachment; filename="${streamInfo.filename}"`);
|
res.setHeader('Content-Disposition', `attachment; filename="${streamInfo.filename}"`);
|
||||||
ffmpegProcess.stdio[3].pipe(res);
|
ffmpegProcess.stdio[3].pipe(res);
|
||||||
ffmpegProcess.on('end', () => ffmpegProcess.kill());
|
ffmpegProcess.on('end', () => ffmpegProcess.kill());
|
||||||
|
res.on('finish', () => ffmpegProcess.kill());
|
||||||
|
res.on('close', () => ffmpegProcess.kill());
|
||||||
ffmpegProcess.on('error', (err) => {
|
ffmpegProcess.on('error', (err) => {
|
||||||
ffmpegProcess.kill();
|
ffmpegProcess.kill();
|
||||||
res.end();
|
res.end();
|
||||||
|
@ -90,6 +92,8 @@ export function streamAudioOnly(streamInfo, res) {
|
||||||
res.setHeader('Content-Disposition', `attachment; filename="${streamInfo.filename}.${streamInfo.audioFormat}"`);
|
res.setHeader('Content-Disposition', `attachment; filename="${streamInfo.filename}.${streamInfo.audioFormat}"`);
|
||||||
ffmpegProcess.stdio[3].pipe(res);
|
ffmpegProcess.stdio[3].pipe(res);
|
||||||
ffmpegProcess.on('end', () => ffmpegProcess.kill());
|
ffmpegProcess.on('end', () => ffmpegProcess.kill());
|
||||||
|
res.on('finish', () => ffmpegProcess.kill());
|
||||||
|
res.on('close', () => ffmpegProcess.kill());
|
||||||
ffmpegProcess.on('error', (err) => {
|
ffmpegProcess.on('error', (err) => {
|
||||||
ffmpegProcess.kill();
|
ffmpegProcess.kill();
|
||||||
res.end();
|
res.end();
|
||||||
|
@ -118,6 +122,8 @@ export function streamVideoOnly(streamInfo, res) {
|
||||||
res.setHeader('Content-Disposition', `attachment; filename="${streamInfo.filename.split('.')[0]}_mute.${format}"`);
|
res.setHeader('Content-Disposition', `attachment; filename="${streamInfo.filename.split('.')[0]}_mute.${format}"`);
|
||||||
ffmpegProcess.stdio[3].pipe(res);
|
ffmpegProcess.stdio[3].pipe(res);
|
||||||
ffmpegProcess.on('end', () => ffmpegProcess.kill());
|
ffmpegProcess.on('end', () => ffmpegProcess.kill());
|
||||||
|
res.on('finish', () => ffmpegProcess.kill());
|
||||||
|
res.on('close', () => ffmpegProcess.kill());
|
||||||
ffmpegProcess.on('error', (err) => {
|
ffmpegProcess.on('error', (err) => {
|
||||||
ffmpegProcess.kill();
|
ffmpegProcess.kill();
|
||||||
res.end();
|
res.end();
|
||||||
|
|
Loading…
Reference in a new issue