Closed daniel-j closed 6 years ago
Temporary solution:
def track_ended(time, m)
if m["temporary"] == "true" and m["filename"] != "" then
system("rm "^quote(m["filename"]))
end
end
source = on_end(delay=0., track_ended, source)
Note: you may have to add temporary=true to your annotate!
Hi,
This part of the code was extensively worked on in 1.3.0
. I'm gonna close this issue here, please reopen or submit a new one if you still have issues with recent versions.
Still happening in 2.2.1
2023/11/05 13:25:06 [decoder.ffmpeg:3] Decoded content-type for "/tmp/liq-process78b34a.webm": {audio=pcm(stereo)}
2023/11/05 13:25:06 [decoder.taglib:2] Error while decoding file tags: Taglib.File.Invalid_file
2023/11/05 13:28:37 [decoder:2] Decoding "/tmp/liq-processcc673b.webm" ended: Ffmpeg_decoder.End_of_file.
2023/11/05 13:28:38 [s:3] Prepared "/tmp/liq-process78b34a.webm" (RID 3).
2023/11/05 13:28:38 [cross:3] Analysis: -10.492024dB / -21.447270dB (2.97s / 2.99s)
2023/11/05 13:28:38 [crossfade:3] Simple transition: crossed, fade-in, fade-out.
2023/11/05 13:28:38 [source.8:3] Content type is {audio=pcm(stereo)}.
2023/11/05 13:28:38 [audio.add.2:3] Content type is {audio=pcm(stereo)}.
2023/11/05 13:28:38 [fade_in.4:3] Content type is {audio=pcm(stereo)}.
2023/11/05 13:28:38 [fade_in.3:3] Content type is {audio=pcm(stereo)}.
2023/11/05 13:28:38 [on_track.8:3] Content type is {audio=pcm(stereo)}.
2023/11/05 13:28:38 [on_metadata.4:3] Content type is {audio=pcm(stereo)}.
2023/11/05 13:28:38 [on_track.7:3] Content type is {audio=pcm(stereo)}.
2023/11/05 13:28:38 [cross_after.2:3] Content type is {audio=pcm(stereo)}.
2023/11/05 13:28:38 [buffer.4:3] Content type is {audio=pcm(stereo)}.
2023/11/05 13:28:38 [fade_out.4:3] Content type is {audio=pcm(stereo)}.
2023/11/05 13:28:38 [fade_out.3:3] Content type is {audio=pcm(stereo)}.
2023/11/05 13:28:38 [on_end.2:3] Content type is {audio=pcm(stereo)}.
2023/11/05 13:28:38 [on_track.6:3] Content type is {audio=pcm(stereo)}.
2023/11/05 13:28:38 [on_metadata.3:3] Content type is {audio=pcm(stereo)}.
2023/11/05 13:28:38 [on_track.5:3] Content type is {audio=pcm(stereo)}.
2023/11/05 13:28:38 [cross_before.2:3] Content type is {audio=pcm(stereo)}.
2023/11/05 13:28:38 [buffer.3:3] Content type is {audio=pcm(stereo)}.
2023/11/05 13:28:38 [request:2] Unlink failed: "Unix.Unix_error(Unix.ENOENT, \"unlink\", \"annotate:comment=\\\"\\240\\159\\142\\182 Now Playing @ \\\\n\\\\t Original Url: https://www.youtube.com/watch?v=DPoW19TUfg8\\\":youtube-dl:https://www.youtube.com/watch?v=DPoW19TUfg8\")"
My protocol definition:
Example response from scripts/youtube:
Decoder accepts it, plays the songs but fails to delete the file
Yes, it tries to delete what originally was requested (annotate + url) and not filename.
Source of the error (Unix.unlink): https://github.com/savonet/liquidsoap/blob/master/src/request.ml#L266