chore: apply dotnet format (#13880)

This commit is contained in:
Diego Heras
2023-01-08 01:51:55 +01:00
committed by GitHub
parent 3771801c41
commit 33f59521aa
6 changed files with 23 additions and 21 deletions

View File

@@ -267,8 +267,10 @@ namespace Jackett.Common.Indexers
if (!string.IsNullOrEmpty(configData.UserAgent.Value)) if (!string.IsNullOrEmpty(configData.UserAgent.Value))
{ {
headers = new Dictionary<string, string>(); headers = new Dictionary<string, string>
headers.Add("User-Agent", configData.UserAgent.Value); {
{ "User-Agent", configData.UserAgent.Value }
};
} }
foreach (var cat in MapTorznabCapsToTrackers(query)) foreach (var cat in MapTorznabCapsToTrackers(query))

View File

@@ -248,8 +248,10 @@ namespace Jackett.Common.Indexers
if (!string.IsNullOrEmpty(configData.UserAgent.Value)) if (!string.IsNullOrEmpty(configData.UserAgent.Value))
{ {
headers = new Dictionary<string, string>(); headers = new Dictionary<string, string>
headers.Add("User-Agent", configData.UserAgent.Value); {
{ "User-Agent", configData.UserAgent.Value }
};
} }
if (query.IsImdbQuery) if (query.IsImdbQuery)

View File

@@ -225,16 +225,14 @@ namespace Jackett.Common.Indexers
var release = new ReleaseInfo var release = new ReleaseInfo
{ {
MinimumRatio = 1, MinimumRatio = 1,
MinimumSeedTime = 0 MinimumSeedTime = 0,
// Get Category
Category = MapTrackerCatToNewznab(torrent[7].ToString()),
// Title, description and details link
Title = torrent[3].ToString(),
Description = torrent[6].ToString(),
Details = new Uri($"{SiteLink}index.html#torrent/{torrent[0]}")
}; };
// Get Category
release.Category = MapTrackerCatToNewznab(torrent[7].ToString());
// Title, description and details link
release.Title = torrent[3].ToString();
release.Description = torrent[6].ToString();
release.Details = new Uri($"{SiteLink}index.html#torrent/{torrent[0]}");
release.Guid = release.Details; release.Guid = release.Details;
// Date of torrent creation // Date of torrent creation

View File

@@ -146,10 +146,12 @@ namespace Jackett.Common.Indexers
var releases = new List<ReleaseInfo>(); var releases = new List<ReleaseInfo>();
var searchString = query.GetQueryString(); var searchString = query.GetQueryString();
var queryCollection = new NameValueCollection { { "apikey", ConfigData.Key.Value } }; var queryCollection = new NameValueCollection
{
queryCollection.Add("limit", "50"); // Default 30 { "apikey", ConfigData.Key.Value },
queryCollection.Add("ponly", ProductsOnly ? "true" : "false"); { "limit", "50" }, // Default 30
{ "ponly", ProductsOnly ? "true" : "false" }
};
foreach (var releaseType in ReleaseType) foreach (var releaseType in ReleaseType)
{ {
queryCollection.Add("release_type", releaseType); queryCollection.Add("release_type", releaseType);

View File

@@ -204,9 +204,7 @@ namespace Jackett.Common.Utils.Clients
isBinary = true; isBinary = true;
} }
} }
logger.Debug($@"WebClient({ClientType}): Returning {result.Status} => { logger.Debug($@"WebClient({ClientType}): Returning {result.Status} => {(result.IsRedirect ? result.RedirectingTo + " " : "")}{bodySize} bytes{body}");
(result.IsRedirect ? result.RedirectingTo + " " : "")
}{bodySize} bytes{body}");
if (isBinary) if (isBinary)
{ {
// show the first 20 bytes in a hex dump // show the first 20 bytes in a hex dump

View File

@@ -723,7 +723,7 @@ namespace Jackett.Updater
startInfo.CreateNoWindow = true; startInfo.CreateNoWindow = true;
} }
logger.Info($"Starting Jackett: \"{startInfo.FileName }\" {startInfo.Arguments}"); logger.Info($"Starting Jackett: \"{startInfo.FileName}\" {startInfo.Arguments}");
Process.Start(startInfo); Process.Start(startInfo);
} }
} }