private static IOpenSubtitlesProxy CreateProxy(OpenSubtitlesSettings settings)
 {
     var proxy = XmlRpcProxyGen.Create<IOpenSubtitlesProxy>();
     proxy.Timeout = settings.Timeout;
     proxy.Url = settings.Url;
     return proxy;
 }
        public OpenSubtitlesDownloader(IApplicationSettings applicationSettings, IEpisodeParser episodeParser)
        {
            _episodeParser = episodeParser;
            var settings = new OpenSubtitlesSettings
            {
                Language = "en",
                Username = "",
                Password = "",
                Url = "http://api.opensubtitles.org/xml-rpc",
                UserAgent = applicationSettings.GetSetting("OpenSubtitlesKey"),
                Timeout = 60000
            };

            var proxy = CreateProxy(settings);
            _api = new OpenSubtitlesApi(settings, proxy);
        }
 public OpenSubtitlesApi(OpenSubtitlesSettings settings, IOpenSubtitlesProxy proxy)
 {
     _settings = settings;
     _proxy = proxy;
 }