fix conversion

This commit is contained in:
nixo 2019-05-21 18:31:56 +02:00
parent c9ef5c95a9
commit c07dd34878
1 changed files with 3 additions and 1 deletions

View File

@ -519,7 +519,7 @@ function giveconverted(file, bitrate, format)
suffix = format
mime = suffix in keys(Mux.mimetypes) ? Mux.mimetypes[suffix] : suffix
headers["Content-Type"] = mime
headers["Content-Length"] = length(data)
headers["Content-Length"] = string(length(data))
return Dict(:body => data, :headers => headers)
end
@ -542,6 +542,8 @@ function stream(req::Dict)
isa(e, ArgumentError) && 0
@error e
end
# Ogg is not compativle with lower bitrates. Use something else?
bitrate = bitrate < 64 ? 64 : bitrate
format = get(query, "format", "oga")
songs = Beets.songs()