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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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))
{
headers = new Dictionary<string, string>();
headers.Add("User-Agent", configData.UserAgent.Value);
headers = new Dictionary<string, string>
{
{ "User-Agent", configData.UserAgent.Value }
};
}
foreach (var cat in MapTorznabCapsToTrackers(query))

View File

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

View File

@ -225,16 +225,14 @@ namespace Jackett.Common.Indexers
var release = new ReleaseInfo
{
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;
// Date of torrent creation

View File

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

View File

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

View File

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