mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-25 22:37:27 -04:00
Replaced built-in valuetypes with language keywords.
This commit is contained in:
@@ -14,7 +14,7 @@ namespace NzbDrone.Core.DataAugmentation.Scene
|
||||
{
|
||||
public interface ISceneMappingService
|
||||
{
|
||||
List<String> GetSceneNames(int tvdbId, IEnumerable<Int32> seasonNumbers);
|
||||
List<string> GetSceneNames(int tvdbId, IEnumerable<int> seasonNumbers);
|
||||
Nullable<int> FindTvdbId(string title);
|
||||
List<SceneMapping> FindByTvdbId(int tvdbId);
|
||||
Nullable<Int32> GetSeasonNumber(string title);
|
||||
@@ -47,13 +47,13 @@ namespace NzbDrone.Core.DataAugmentation.Scene
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public List<String> GetSceneNames(int tvdbId, IEnumerable<Int32> seasonNumbers)
|
||||
public List<string> GetSceneNames(int tvdbId, IEnumerable<int> seasonNumbers)
|
||||
{
|
||||
var names = _findByTvdbIdCache.Find(tvdbId.ToString());
|
||||
|
||||
if (names == null)
|
||||
{
|
||||
return new List<String>();
|
||||
return new List<string>();
|
||||
}
|
||||
|
||||
return FilterNonEnglish(names.Where(s => seasonNumbers.Contains(s.SeasonNumber) ||
|
||||
@@ -199,7 +199,7 @@ namespace NzbDrone.Core.DataAugmentation.Scene
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> FilterNonEnglish(List<String> titles)
|
||||
private List<string> FilterNonEnglish(List<string> titles)
|
||||
{
|
||||
return titles.Where(title => title.All(c => c <= 255)).ToList();
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace NzbDrone.Core.DataAugmentation.Xem
|
||||
return response.Data.Select(d =>
|
||||
{
|
||||
int tvdbId = 0;
|
||||
Int32.TryParse(d, out tvdbId);
|
||||
int.TryParse(d, out tvdbId);
|
||||
|
||||
return tvdbId;
|
||||
}).Where(t => t > 0).ToList();
|
||||
@@ -76,7 +76,7 @@ namespace NzbDrone.Core.DataAugmentation.Xem
|
||||
var request = _xemRequestBuilder.Build("/allNames");
|
||||
request.UriBuilder.SetQueryParam("seasonNumbers", true);
|
||||
|
||||
var response = _httpClient.Get<XemResult<Dictionary<Int32, List<JObject>>>>(request).Resource;
|
||||
var response = _httpClient.Get<XemResult<Dictionary<int, List<JObject>>>>(request).Resource;
|
||||
|
||||
var result = new List<SceneMapping>();
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace NzbDrone.Core.DataAugmentation.Xem
|
||||
foreach (var n in name)
|
||||
{
|
||||
int seasonNumber;
|
||||
if (!Int32.TryParse(n.Value.ToString(), out seasonNumber))
|
||||
if (!int.TryParse(n.Value.ToString(), out seasonNumber))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ namespace NzbDrone.Core.DataAugmentation.Xem
|
||||
{
|
||||
int id;
|
||||
|
||||
if (Int32.TryParse(m.Title, out id))
|
||||
if (int.TryParse(m.Title, out id))
|
||||
{
|
||||
_logger.Debug("Skipping all numeric name: {0} for {1}", m.Title, m.TvdbId);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user