diff --git a/src/Ombi/ClientApp/app/issues/issueDetails.component.ts b/src/Ombi/ClientApp/app/issues/issueDetails.component.ts index c4b84644e..34fcbe302 100644 --- a/src/Ombi/ClientApp/app/issues/issueDetails.component.ts +++ b/src/Ombi/ClientApp/app/issues/issueDetails.component.ts @@ -93,11 +93,11 @@ export class IssueDetailsComponent implements OnInit { private setBackground(issue: any) { if (issue.requestType === 1) { - this.imageService.getMovieBackground(Number(issue.providerId)).subscribe(x => { + this.imageService.getMovieBackground(issue.providerId).subscribe(x => { this.backgroundPath = this.sanitizer.bypassSecurityTrustStyle ("url(" + x + ")"); }); - this.imageService.getMoviePoster(Number(issue.providerId)).subscribe(x => { + this.imageService.getMoviePoster(issue.providerId).subscribe(x => { this.posterPath = x.toString(); }); diff --git a/src/Ombi/ClientApp/app/services/image.service.ts b/src/Ombi/ClientApp/app/services/image.service.ts index a2b405b8b..a640ac4de 100644 --- a/src/Ombi/ClientApp/app/services/image.service.ts +++ b/src/Ombi/ClientApp/app/services/image.service.ts @@ -21,7 +21,7 @@ export class ImageService extends ServiceHelpers { return this.http.get(`${this.url}tv/${tvdbid}`, {headers: this.headers}); } - public getMoviePoster(movieDbId: number): Observable { + public getMoviePoster(movieDbId: string): Observable { return this.http.get(`${this.url}poster/movie/${movieDbId}`, { headers: this.headers }); } @@ -29,7 +29,7 @@ export class ImageService extends ServiceHelpers { return this.http.get(`${this.url}poster/tv/${tvdbid}`, { headers: this.headers }); } - public getMovieBackground(movieDbId: number): Observable { + public getMovieBackground(movieDbId: string): Observable { return this.http.get(`${this.url}background/movie/${movieDbId}`, { headers: this.headers }); } diff --git a/src/Ombi/Controllers/ImagesController.cs b/src/Ombi/Controllers/ImagesController.cs index cb48869c6..692966258 100644 --- a/src/Ombi/Controllers/ImagesController.cs +++ b/src/Ombi/Controllers/ImagesController.cs @@ -58,7 +58,7 @@ namespace Ombi.Controllers } [HttpGet("poster/movie/{movieDbId}")] - public async Task GetMoviePoster(int movieDbId) + public async Task GetMoviePoster(string movieDbId) { var key = await _cache.GetOrAdd(CacheKeys.FanartTv, async () => await Config.Get(Store.Entities.ConfigurationTypes.FanartTv), DateTime.Now.AddDays(1)); @@ -118,7 +118,7 @@ namespace Ombi.Controllers } [HttpGet("background/movie/{movieDbId}")] - public async Task GetMovieBackground(int movieDbId) + public async Task GetMovieBackground(string movieDbId) { var key = await _cache.GetOrAdd(CacheKeys.FanartTv, async () => await Config.Get(Store.Entities.ConfigurationTypes.FanartTv), DateTime.Now.AddDays(1)); @@ -182,11 +182,11 @@ namespace Ombi.Controllers if (moviesArray.Any()) { var item = rand.Next(moviesArray.Length); - var result = await FanartTvApi.GetMovieImages(moviesArray[item], key.Value); + var result = await FanartTvApi.GetMovieImages(moviesArray[item].ToString(), key.Value); while (!result.moviebackground.Any()) { - result = await FanartTvApi.GetMovieImages(moviesArray[item], key.Value); + result = await FanartTvApi.GetMovieImages(moviesArray[item].ToString(), key.Value); } movieUrl = result.moviebackground[0].url;