diff --git a/src/NzbDrone.Core/ImportLists/TMDb/Popular/TMDbPopularRequestGenerator.cs b/src/NzbDrone.Core/ImportLists/TMDb/Popular/TMDbPopularRequestGenerator.cs index 19eef97dc..1e50b386c 100644 --- a/src/NzbDrone.Core/ImportLists/TMDb/Popular/TMDbPopularRequestGenerator.cs +++ b/src/NzbDrone.Core/ImportLists/TMDb/Popular/TMDbPopularRequestGenerator.cs @@ -38,7 +38,7 @@ private IEnumerable GetMoviesRequests() var excludeGenreIds = Settings.FilterCriteria.ExcludeGenreIds; var includeCompanyIds = Settings.FilterCriteria.IncludeCompanyIds; var excludeCompanyIds = Settings.FilterCriteria.ExcludeCompanyIds; - var languageCode = (TMDbLanguageCodes)Settings.FilterCriteria.LanguageCode; + var languageCode = Settings.FilterCriteria.LanguageCode; var todaysDate = DateTime.Now.ToString("yyyy-MM-dd"); var threeMonthsAgo = DateTime.Parse(todaysDate).AddMonths(-3).ToString("yyyy-MM-dd"); @@ -48,7 +48,8 @@ private IEnumerable GetMoviesRequests() .SetSegment("api", "3") .SetSegment("route", "discover") .SetSegment("id", "") - .SetSegment("secondaryRoute", "movie"); + .SetSegment("secondaryRoute", "movie") + .Accept(HttpAccept.Json); switch (Settings.TMDbListType) { @@ -104,9 +105,10 @@ private IEnumerable GetMoviesRequests() requestBuilder.AddQueryParam("without_companies", excludeCompanyIds); } - requestBuilder - .AddQueryParam("with_original_language", languageCode) - .Accept(HttpAccept.Json); + if (languageCode.HasValue) + { + requestBuilder.AddQueryParam("with_original_language", (TMDbLanguageCodes)languageCode); + } for (var pageNumber = 1; pageNumber <= MaxPages; pageNumber++) { diff --git a/src/NzbDrone.Core/ImportLists/TMDb/TMDbFilterSettings.cs b/src/NzbDrone.Core/ImportLists/TMDb/TMDbFilterSettings.cs index 42557986a..be4db510c 100644 --- a/src/NzbDrone.Core/ImportLists/TMDb/TMDbFilterSettings.cs +++ b/src/NzbDrone.Core/ImportLists/TMDb/TMDbFilterSettings.cs @@ -60,7 +60,6 @@ public TMDbFilterSettings() { MinVoteAverage = "5"; MinVotes = "1"; - LanguageCode = (int)TMDbLanguageCodes.en; IncludeGenreIds = ""; ExcludeGenreIds = ""; IncludeCompanyIds = ""; @@ -89,6 +88,6 @@ public TMDbFilterSettings() public string ExcludeCompanyIds { get; set; } [FieldDefinition(8, Label = "Original Language", Type = FieldType.Select, SelectOptions = typeof(TMDbLanguageCodes), HelpText = "Filter by Language")] - public int LanguageCode { get; set; } + public int? LanguageCode { get; set; } } }