1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-24 22:35:49 -04:00

Remove trailing whitespace

This commit is contained in:
ta264
2019-12-22 21:24:11 +00:00
committed by Qstick
parent 8d27111f7b
commit d4fa9b7345
273 changed files with 566 additions and 555 deletions
@@ -131,7 +131,7 @@ namespace NzbDrone.Core.MetadataSource.PreDB
return matches;
}
private List<Movie> Sync()
@@ -148,7 +148,7 @@ namespace NzbDrone.Core.MetadataSource.PreDB
public void Execute(PreDBSyncCommand message)
{
var haveNewReleases = Sync();
foreach (Movie movie in haveNewReleases)
{
if (!movie.HasPreDBEntry)
@@ -187,14 +187,14 @@ namespace NzbDrone.Core.MetadataSource.PreDB
}
}
return false;
return false;
}
catch (Exception ex)
{
_logger.Warn(ex, "Error while looking on predb.me.");
return false;
}
}
}
}
@@ -119,7 +119,7 @@ namespace NzbDrone.Core.MetadataSource.RadarrAPI
return titles;
}
public Tuple<List<AlternativeTitle>, AlternativeYear> AlternativeTitlesAndYearForMovie(int tmdbId)
{
var request = RadarrAPI.Create().SetSegment("route", "mappings").SetSegment("action", "find").AddQueryParam("tmdbid", tmdbId).Build();
@@ -145,7 +145,7 @@ namespace NzbDrone.Core.MetadataSource.RadarrAPI
SourceId = year.Id
};
}
return new Tuple<List<AlternativeTitle>, AlternativeYear>(titles, newYear);
}
@@ -157,11 +157,11 @@ namespace NzbDrone.Core.MetadataSource.RadarrAPI
.AddQueryParam("aka_title", title.Title).Build();
var newMapping = Execute<AddTitleMapping>(request);
var newTitle = new AlternativeTitle(newMapping.Info.AkaTitle, SourceType.Mappings, newMapping.Id, title.Language);
newTitle.VoteCount = newMapping.VoteCount;
newTitle.Votes = newMapping.Votes;
return newTitle;
}
@@ -179,7 +179,7 @@ namespace NzbDrone.Core.MetadataSource.RadarrAPI
SourceId = newYear.Id
};
}
public IHttpRequestBuilderFactory RadarrAPI { get; private set; }
}
}
@@ -44,7 +44,7 @@ namespace NzbDrone.Core.MetadataSource.RadarrAPI
return $"Error while calling api: {firstError.Title}\nFull error(s): {details}";
}
}
public class TitleInfo
{
@@ -57,7 +57,7 @@ namespace NzbDrone.Core.MetadataSource.RadarrAPI
[JsonProperty("aka_clean_title")]
public string AkaCleanTitle { get; set; }
}
public class YearInfo
{
@@ -149,7 +149,7 @@ namespace NzbDrone.Core.MetadataSource.RadarrAPI
[JsonProperty("mappings")]
public Mappings Mappings { get; set; }
}
public class AddTitleMapping
{
@@ -177,7 +177,7 @@ namespace NzbDrone.Core.MetadataSource.RadarrAPI
[JsonProperty("locked")]
public bool Locked { get; set; }
}
public class AddYearMapping
{
@@ -20,7 +20,7 @@ namespace NzbDrone.Core.MetadataSource
public SearchMovieComparer(string searchQuery)
{
SearchQuery = searchQuery;
var match = Regex.Match(SearchQuery, @"^(?<query>.+)\s+(?:\((?<year>\d{4})\)|(?<year>\d{4}))$");
if (match.Success)
{
@@ -56,10 +56,10 @@ namespace NzbDrone.Core.MetadataSource
// Compare prefix matches by year "(CSI: ..."
result = CompareWithYear(x, y, s => s.Title.ToLowerInvariant().StartsWith(_searchQueryWithoutYear + ":"));
if (result != 0) return -result;
return Compare(x, y, s => SearchQuery.LevenshteinDistanceClean(s.Title) - GetYearFactor(s));
}
public int Compare<T>(Movie x, Movie y, Func<Movie, T> keySelector)
where T : IComparable<T>
{
@@ -26,7 +26,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
{
private readonly IHttpClient _httpClient;
private readonly Logger _logger;
private readonly IHttpRequestBuilderFactory _movieBuilder;
private readonly ITmdbConfigService _configService;
private readonly IMovieService _movieService;