|
|
@ -32,12 +32,27 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
|
|
|
// patch can be a number (releases) or 'x' (git)
|
|
|
|
// patch can be a number (releases) or 'x' (git)
|
|
|
|
private static readonly Regex VersionRegex = new Regex(@"(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+|x)(?<candidate>.*)", RegexOptions.Compiled);
|
|
|
|
private static readonly Regex VersionRegex = new Regex(@"(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+|x)(?<candidate>.*)", RegexOptions.Compiled);
|
|
|
|
|
|
|
|
|
|
|
|
protected override string AddFromNzbFile(RemoteEpisode remoteEpisode, string filename, byte[] fileContent)
|
|
|
|
protected override string AddFromNzbFile(RemoteEpisode remoteEpisode, string filename, byte[] fileContents)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var category = Settings.TvCategory;
|
|
|
|
var category = Settings.TvCategory;
|
|
|
|
var priority = remoteEpisode.IsRecentEpisode() ? Settings.RecentTvPriority : Settings.OlderTvPriority;
|
|
|
|
var priority = remoteEpisode.IsRecentEpisode() ? Settings.RecentTvPriority : Settings.OlderTvPriority;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var response = _proxy.DownloadNzb(fileContents, filename, category, priority, Settings);
|
|
|
|
|
|
|
|
|
|
|
|
var response = _proxy.DownloadNzb(fileContent, filename, category, priority, Settings);
|
|
|
|
if (response != null && response.Ids.Any())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return response.Ids.First();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected override string AddFromNzbFile(RemoteMovie remoteMovie, string filename, byte[] fileContents)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var category = Settings.TvCategory;
|
|
|
|
|
|
|
|
var priority = Settings.RecentTvPriority;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var response = _proxy.DownloadNzb(fileContents, filename, category, priority, Settings);
|
|
|
|
|
|
|
|
|
|
|
|
if (response != null && response.Ids.Any())
|
|
|
|
if (response != null && response.Ids.Any())
|
|
|
|
{
|
|
|
|
{
|
|
|
|