Use current language for TV and movies requests

This commit is contained in:
Florian Dupret 2021-11-02 15:29:37 +01:00
commit dc1e71e77f
4 changed files with 6 additions and 6 deletions

View file

@ -124,7 +124,7 @@ export class DiscoverCardComponent implements OnInit {
dialog.afterClosed().subscribe((result) => {
if (result) {
this.requestService.requestMovie({ theMovieDbId: +this.result.id,
languageCode: navigator.language,
languageCode: this.translate.currentLang,
qualityPathOverride: result.radarrPathId,
requestOnBehalf: result.username?.id,
rootFolderOverride: result.radarrFolderId, }).subscribe(x => {
@ -138,7 +138,7 @@ export class DiscoverCardComponent implements OnInit {
}
});
} else {
this.requestService.requestMovie({ theMovieDbId: +this.result.id, languageCode: navigator.language, requestOnBehalf: null, qualityPathOverride: null, rootFolderOverride: null }).subscribe(x => {
this.requestService.requestMovie({ theMovieDbId: +this.result.id, languageCode: this.translate.currentLang, requestOnBehalf: null, qualityPathOverride: null, rootFolderOverride: null }).subscribe(x => {
if (x.result) {
this.result.requested = true;
this.messageService.send(this.translate.instant("Requests.RequestAddedSuccessfully", { title: this.result.title }), "Ok");

View file

@ -92,7 +92,7 @@ export class MovieDetailsComponent {
dialog.afterClosed().subscribe(async (result) => {
if (result) {
const requestResult = await this.requestService.requestMovie({ theMovieDbId: this.theMovidDbId,
languageCode: navigator.language,
languageCode: this.translate.currentLang,
qualityPathOverride: result.radarrPathId,
requestOnBehalf: result.username?.id,
rootFolderOverride: result.radarrFolderId, }).toPromise();
@ -107,7 +107,7 @@ export class MovieDetailsComponent {
}
});
} else {
const result = await this.requestService.requestMovie({ theMovieDbId: this.theMovidDbId, languageCode: navigator.language, requestOnBehalf: userId, qualityPathOverride: undefined, rootFolderOverride: undefined }).toPromise();
const result = await this.requestService.requestMovie({ theMovieDbId: this.theMovidDbId, languageCode: this.translate.currentLang, requestOnBehalf: userId, qualityPathOverride: undefined, rootFolderOverride: undefined }).toPromise();
if (result.result) {
this.movie.requested = true;
this.movie.requestId = result.requestId;

View file

@ -44,7 +44,7 @@ export class TvRequestGridComponent {
const viewModel = <ITvRequestViewModelV2>{
firstSeason: this.tv.firstSeason, latestSeason: this.tv.latestSeason, requestAll: this.tv.requestAll, theMovieDbId: this.tv.id,
requestOnBehalf: null, languageCode: navigator.language
requestOnBehalf: null, languageCode: this.translate.currentLang
};
viewModel.seasons = [];
this.tv.seasonRequests.forEach((season) => {

View file

@ -45,7 +45,7 @@ export class EpisodeRequestComponent {
const viewModel = <ITvRequestViewModelV2>{
firstSeason: this.data.series.firstSeason, latestSeason: this.data.series.latestSeason, requestAll: this.data.series.requestAll, theMovieDbId: this.data.series.id,
requestOnBehalf: this.data.requestOnBehalf, languageCode: navigator.language
requestOnBehalf: this.data.requestOnBehalf, languageCode: this.translate.currentLang
};
viewModel.seasons = [];
this.data.series.seasonRequests.forEach((season) => {