From 7a73457e53cb1545368fb02241f91beb4ff93962 Mon Sep 17 00:00:00 2001 From: nixo Date: Tue, 21 May 2019 19:40:34 +0200 Subject: [PATCH] revert again --- JlSonic/api.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/JlSonic/api.jl b/JlSonic/api.jl index e05cdad..3100612 100644 --- a/JlSonic/api.jl +++ b/JlSonic/api.jl @@ -520,9 +520,9 @@ function giveconverted(file, bitrate, format) mime = suffix in keys(Mux.mimetypes) ? Mux.mimetypes[suffix] : "application/octet-stream" headers["Content-Type"] = mime - # data = take!(iodata) - # headers["Content-Length"] = string(length(data)) - return Dict(:body => iodata, + data = take!(iodata) + headers["Content-Length"] = string(length(data)) + return Dict(:body => data, :headers => headers, :file => join([split(basename(file), '.')[1:end-1], ".oga"],"")) @@ -532,7 +532,7 @@ function convert(infile; bitrate = 64, format = "oga") global ffmpeg_threads io = IOBuffer() p = run(pipeline(`ffmpeg -i $infile -y -c:a libvorbis -b:a $(bitrate)k -threads $(ffmpeg_threads) -f $format pipe:1`, - stderr=devnull, stdout=io), wait = false) + stderr=devnull, stdout=io), wait = true) io end