core: prefer object initializers (#7342)

This commit is contained in:
Cory
2020-03-26 17:15:28 -05:00
committed by GitHub
parent 12e55828f0
commit b5a6aab894
62 changed files with 1146 additions and 1064 deletions

View File

@@ -22,7 +22,7 @@ namespace Jackett.Common.Indexers
private string LoginUrl => SiteLink + "login.php";
private string SearchUrl => SiteLink + "ajax.php?action=browse&searchstr=";
private string DownloadUrl => SiteLink + "torrents.php?action=download&id=";
private string GuidUrl => SiteLink + "torrents.php?torrentid=";
private string CommentsUrl => SiteLink + "torrents.php?torrentid=";
private ConfigurationDataBasicLogin ConfigData => (ConfigurationDataBasicLogin)configData;
@@ -267,13 +267,13 @@ namespace Jackett.Common.Indexers
var grabs = int.Parse(torrentData[1].TextContent, NumberStyles.AllowThousands, CultureInfo.InvariantCulture);
var seeders = int.Parse(torrentData[2].TextContent, NumberStyles.AllowThousands, CultureInfo.InvariantCulture);
var leechers = int.Parse(torrentData[3].TextContent, NumberStyles.AllowThousands, CultureInfo.InvariantCulture);
var guid = new Uri(GuidUrl + torrentId);
var comments = new Uri(CommentsUrl + torrentId);
var link = new Uri(DownloadUrl + torrentId);
return new ReleaseInfo
{
Title = title,
Category = new List<int> { category }, // Who seasons movies right
Link = new Uri(DownloadUrl + torrentId),
Link = link,
PublishDate = publishDate,
BannerUrl = banner,
Description = description,
@@ -282,8 +282,8 @@ namespace Jackett.Common.Indexers
Files = files,
Size = size,
Grabs = grabs,
Guid = guid,
Comments = guid,
Guid = comments,
Comments = comments,
DownloadVolumeFactor = 0, // ratioless tracker
UploadVolumeFactor = 1
};