Website:
easydarwin.org
Problem:
HLS cannot save the list, the solution is given: http://www.pfeng.org/archives/857
But it's not very useful. The author gives the principle. Wrote one of his own
Solution: Core Code:
namespaceexecapp{/// <summary> ///Save a list of Easydarwin in HLS/// </summary> Public classHlssavehandler:icommandhandler { Public stringHost {Get;Set; } Public stringName {Get;Set; } Public stringURL {Get;Set; } PublicHlssavehandler (Cmdargs args) {args. Tomodel ( This); } Public stringDo () {if( This. Name.hasvalue () = =false) { return "Please provide the Name parameter"; } if( This. Url.hasvalue () = =false) { return "Please provide URL parameters"; } varSSID =""; Mynet.httppost ( This. Host +"/login.html", o ={o.headers["Cookies"] ="language0=0"; O.contenttype="application/x-www-form-urlencoded"; return "Name=admin&password=admin"; }, O= { if(O.statuscode! = System.Net.HttpStatusCode.Redirect)return; SSID= o.headers["Set-cookie"]. Asstring (). Mysplit (';'). First (); }); if(SSID.) HasValue () = =false)return "Logon Failure"; Mynet.httppost ( This. Host +"/api/addhlslist", o ={O.contenttype="content-type:application/x-www-form-urlencoded; Charset=utf-8"; o.headers["Cookies"] ="language0=0;"+SSID; return string. Format (@"n1={0}&n2={1}&n3=0", This. Name, Httputility.urlencode ( This. URL)); }); return ""; } }}
Call:
Bin\debug\execapp-hlssave-host "http://localhost:8088"-name Ab-url "Rtsp://admin:[email protected]"
You can write a bat and loop the call.
Program: Http://files.cnblogs.com/files/newsea/ExecApp.rar
Easydarwin Unable to save HLS list solution