Exemplo n.º 1
0
        // tar in två stängar, en för vilken podcast och en annan för vilket avsnitt som nman vill ladda ner.
        public void Download(string e, string f)
        {
            var     xmldoc = xml.ReadXml(e);
            XmlNode nodeList;
            XmlNode root = xmldoc.DocumentElement;

            nodeList = root.SelectSingleNode("descendant::item[title='" + f + "']/enclosure/@url");
            var link   = nodeList.InnerText;
            var folder = CreateFolders.CreateMp3Folder(e);

            client.DownloadFileAsync(new Uri(link), folder + @"\" + f + ".mp3");
            client.DownloadFileCompleted += new AsyncCompletedEventHandler(client_DownloadFileCompleted);
        }
Exemplo n.º 2
0
        public void Podcastlink(string Url, string cat, string interval, string nextupdate)
        {
            XmlHandler  xmlConection = new XmlHandler();
            XmlDocument podcastfeed  = FetchXml.DownloadXml(Url);
            var         name         = FeedName(podcastfeed);

            Podcastlink(name);
            var folder = CreateFolders.CreateXmlFolder();

            podcastfeed.Save(folder + @"\" + name + ".xml");
            if (File.Exists("xml.xml"))
            {
                xmlConection.writeToXml(name, Url, cat, interval, nextupdate, "No");
            }
            else
            {
                XmlHandler.createXml();
                xmlConection.writeToXml(name, Url, cat, interval, nextupdate, "No");
            }
        }