From 87ac2b3b763ce89f2f439b46795da0a996b8930c Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Thu, 29 Aug 2013 19:27:23 -0700 Subject: [PATCH] fixed Dtd issues on Linux. --- NzbDrone.Common/Services.cs | 3 --- .../IndexerTests/IntegrationTests/IndexerIntegrationTests.cs | 4 ++-- .../DataAugmentation/DailySeries/DailySeriesDataProxy.cs | 1 - NzbDrone.Core/Indexers/BasicRssParser.cs | 2 +- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/NzbDrone.Common/Services.cs b/NzbDrone.Common/Services.cs index bfa537901..0824c4735 100644 --- a/NzbDrone.Common/Services.cs +++ b/NzbDrone.Common/Services.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace NzbDrone.Common { diff --git a/NzbDrone.Core.Test/IndexerTests/IntegrationTests/IndexerIntegrationTests.cs b/NzbDrone.Core.Test/IndexerTests/IntegrationTests/IndexerIntegrationTests.cs index d052503a9..813c1a45f 100644 --- a/NzbDrone.Core.Test/IndexerTests/IntegrationTests/IndexerIntegrationTests.cs +++ b/NzbDrone.Core.Test/IndexerTests/IntegrationTests/IndexerIntegrationTests.cs @@ -44,17 +44,17 @@ namespace NzbDrone.Core.Test.IndexerTests.IntegrationTests [Test] - [Explicit("needs newznab api key")] public void nzbsorg_rss() { var indexer = new Newznab(); indexer.Settings = new NewznabSettings { - ApiKey = "", + ApiKey = "64d61d3cfd4b75e51d01cbc7c6a78275", Url = "http://nzbs.org" }; indexer.InstanceDefinition = new IndexerDefinition(); + indexer.InstanceDefinition.Name = "nzbs.org"; var result = Subject.FetchRss(indexer); diff --git a/NzbDrone.Core/DataAugmentation/DailySeries/DailySeriesDataProxy.cs b/NzbDrone.Core/DataAugmentation/DailySeries/DailySeriesDataProxy.cs index 239afecc8..f59ff9ee9 100644 --- a/NzbDrone.Core/DataAugmentation/DailySeries/DailySeriesDataProxy.cs +++ b/NzbDrone.Core/DataAugmentation/DailySeries/DailySeriesDataProxy.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using NLog; using NzbDrone.Common; using NzbDrone.Common.Serializer; -using NzbDrone.Core.Configuration; namespace NzbDrone.Core.DataAugmentation.DailySeries { diff --git a/NzbDrone.Core/Indexers/BasicRssParser.cs b/NzbDrone.Core/Indexers/BasicRssParser.cs index 17963956c..84c61f296 100644 --- a/NzbDrone.Core/Indexers/BasicRssParser.cs +++ b/NzbDrone.Core/Indexers/BasicRssParser.cs @@ -27,7 +27,7 @@ namespace NzbDrone.Core.Indexers public IEnumerable Process(string xml, string url) { - using (var xmlTextReader = new XmlTextReader(new StringReader(xml)) { DtdProcessing = DtdProcessing.Ignore }) + using (var xmlTextReader = XmlReader.Create(new StringReader(xml), new XmlReaderSettings { ProhibitDtd = false, IgnoreComments = true })) { var document = XDocument.Load(xmlTextReader); var items = document.Descendants("item");