Skip to content

Commit

Permalink
use language id
Browse files Browse the repository at this point in the history
  • Loading branch information
isc30 committed May 7, 2024
1 parent 0bccddb commit 9927d5d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Radarr.Api.V3/Movies/MovieController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public class MovieController : RestControllerWithSignalR<MovieResource, Movie>,
}

[HttpGet]
public List<MovieResource> AllMovie(int? tmdbId, string language, bool excludeLocalCovers = false)
public List<MovieResource> AllMovie(int? tmdbId, int? languageId, bool excludeLocalCovers = false)
{
var moviesResources = new List<MovieResource>();

Expand All @@ -130,8 +130,8 @@ public List<MovieResource> AllMovie(int? tmdbId, string language, bool excludeLo
else
{
var movieStats = _movieStatisticsService.MovieStatistics();
var translationLanguage = language != null
? Language.All.Single(l => l.Id > 0 && l.Name.Equals(language, StringComparison.InvariantCultureIgnoreCase))
var translationLanguage = languageId.HasValue
? Language.All.Single(l => l.Id > 0 && l.Id == languageId.Value)
: (Language)_configService.MovieInfoLanguage;
var availDelay = _configService.AvailabilityDelay;

Expand Down

0 comments on commit 9927d5d

Please sign in to comment.