mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
Release group is added to history and episodefile
This commit is contained in:
parent
d6c90e7f36
commit
6f3262c68a
9 changed files with 37 additions and 11 deletions
|
@ -1,8 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.ServiceModel.Syndication;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml.Linq;
|
||||
using Ninject;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Core.Model;
|
||||
|
@ -44,7 +46,6 @@ namespace NzbDrone.Core.Providers.Indexer
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
protected override NetworkCredential Credentials
|
||||
{
|
||||
get { return new NetworkCredential(_configProvider.NewzbinUsername, _configProvider.NewzbinPassword); }
|
||||
|
@ -90,7 +91,6 @@ namespace NzbDrone.Core.Providers.Indexer
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get { return "Newzbin"; }
|
||||
|
@ -118,10 +118,25 @@ namespace NzbDrone.Core.Providers.Indexer
|
|||
|
||||
var sizeString = Regex.Match(item.Summary.Text, @"\(Size: \d*\,?\d+\.\d{1,2}\w{2}\)", RegexOptions.IgnoreCase).Value;
|
||||
currentResult.Size = Parser.GetReportSize(sizeString);
|
||||
|
||||
try
|
||||
{
|
||||
var releaseGroupText = item.ElementExtensions.Single(s => s.OuterName == "nfo")
|
||||
.GetObject<XElement>()
|
||||
.Element(XName.Get("filename", "http://www.newzbin2.es/DTD/2007/feeds/report/"))
|
||||
.Value;
|
||||
|
||||
var releaseGroup = Parser.ParseReleaseGroup(releaseGroupText.Replace(".nfo", ""));
|
||||
currentResult.ReleaseGroup = releaseGroup;
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
_logger.TraceException("Error getting release group for newzbin release", ex);
|
||||
currentResult.ReleaseGroup = "";
|
||||
}
|
||||
}
|
||||
|
||||
return currentResult;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue