mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-13 00:32:57 -07:00
Made the search results the language specified in the search refinement
This commit is contained in:
parent
ba15853ac1
commit
ae0d0e614c
9 changed files with 85 additions and 18 deletions
|
@ -16,7 +16,7 @@ namespace Ombi.Core
|
||||||
|
|
||||||
Task<IEnumerable<SearchMovieViewModel>> UpcomingMovies();
|
Task<IEnumerable<SearchMovieViewModel>> UpcomingMovies();
|
||||||
|
|
||||||
Task<SearchMovieViewModel> LookupImdbInformation(int theMovieDbId);
|
Task<SearchMovieViewModel> LookupImdbInformation(int theMovieDbId, string langCode = "en");
|
||||||
|
|
||||||
Task<IEnumerable<SearchMovieViewModel>> SimilarMovies(int theMovieDbId);
|
Task<IEnumerable<SearchMovieViewModel>> SimilarMovies(int theMovieDbId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,9 +43,9 @@ namespace Ombi.Core.Engine
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="theMovieDbId">The movie database identifier.</param>
|
/// <param name="theMovieDbId">The movie database identifier.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<SearchMovieViewModel> LookupImdbInformation(int theMovieDbId)
|
public async Task<SearchMovieViewModel> LookupImdbInformation(int theMovieDbId, string langCode = "en")
|
||||||
{
|
{
|
||||||
var movieInfo = await MovieApi.GetMovieInformationWithExtraInfo(theMovieDbId);
|
var movieInfo = await MovieApi.GetMovieInformationWithExtraInfo(theMovieDbId, langCode);
|
||||||
var viewMovie = Mapper.Map<SearchMovieViewModel>(movieInfo);
|
var viewMovie = Mapper.Map<SearchMovieViewModel>(movieInfo);
|
||||||
|
|
||||||
return await ProcessSingleMovie(viewMovie, true);
|
return await ProcessSingleMovie(viewMovie, true);
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace Ombi.Api.TheMovieDb
|
||||||
public interface IMovieDbApi
|
public interface IMovieDbApi
|
||||||
{
|
{
|
||||||
Task<MovieResponseDto> GetMovieInformation(int movieId);
|
Task<MovieResponseDto> GetMovieInformation(int movieId);
|
||||||
Task<MovieResponseDto> GetMovieInformationWithExtraInfo(int movieId);
|
Task<MovieResponseDto> GetMovieInformationWithExtraInfo(int movieId, string langCode = "en");
|
||||||
Task<List<MovieSearchResult>> NowPlaying();
|
Task<List<MovieSearchResult>> NowPlaying();
|
||||||
Task<List<MovieSearchResult>> PopularMovies();
|
Task<List<MovieSearchResult>> PopularMovies();
|
||||||
Task<List<MovieSearchResult>> SearchMovie(string searchTerm, int? year, string languageCode);
|
Task<List<MovieSearchResult>> SearchMovie(string searchTerm, int? year, string languageCode);
|
||||||
|
|
|
@ -73,11 +73,12 @@ namespace Ombi.Api.TheMovieDb
|
||||||
return Mapper.Map<List<MovieSearchResult>>(result.results);
|
return Mapper.Map<List<MovieSearchResult>>(result.results);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<MovieResponseDto> GetMovieInformationWithExtraInfo(int movieId)
|
public async Task<MovieResponseDto> GetMovieInformationWithExtraInfo(int movieId, string langCode = "en")
|
||||||
{
|
{
|
||||||
var request = new Request($"movie/{movieId}", BaseUri, HttpMethod.Get);
|
var request = new Request($"movie/{movieId}", BaseUri, HttpMethod.Get);
|
||||||
request.FullUri = request.FullUri.AddQueryParameter("api_key", ApiToken);
|
request.FullUri = request.FullUri.AddQueryParameter("api_key", ApiToken);
|
||||||
request.FullUri = request.FullUri.AddQueryParameter("append_to_response", "videos,release_dates");
|
request.FullUri = request.FullUri.AddQueryParameter("append_to_response", "videos,release_dates");
|
||||||
|
request.FullUri = request.FullUri.AddQueryParameter("language", langCode);
|
||||||
AddRetry(request);
|
AddRetry(request);
|
||||||
var result = await Api.Request<MovieResponse>(request);
|
var result = await Api.Request<MovieResponse>(request);
|
||||||
return Mapper.Map<MovieResponseDto>(result);
|
return Mapper.Map<MovieResponseDto>(result);
|
||||||
|
@ -88,7 +89,7 @@ namespace Ombi.Api.TheMovieDb
|
||||||
var request = new Request($"search/movie", BaseUri, HttpMethod.Get);
|
var request = new Request($"search/movie", BaseUri, HttpMethod.Get);
|
||||||
request.FullUri = request.FullUri.AddQueryParameter("api_key", ApiToken);
|
request.FullUri = request.FullUri.AddQueryParameter("api_key", ApiToken);
|
||||||
request.FullUri = request.FullUri.AddQueryParameter("query", searchTerm);
|
request.FullUri = request.FullUri.AddQueryParameter("query", searchTerm);
|
||||||
request.FullUri = request.FullUri.AddQueryParameter("language", searchTerm);
|
request.FullUri = request.FullUri.AddQueryParameter("language", langageCode);
|
||||||
if (year.HasValue && year.Value > 0)
|
if (year.HasValue && year.Value > 0)
|
||||||
{
|
{
|
||||||
request.FullUri = request.FullUri.AddQueryParameter("year", year.Value.ToString());
|
request.FullUri = request.FullUri.AddQueryParameter("year", year.Value.ToString());
|
||||||
|
|
|
@ -25,7 +25,7 @@ export class MovieSearchComponent implements OnInit {
|
||||||
public result: IRequestEngineResult;
|
public result: IRequestEngineResult;
|
||||||
|
|
||||||
public searchApplied = false;
|
public searchApplied = false;
|
||||||
public refineSearchEnabled = true;
|
public refineSearchEnabled = false;
|
||||||
public searchYear?: number;
|
public searchYear?: number;
|
||||||
public selectedLanguage: string;
|
public selectedLanguage: string;
|
||||||
public langauges: ILanguageRefine[];
|
public langauges: ILanguageRefine[];
|
||||||
|
@ -203,10 +203,18 @@ export class MovieSearchComponent implements OnInit {
|
||||||
}
|
}
|
||||||
val.background = this.sanitizer.bypassSecurityTrustStyle
|
val.background = this.sanitizer.bypassSecurityTrustStyle
|
||||||
("url(" + "https://image.tmdb.org/t/p/w1280" + val.backdropPath + ")");
|
("url(" + "https://image.tmdb.org/t/p/w1280" + val.backdropPath + ")");
|
||||||
this.searchService.getMovieInformation(val.id)
|
|
||||||
|
if (this.applyRefinedSearch) {
|
||||||
|
this.searchService.getMovieInformationWithRefined(val.id, this.selectedLanguage)
|
||||||
|
.subscribe(m => {
|
||||||
|
this.updateItem(val, m);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.searchService.getMovieInformation(val.id)
|
||||||
.subscribe(m => {
|
.subscribe(m => {
|
||||||
this.updateItem(val, m);
|
this.updateItem(val, m);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,10 @@ export class SearchService extends ServiceHelpers {
|
||||||
return this.http.get<ISearchMovieResult>(`${this.url}/Movie/info/${theMovieDbId}`);
|
return this.http.get<ISearchMovieResult>(`${this.url}/Movie/info/${theMovieDbId}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getMovieInformationWithRefined(theMovieDbId: number, langCode: string): Observable<ISearchMovieResult> {
|
||||||
|
return this.http.post<ISearchMovieResult>(`${this.url}/Movie/info`, { theMovieDbId, languageCode: langCode });
|
||||||
|
}
|
||||||
|
|
||||||
// TV
|
// TV
|
||||||
public searchTv(searchTerm: string): Observable<ISearchTvResult[]> {
|
public searchTv(searchTerm: string): Observable<ISearchTvResult[]> {
|
||||||
return this.http.get<ISearchTvResult[]>(`${this.url}/Tv/${searchTerm}`, { headers: this.headers });
|
return this.http.get<ISearchTvResult[]>(`${this.url}/Tv/${searchTerm}`, { headers: this.headers });
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Ombi.Api.Lidarr.Models;
|
|
||||||
using Ombi.Core;
|
using Ombi.Core;
|
||||||
using Ombi.Core.Engine;
|
using Ombi.Core.Engine;
|
||||||
using Ombi.Core.Engine.Interfaces;
|
using Ombi.Core.Engine.Interfaces;
|
||||||
using Ombi.Core.Models;
|
|
||||||
using Ombi.Core.Models.Search;
|
using Ombi.Core.Models.Search;
|
||||||
using Ombi.Models;
|
using Ombi.Models;
|
||||||
using StackExchange.Profiling;
|
using StackExchange.Profiling;
|
||||||
|
@ -42,6 +39,8 @@ namespace Ombi.Controllers
|
||||||
/// <param name="searchTerm">The search term.</param>
|
/// <param name="searchTerm">The search term.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("movie/{searchTerm}")]
|
[HttpGet("movie/{searchTerm}")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesDefaultResponseType]
|
||||||
public async Task<IEnumerable<SearchMovieViewModel>> SearchMovie(string searchTerm)
|
public async Task<IEnumerable<SearchMovieViewModel>> SearchMovie(string searchTerm)
|
||||||
{
|
{
|
||||||
using (MiniProfiler.Current.Step("SearchingMovie"))
|
using (MiniProfiler.Current.Step("SearchingMovie"))
|
||||||
|
@ -56,7 +55,7 @@ namespace Ombi.Controllers
|
||||||
/// Searches for a movie.
|
/// Searches for a movie.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>We use TheMovieDb as the Movie Provider</remarks>
|
/// <remarks>We use TheMovieDb as the Movie Provider</remarks>
|
||||||
/// <param name="model">The refinement model, language code and year are both optional</param>
|
/// <param name="model">The refinement model, language code and year are both optional. Language code uses ISO 639-1</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("movie")]
|
[HttpPost("movie")]
|
||||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
@ -86,11 +85,35 @@ namespace Ombi.Controllers
|
||||||
/// We use TheMovieDb as the Movie Provider
|
/// We use TheMovieDb as the Movie Provider
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[HttpGet("movie/info/{theMovieDbId}")]
|
[HttpGet("movie/info/{theMovieDbId}")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesDefaultResponseType]
|
||||||
public async Task<SearchMovieViewModel> GetExtraMovieInfo(int theMovieDbId)
|
public async Task<SearchMovieViewModel> GetExtraMovieInfo(int theMovieDbId)
|
||||||
{
|
{
|
||||||
return await MovieEngine.LookupImdbInformation(theMovieDbId);
|
return await MovieEngine.LookupImdbInformation(theMovieDbId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets extra information on the movie e.g. IMDBId
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model">TheMovieDb and Language Code, Pass in the language code (ISO 639-1) to get it back in a different lang </param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <remarks>
|
||||||
|
/// We use TheMovieDb as the Movie Provider
|
||||||
|
/// </remarks>
|
||||||
|
[HttpPost("movie/info")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||||
|
[ProducesDefaultResponseType]
|
||||||
|
public async Task<IActionResult> GetExtraMovieInfo([FromBody] SearchMovieExtraInfoRefineModel model)
|
||||||
|
{
|
||||||
|
if (model == null)
|
||||||
|
{
|
||||||
|
return BadRequest();
|
||||||
|
}
|
||||||
|
return Json(await MovieEngine.LookupImdbInformation(model.TheMovieDbId, model.LanguageCode));
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns similar movies to the movie id passed in
|
/// Returns similar movies to the movie id passed in
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -99,6 +122,8 @@ namespace Ombi.Controllers
|
||||||
/// We use TheMovieDb as the Movie Provider
|
/// We use TheMovieDb as the Movie Provider
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[HttpGet("movie/{theMovieDbId}/similar")]
|
[HttpGet("movie/{theMovieDbId}/similar")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesDefaultResponseType]
|
||||||
public async Task<IEnumerable<SearchMovieViewModel>> SimilarMovies(int theMovieDbId)
|
public async Task<IEnumerable<SearchMovieViewModel>> SimilarMovies(int theMovieDbId)
|
||||||
{
|
{
|
||||||
return await MovieEngine.SimilarMovies(theMovieDbId);
|
return await MovieEngine.SimilarMovies(theMovieDbId);
|
||||||
|
@ -110,6 +135,8 @@ namespace Ombi.Controllers
|
||||||
/// <remarks>We use TheMovieDb as the Movie Provider</remarks>
|
/// <remarks>We use TheMovieDb as the Movie Provider</remarks>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("movie/popular")]
|
[HttpGet("movie/popular")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesDefaultResponseType]
|
||||||
public async Task<IEnumerable<SearchMovieViewModel>> Popular()
|
public async Task<IEnumerable<SearchMovieViewModel>> Popular()
|
||||||
{
|
{
|
||||||
return await MovieEngine.PopularMovies();
|
return await MovieEngine.PopularMovies();
|
||||||
|
@ -120,6 +147,8 @@ namespace Ombi.Controllers
|
||||||
/// <remarks>We use TheMovieDb as the Movie Provider</remarks>
|
/// <remarks>We use TheMovieDb as the Movie Provider</remarks>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("movie/nowplaying")]
|
[HttpGet("movie/nowplaying")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesDefaultResponseType]
|
||||||
public async Task<IEnumerable<SearchMovieViewModel>> NowPlayingMovies()
|
public async Task<IEnumerable<SearchMovieViewModel>> NowPlayingMovies()
|
||||||
{
|
{
|
||||||
return await MovieEngine.NowPlayingMovies();
|
return await MovieEngine.NowPlayingMovies();
|
||||||
|
@ -130,6 +159,8 @@ namespace Ombi.Controllers
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <remarks>We use TheMovieDb as the Movie Provider</remarks>
|
/// <remarks>We use TheMovieDb as the Movie Provider</remarks>
|
||||||
[HttpGet("movie/toprated")]
|
[HttpGet("movie/toprated")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesDefaultResponseType]
|
||||||
public async Task<IEnumerable<SearchMovieViewModel>> TopRatedMovies()
|
public async Task<IEnumerable<SearchMovieViewModel>> TopRatedMovies()
|
||||||
{
|
{
|
||||||
return await MovieEngine.TopRatedMovies();
|
return await MovieEngine.TopRatedMovies();
|
||||||
|
@ -140,6 +171,8 @@ namespace Ombi.Controllers
|
||||||
/// <remarks>We use TheMovieDb as the Movie Provider</remarks>
|
/// <remarks>We use TheMovieDb as the Movie Provider</remarks>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("movie/upcoming")]
|
[HttpGet("movie/upcoming")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesDefaultResponseType]
|
||||||
public async Task<IEnumerable<SearchMovieViewModel>> UpcomingMovies()
|
public async Task<IEnumerable<SearchMovieViewModel>> UpcomingMovies()
|
||||||
{
|
{
|
||||||
return await MovieEngine.UpcomingMovies();
|
return await MovieEngine.UpcomingMovies();
|
||||||
|
@ -152,6 +185,8 @@ namespace Ombi.Controllers
|
||||||
/// <remarks>We use TvMaze as the Provider</remarks>
|
/// <remarks>We use TvMaze as the Provider</remarks>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("tv/{searchTerm}")]
|
[HttpGet("tv/{searchTerm}")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesDefaultResponseType]
|
||||||
public async Task<IEnumerable<SearchTvShowViewModel>> SearchTv(string searchTerm)
|
public async Task<IEnumerable<SearchTvShowViewModel>> SearchTv(string searchTerm)
|
||||||
{
|
{
|
||||||
return await TvEngine.Search(searchTerm);
|
return await TvEngine.Search(searchTerm);
|
||||||
|
@ -164,6 +199,8 @@ namespace Ombi.Controllers
|
||||||
/// <remarks>We use TvMaze as the Provider</remarks>
|
/// <remarks>We use TvMaze as the Provider</remarks>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("tv/info/{tvdbId}")]
|
[HttpGet("tv/info/{tvdbId}")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesDefaultResponseType]
|
||||||
public async Task<SearchTvShowViewModel> GetShowInfo(int tvdbId)
|
public async Task<SearchTvShowViewModel> GetShowInfo(int tvdbId)
|
||||||
{
|
{
|
||||||
return await TvEngine.GetShowInformation(tvdbId);
|
return await TvEngine.GetShowInformation(tvdbId);
|
||||||
|
@ -175,6 +212,8 @@ namespace Ombi.Controllers
|
||||||
/// <remarks>We use Trakt.tv as the Provider</remarks>
|
/// <remarks>We use Trakt.tv as the Provider</remarks>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("tv/popular")]
|
[HttpGet("tv/popular")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesDefaultResponseType]
|
||||||
public async Task<IEnumerable<SearchTvShowViewModel>> PopularTv()
|
public async Task<IEnumerable<SearchTvShowViewModel>> PopularTv()
|
||||||
{
|
{
|
||||||
return await TvEngine.Popular();
|
return await TvEngine.Popular();
|
||||||
|
@ -186,6 +225,8 @@ namespace Ombi.Controllers
|
||||||
/// <remarks>We use Trakt.tv as the Provider</remarks>
|
/// <remarks>We use Trakt.tv as the Provider</remarks>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("tv/anticipated")]
|
[HttpGet("tv/anticipated")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesDefaultResponseType]
|
||||||
public async Task<IEnumerable<SearchTvShowViewModel>> AnticipatedTv()
|
public async Task<IEnumerable<SearchTvShowViewModel>> AnticipatedTv()
|
||||||
{
|
{
|
||||||
return await TvEngine.Anticipated();
|
return await TvEngine.Anticipated();
|
||||||
|
@ -198,6 +239,8 @@ namespace Ombi.Controllers
|
||||||
/// <remarks>We use Trakt.tv as the Provider</remarks>
|
/// <remarks>We use Trakt.tv as the Provider</remarks>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("tv/mostwatched")]
|
[HttpGet("tv/mostwatched")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesDefaultResponseType]
|
||||||
public async Task<IEnumerable<SearchTvShowViewModel>> MostWatched()
|
public async Task<IEnumerable<SearchTvShowViewModel>> MostWatched()
|
||||||
{
|
{
|
||||||
return await TvEngine.MostWatches();
|
return await TvEngine.MostWatches();
|
||||||
|
@ -209,6 +252,8 @@ namespace Ombi.Controllers
|
||||||
/// <remarks>We use Trakt.tv as the Provider</remarks>
|
/// <remarks>We use Trakt.tv as the Provider</remarks>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("tv/trending")]
|
[HttpGet("tv/trending")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesDefaultResponseType]
|
||||||
public async Task<IEnumerable<SearchTvShowViewModel>> Trending()
|
public async Task<IEnumerable<SearchTvShowViewModel>> Trending()
|
||||||
{
|
{
|
||||||
return await TvEngine.Trending();
|
return await TvEngine.Trending();
|
||||||
|
@ -220,6 +265,8 @@ namespace Ombi.Controllers
|
||||||
/// <remarks>We use Lidarr as the Provider</remarks>
|
/// <remarks>We use Lidarr as the Provider</remarks>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("music/artist/{searchTerm}")]
|
[HttpGet("music/artist/{searchTerm}")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesDefaultResponseType]
|
||||||
public async Task<IEnumerable<SearchArtistViewModel>> SearchArtist(string searchTerm)
|
public async Task<IEnumerable<SearchArtistViewModel>> SearchArtist(string searchTerm)
|
||||||
{
|
{
|
||||||
return await MusicEngine.SearchArtist(searchTerm);
|
return await MusicEngine.SearchArtist(searchTerm);
|
||||||
|
@ -231,6 +278,8 @@ namespace Ombi.Controllers
|
||||||
/// <remarks>We use Lidarr as the Provider</remarks>
|
/// <remarks>We use Lidarr as the Provider</remarks>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("music/album/{searchTerm}")]
|
[HttpGet("music/album/{searchTerm}")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesDefaultResponseType]
|
||||||
public async Task<IEnumerable<SearchAlbumViewModel>> SearchAlbum(string searchTerm)
|
public async Task<IEnumerable<SearchAlbumViewModel>> SearchAlbum(string searchTerm)
|
||||||
{
|
{
|
||||||
return await MusicEngine.SearchAlbum(searchTerm);
|
return await MusicEngine.SearchAlbum(searchTerm);
|
||||||
|
@ -242,6 +291,8 @@ namespace Ombi.Controllers
|
||||||
/// <remarks>We use Lidarr as the Provider</remarks>
|
/// <remarks>We use Lidarr as the Provider</remarks>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("music/artist/album/{foreignArtistId}")]
|
[HttpGet("music/artist/album/{foreignArtistId}")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesDefaultResponseType]
|
||||||
public async Task<IEnumerable<SearchAlbumViewModel>> GetAlbumsByArtist(string foreignArtistId)
|
public async Task<IEnumerable<SearchAlbumViewModel>> GetAlbumsByArtist(string foreignArtistId)
|
||||||
{
|
{
|
||||||
return await MusicEngine.GetArtistAlbums(foreignArtistId);
|
return await MusicEngine.GetArtistAlbums(foreignArtistId);
|
||||||
|
|
8
src/Ombi/Models/SearchMovieExtraInfoRefineModel.cs
Normal file
8
src/Ombi/Models/SearchMovieExtraInfoRefineModel.cs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
namespace Ombi.Models
|
||||||
|
{
|
||||||
|
public class SearchMovieExtraInfoRefineModel
|
||||||
|
{
|
||||||
|
public int TheMovieDbId { get; set; }
|
||||||
|
public string LanguageCode { get; set; } = "en";
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,9 +1,4 @@
|
||||||
using System;
|
namespace Ombi.Models
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Ombi.Models
|
|
||||||
{
|
{
|
||||||
public class SearchMovieRefineModel
|
public class SearchMovieRefineModel
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue