mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Size is now parsed for each item in the feed.
QualityType added to database to allow saving of size limits. Fluent now uses longs for multiplication, to ensure it doesn't overflow.
This commit is contained in:
parent
f8ae95d36f
commit
e4f01ae0d4
21 changed files with 524 additions and 6 deletions
|
@ -1,7 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ServiceModel.Syndication;
|
||||
using System.Text.RegularExpressions;
|
||||
using Ninject;
|
||||
using NzbDrone.Core.Model;
|
||||
using NzbDrone.Core.Model.Search;
|
||||
using NzbDrone.Core.Providers.Core;
|
||||
|
||||
|
@ -67,5 +69,15 @@ namespace NzbDrone.Core.Providers.Indexer
|
|||
return searchUrls;
|
||||
}
|
||||
|
||||
protected override EpisodeParseResult CustomParser(SyndicationItem item, EpisodeParseResult currentResult)
|
||||
{
|
||||
if (currentResult != null)
|
||||
{
|
||||
var sizeString = Regex.Match(item.Summary.Text, @"<b>Size:</b> \d+\.\d{1,2} \w{2}<br />", RegexOptions.IgnoreCase).Value;
|
||||
|
||||
currentResult.Size = Parser.GetReportSize(sizeString);
|
||||
}
|
||||
return currentResult;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue