Corregge delete path MediaMTX: usa HTTP DELETE.
Il POST restituiva 404 silenzioso e lasciava path alwaysAvailable attivi dopo fine diretta. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -40,8 +40,13 @@ module Mediamtx
|
|||||||
end
|
end
|
||||||
|
|
||||||
def delete_path_name(path_name)
|
def delete_path_name(path_name)
|
||||||
@conn.post("/v3/config/paths/delete/#{CGI.escape(path_name)}")
|
response = @conn.delete("/v3/config/paths/delete/#{CGI.escape(path_name)}")
|
||||||
|
unless response.success?
|
||||||
|
err = response.body.is_a?(Hash) ? response.body["error"] : response.body
|
||||||
|
raise Error, "MediaMTX path delete failed: #{response.status} #{err}"
|
||||||
|
end
|
||||||
forget_always_available(path_name)
|
forget_always_available(path_name)
|
||||||
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_path_recording(session, enabled:)
|
def set_path_recording(session, enabled:)
|
||||||
|
|||||||
Reference in New Issue
Block a user