diff --git a/IISExpress/AppServer/applicationhost.config b/IISExpress/AppServer/applicationhost.config
index 8572e13c6..5f57e13ec 100644
--- a/IISExpress/AppServer/applicationhost.config
+++ b/IISExpress/AppServer/applicationhost.config
@@ -145,7 +145,7 @@
-
+
diff --git a/NzbDrone.Core.Test/IndexerProviderTest.cs b/NzbDrone.Core.Test/IndexerProviderTest.cs
index 11e7639f7..a2f6723ae 100644
--- a/NzbDrone.Core.Test/IndexerProviderTest.cs
+++ b/NzbDrone.Core.Test/IndexerProviderTest.cs
@@ -69,8 +69,8 @@ namespace NzbDrone.Core.Test
public class MockIndexerProvider : IndexerProviderBase
{
- public MockIndexerProvider(SeriesProvider seriesProvider, SeasonProvider seasonProvider, EpisodeProvider episodeProvider, ConfigProvider configProvider, HttpProvider httpProvider, IndexerProvider indexerProvider, HistoryProvider historyProvider)
- : base(seriesProvider, seasonProvider, episodeProvider, configProvider, httpProvider, indexerProvider, historyProvider)
+ public MockIndexerProvider(SeriesProvider seriesProvider, SeasonProvider seasonProvider, EpisodeProvider episodeProvider, ConfigProvider configProvider, HttpProvider httpProvider, IndexerProvider indexerProvider, HistoryProvider historyProvider, SabProvider sabProvider)
+ : base(seriesProvider, seasonProvider, episodeProvider, configProvider, httpProvider, indexerProvider, historyProvider, sabProvider)
{
}
diff --git a/NzbDrone.Core/Providers/Indexer/IndexerProviderBase.cs b/NzbDrone.Core/Providers/Indexer/IndexerProviderBase.cs
index f67c0a4cf..59835a18d 100644
--- a/NzbDrone.Core/Providers/Indexer/IndexerProviderBase.cs
+++ b/NzbDrone.Core/Providers/Indexer/IndexerProviderBase.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using System.IO;
using System.ServiceModel.Syndication;
using NLog;
@@ -18,11 +19,12 @@ namespace NzbDrone.Core.Providers.Indexer
private readonly HistoryProvider _historyProvider;
protected readonly SeasonProvider _seasonProvider;
protected readonly SeriesProvider _seriesProvider;
-
+ protected readonly SabProvider _sabProvider;
protected IndexerProviderBase(SeriesProvider seriesProvider, SeasonProvider seasonProvider,
EpisodeProvider episodeProvider, ConfigProvider configProvider,
- HttpProvider httpProvider, IndexerProvider indexerProvider, HistoryProvider historyProvider)
+ HttpProvider httpProvider, IndexerProvider indexerProvider,
+ HistoryProvider historyProvider, SabProvider sabProvider)
{
_seriesProvider = seriesProvider;
_seasonProvider = seasonProvider;
@@ -31,6 +33,7 @@ namespace NzbDrone.Core.Providers.Indexer
_httpProvider = httpProvider;
_indexerProvider = indexerProvider;
_historyProvider = historyProvider;
+ _sabProvider = sabProvider;
_logger = LogManager.GetLogger(GetType().ToString());
}
@@ -123,25 +126,33 @@ namespace NzbDrone.Core.Providers.Indexer
var episodes = _episodeProvider.GetEpisodeByParseResult(parseResult);
+ if (InHistory(episodes, parseResult, feedItem))
+ {
+ return;
+ }
+
+ var sabTitle = _sabProvider.GetSabTitle(parseResult);
+
+ if (_sabProvider.IsInQueue(sabTitle))
+ {
+ return;
+ }
+
+ if (!_sabProvider.AddByUrl(NzbDownloadUrl(feedItem), sabTitle))
+ {
+ return;
+ }
+
foreach (var episode in episodes)
{
- if (_historyProvider.Exists(episode.EpisodeId, parseResult.Quality, parseResult.Proper))
+ _historyProvider.Add(new History
{
- _logger.Debug("Episode in history: {0}", feedItem.Title.Text);
- }
- else
- {
- //TODO: Add episode to sab
-
- _historyProvider.Add(new History
- {
- Date = DateTime.Now,
- EpisodeId = episode.EpisodeId,
- IsProper = parseResult.Proper,
- NzbTitle = feedItem.Title.Text,
- Quality = parseResult.Quality
- });
- }
+ Date = DateTime.Now,
+ EpisodeId = episode.EpisodeId,
+ IsProper = parseResult.Proper,
+ NzbTitle = feedItem.Title.Text,
+ Quality = parseResult.Quality
+ });
}
}
}
@@ -188,5 +199,18 @@ namespace NzbDrone.Core.Providers.Indexer
/// RSS Feed item to generate the link for
/// Download link URL
protected abstract string NzbDownloadUrl(SyndicationItem item);
+
+ private bool InHistory(IList episodes, EpisodeParseResult parseResult, SyndicationItem feedItem)
+ {
+ foreach (var episode in episodes)
+ {
+ if (_historyProvider.Exists(episode.EpisodeId, parseResult.Quality, parseResult.Proper))
+ {
+ _logger.Debug("Episode in history: {0}", feedItem.Title.Text);
+ return true;
+ }
+ }
+ return false;
+ }
}
}
\ No newline at end of file
diff --git a/NzbDrone.Core/Providers/Indexer/NewzbinProvider.cs b/NzbDrone.Core/Providers/Indexer/NewzbinProvider.cs
index 70f5bf5dd..ba4b95117 100644
--- a/NzbDrone.Core/Providers/Indexer/NewzbinProvider.cs
+++ b/NzbDrone.Core/Providers/Indexer/NewzbinProvider.cs
@@ -7,7 +7,7 @@ namespace NzbDrone.Core.Providers.Indexer
{
public class NewzbinProvider : IndexerProviderBase
{
- public NewzbinProvider(SeriesProvider seriesProvider, SeasonProvider seasonProvider, EpisodeProvider episodeProvider, ConfigProvider configProvider, HttpProvider httpProvider, IndexerProvider indexerProvider, HistoryProvider historyProvider) : base(seriesProvider, seasonProvider, episodeProvider, configProvider, httpProvider, indexerProvider, historyProvider)
+ public NewzbinProvider(SeriesProvider seriesProvider, SeasonProvider seasonProvider, EpisodeProvider episodeProvider, ConfigProvider configProvider, HttpProvider httpProvider, IndexerProvider indexerProvider, HistoryProvider historyProvider, SabProvider sabProvider) : base(seriesProvider, seasonProvider, episodeProvider, configProvider, httpProvider, indexerProvider, historyProvider, sabProvider)
{
}
diff --git a/NzbDrone.Core/Providers/Indexer/NzbMatrixProvider.cs b/NzbDrone.Core/Providers/Indexer/NzbMatrixProvider.cs
index d6c5f9300..b4fe6c134 100644
--- a/NzbDrone.Core/Providers/Indexer/NzbMatrixProvider.cs
+++ b/NzbDrone.Core/Providers/Indexer/NzbMatrixProvider.cs
@@ -6,7 +6,7 @@ namespace NzbDrone.Core.Providers.Indexer
{
public class NzbMatrixProvider : IndexerProviderBase
{
- public NzbMatrixProvider(SeriesProvider seriesProvider, SeasonProvider seasonProvider, EpisodeProvider episodeProvider, ConfigProvider configProvider, HttpProvider httpProvider, IndexerProvider indexerProvider, HistoryProvider historyProvider) : base(seriesProvider, seasonProvider, episodeProvider, configProvider, httpProvider, indexerProvider, historyProvider)
+ public NzbMatrixProvider(SeriesProvider seriesProvider, SeasonProvider seasonProvider, EpisodeProvider episodeProvider, ConfigProvider configProvider, HttpProvider httpProvider, IndexerProvider indexerProvider, HistoryProvider historyProvider, SabProvider sabProvider) : base(seriesProvider, seasonProvider, episodeProvider, configProvider, httpProvider, indexerProvider, historyProvider, sabProvider)
{
}
diff --git a/NzbDrone.Core/Providers/Indexer/NzbsOrgProvider.cs b/NzbDrone.Core/Providers/Indexer/NzbsOrgProvider.cs
index dd847cf47..ac0d99919 100644
--- a/NzbDrone.Core/Providers/Indexer/NzbsOrgProvider.cs
+++ b/NzbDrone.Core/Providers/Indexer/NzbsOrgProvider.cs
@@ -6,7 +6,7 @@ namespace NzbDrone.Core.Providers.Indexer
{
public class NzbsOrgProvider : IndexerProviderBase
{
- public NzbsOrgProvider(SeriesProvider seriesProvider, SeasonProvider seasonProvider, EpisodeProvider episodeProvider, ConfigProvider configProvider, HttpProvider httpProvider, IndexerProvider indexerProvider, HistoryProvider historyProvider) : base(seriesProvider, seasonProvider, episodeProvider, configProvider, httpProvider, indexerProvider, historyProvider)
+ public NzbsOrgProvider(SeriesProvider seriesProvider, SeasonProvider seasonProvider, EpisodeProvider episodeProvider, ConfigProvider configProvider, HttpProvider httpProvider, IndexerProvider indexerProvider, HistoryProvider historyProvider, SabProvider sabProvider) : base(seriesProvider, seasonProvider, episodeProvider, configProvider, httpProvider, indexerProvider, historyProvider, sabProvider)
{
}
diff --git a/NzbDrone.Core/Providers/Indexer/NzbsRUsProvider.cs b/NzbDrone.Core/Providers/Indexer/NzbsRUsProvider.cs
index f02875361..d90a1c30a 100644
--- a/NzbDrone.Core/Providers/Indexer/NzbsRUsProvider.cs
+++ b/NzbDrone.Core/Providers/Indexer/NzbsRUsProvider.cs
@@ -6,7 +6,7 @@ namespace NzbDrone.Core.Providers.Indexer
{
public class NzbsRUsProvider : IndexerProviderBase
{
- public NzbsRUsProvider(SeriesProvider seriesProvider, SeasonProvider seasonProvider, EpisodeProvider episodeProvider, ConfigProvider configProvider, HttpProvider httpProvider, IndexerProvider indexerProvider, HistoryProvider historyProvider) : base(seriesProvider, seasonProvider, episodeProvider, configProvider, httpProvider, indexerProvider, historyProvider)
+ public NzbsRUsProvider(SeriesProvider seriesProvider, SeasonProvider seasonProvider, EpisodeProvider episodeProvider, ConfigProvider configProvider, HttpProvider httpProvider, IndexerProvider indexerProvider, HistoryProvider historyProvider, SabProvider sabProvider) : base(seriesProvider, seasonProvider, episodeProvider, configProvider, httpProvider, indexerProvider, historyProvider, sabProvider)
{
}
diff --git a/NzbDrone.Web/Controllers/AddSeriesController.cs b/NzbDrone.Web/Controllers/AddSeriesController.cs
index cee3db2c5..08845e628 100644
--- a/NzbDrone.Web/Controllers/AddSeriesController.cs
+++ b/NzbDrone.Web/Controllers/AddSeriesController.cs
@@ -84,7 +84,7 @@ namespace NzbDrone.Web.Controllers
ViewData["guid"] = Guid.NewGuid();
ViewData["path"] = path;
- ViewData["javaPath"] = path.Replace(Path.DirectorySeparatorChar, '|').Replace(Path.VolumeSeparatorChar, '^');
+ ViewData["javaPath"] = path.Replace(Path.DirectorySeparatorChar, '|').Replace(Path.VolumeSeparatorChar, '^').Replace('\'', '`');
var defaultQuality = _configProvider.DefaultQualityProfile;
var qualityProfiles = _qualityProvider.GetAllProfiles();
@@ -105,7 +105,7 @@ namespace NzbDrone.Web.Controllers
//Add the new series to the Database
_seriesProvider.AddSeries(
- path.Replace('|', Path.DirectorySeparatorChar).Replace('^', Path.VolumeSeparatorChar), seriesId,
+ path.Replace('|', Path.DirectorySeparatorChar).Replace('^', Path.VolumeSeparatorChar).Replace('`', '\''), seriesId,
qualityProfileId);
ScanNewSeries();
return new JsonResult { Data = "ok" };
diff --git a/NzbDrone.Web/NzbDrone.Web.Publish.xml b/NzbDrone.Web/NzbDrone.Web.Publish.xml
index 431617f58..f2cd33dbd 100644
--- a/NzbDrone.Web/NzbDrone.Web.Publish.xml
+++ b/NzbDrone.Web/NzbDrone.Web.Publish.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/NzbDrone.Web/NzbDrone.Web.csproj b/NzbDrone.Web/NzbDrone.Web.csproj
index a5b6f7678..85cc4278e 100644
--- a/NzbDrone.Web/NzbDrone.Web.csproj
+++ b/NzbDrone.Web/NzbDrone.Web.csproj
@@ -590,6 +590,7 @@
+
@@ -633,7 +634,7 @@
-
+
Designer
diff --git a/NzbDrone.Web/Views/Settings/Quality.cshtml b/NzbDrone.Web/Views/Settings/Quality.cshtml
index 4fe3b6a28..5eff53223 100644
--- a/NzbDrone.Web/Views/Settings/Quality.cshtml
+++ b/NzbDrone.Web/Views/Settings/Quality.cshtml
@@ -76,17 +76,11 @@
return false;
});
-// $("a.deleteRow").live("click", function () {
-// $(this).parents("div.userProfileSectionEditor:first").remove();
-// return false;
- // });
-
var deleteQualityProfileUrl = '@Url.Action("DeleteQualityProfile", "Settings")';
function deleteProfile(id) {
- //$(this).parents("div.userProfileSectionEditor:first").remove();
sendToServer(id);
- $("#div_" + id).hide();
+ $("#div_" + id).remove();
}
function sendToServer(id) {
@@ -95,7 +89,7 @@
url: deleteQualityProfileUrl,
data: jQuery.param({ profileId: id }),
error: function (req, status, error) {
- alert("Sorry! We could not add " + path + " at this time. " + error);
+ alert("Sorry! We could not delete your Profile at this time. " + error);
}
});
}
diff --git a/NzbDrone/IISController.cs b/NzbDrone/IISController.cs
index d0565bb9e..52e1390e6 100644
--- a/NzbDrone/IISController.cs
+++ b/NzbDrone/IISController.cs
@@ -35,7 +35,7 @@ namespace NzbDrone
IISProcess = new Process();
IISProcess.StartInfo.FileName = IISExe;
- IISProcess.StartInfo.Arguments = String.Format("/config:{0} /trace:i", IISConfigPath);//"/config:"""" /trace:i";
+ IISProcess.StartInfo.Arguments = String.Format("/config:\"{0}\" /trace:i", IISConfigPath);//"/config:"""" /trace:i";
IISProcess.StartInfo.WorkingDirectory = Config.ProjectRoot;
IISProcess.StartInfo.UseShellExecute = false;
diff --git a/NzbDrone/NzbDrone.csproj b/NzbDrone/NzbDrone.csproj
index 1db1eb56e..47de312e0 100644
--- a/NzbDrone/NzbDrone.csproj
+++ b/NzbDrone/NzbDrone.csproj
@@ -49,6 +49,9 @@
prompt
4
+
+ NzbDrone.ico
+
True
@@ -88,6 +91,7 @@
+
diff --git a/NzbDrone/NzbDrone.ico b/NzbDrone/NzbDrone.ico
new file mode 100644
index 000000000..1d6e4d3f4
Binary files /dev/null and b/NzbDrone/NzbDrone.ico differ
diff --git a/NzbDrone/app.config b/NzbDrone/app.config
index 86b310f31..81d395705 100644
--- a/NzbDrone/app.config
+++ b/NzbDrone/app.config
@@ -4,6 +4,6 @@
-
+
\ No newline at end of file