This commit is contained in:
nixo 2019-05-21 18:23:33 +02:00
parent 8cd1b0b211
commit c9ef5c95a9
1 changed files with 3 additions and 2 deletions

View File

@ -314,7 +314,7 @@ function search3(req; dl = println)
if req[:user][:user].upload && length(q) > 2 && q[end-1:end] == "!t" if req[:user][:user].upload && length(q) > 2 && q[end-1:end] == "!t"
@info "This is the special torrent mode!" @info "This is the special torrent mode!"
list = dl(string(strip(q[1:end-2]))) list = dl(string(strip(q[1:end-2])))
list == nothing return @subsonic(nothing) list == nothing && return @subsonic(nothing)
(xdoc, xroot) = subsonic() (xdoc, xroot) = subsonic()
results = new_child(xroot, "searchResult3") results = new_child(xroot, "searchResult3")
@ -548,7 +548,8 @@ function stream(req::Dict)
m = findfirst(x -> (x.uuid == id), songs) m = findfirst(x -> (x.uuid == id), songs)
m === nothing && return not_found("id") m === nothing && return not_found("id")
output = (bitrate == 0) ? sendfile(songs[m].path) : giveconverted(songs[m].path, bitrate, format) output = (bitrate == 0) ? sendfile(songs[m].path) :
giveconverted(songs[m].path, bitrate, format)
return output return output
end end