Esempio n. 1
0
        private string LoginToOpenSubtitles()
        {
            if (proxy == null)
            {
                proxy = XmlRpcProxyGen.Create <IOpenSubtitles>();
            }

            var loginInfo = proxy.Login("", "", "en", "SubtitleProvider for Media Browser v0.2");

            return((string)loginInfo["token"]);
        }
Esempio n. 2
0
        public bool Login(string username, string password, string language, string userAgent)
        {
            XmlRpcStruct responseStruct = proxy.Login(username, password, language, userAgent);

            this.LastResponseCode = (string)responseStruct["status"];
            this.LastResponseTime = Convert.ToDouble(responseStruct["seconds"]);

            if ((!String.IsNullOrEmpty(this.LastResponseCode)) && this.LastResponseCode.Equals("200 OK"))
            {
                this.Token = (string)responseStruct["token"];

                return(true);
            }

            return(false);
        }