本文整理汇总了C#中Jackett.Models.ReleaseInfo.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ReleaseInfo.ToString方法的具体用法?C# ReleaseInfo.ToString怎么用?C# ReleaseInfo.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Jackett.Models.ReleaseInfo
的用法示例。
在下文中一共展示了ReleaseInfo.ToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PerformQuery
//.........这里部分代码省略.........
release.Peers += release.Seeders;
break;
case "date":
release.PublishDate = DateTimeUtil.FromUnknown(value);
break;
case "files":
release.Files = ParseUtil.CoerceLong(value);
break;
case "grabs":
release.Grabs = ParseUtil.CoerceLong(value);
break;
case "downloadvolumefactor":
release.DownloadVolumeFactor = ParseUtil.CoerceDouble(value);
break;
case "uploadvolumefactor":
release.UploadVolumeFactor = ParseUtil.CoerceDouble(value);
break;
case "minimumratio":
release.MinimumRatio = ParseUtil.CoerceDouble(value);
break;
case "minimumseedtime":
release.MinimumSeedTime = ParseUtil.CoerceLong(value);
break;
case "imdb":
Regex IMDBRegEx = new Regex(@"(\d+)", RegexOptions.Compiled);
var IMDBMatch = IMDBRegEx.Match(value);
var IMDBId = IMDBMatch.Groups[1].Value;
release.Imdb = ParseUtil.CoerceLong(IMDBId);
break;
case "rageid":
Regex RageIDRegEx = new Regex(@"(\d+)", RegexOptions.Compiled);
var RageIDMatch = RageIDRegEx.Match(value);
var RageID = RageIDMatch.Groups[1].Value;
release.RageID = ParseUtil.CoerceLong(RageID);
break;
case "tvdbid":
Regex TVDBIdRegEx = new Regex(@"(\d+)", RegexOptions.Compiled);
var TVDBIdMatch = TVDBIdRegEx.Match(value);
var TVDBId = TVDBIdMatch.Groups[1].Value;
release.TVDBId = ParseUtil.CoerceLong(TVDBId);
break;
case "banner":
if(!string.IsNullOrWhiteSpace(value)) {
var bannerurl = resolvePath(value);
release.BannerUrl = bannerurl;
}
break;
default:
break;
}
}
catch (Exception ex)
{
if (OptionalFileds.Contains(Field.Key))
continue;
throw new Exception(string.Format("Error while parsing field={0}, selector={1}, value={2}: {3}", Field.Key, Field.Value.Selector, value, ex.Message));
}
}
// if DateHeaders is set go through the previous rows and look for the header selector
var DateHeaders = Definition.Search.Rows.Dateheaders;
if (release.PublishDate == null && DateHeaders != null)
{
var PrevRow = Row.PreviousElementSibling;
string value = null;
while (PrevRow != null)
{
try
{
value = handleSelector(DateHeaders, PrevRow);
break;
}
catch (Exception)
{
// do nothing
}
PrevRow = PrevRow.PreviousElementSibling;
}
if (value == null)
throw new Exception(string.Format("No date header row found for {0}", release.ToString()));
release.PublishDate = DateTimeUtil.FromUnknown(value);
}
releases.Add(release);
}
catch (Exception ex)
{
logger.Error(string.Format("CardigannIndexer ({0}): Error while parsing row '{1}': {2}", ID, Row.OuterHtml, ex));
}
}
}
catch (Exception ex)
{
OnParseError(results, ex);
}
return releases;
}