mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 13:23:20 -07:00
feat(discover): Add original language filter
This commit is contained in:
parent
eea8663f7d
commit
ef7ec861d8
12 changed files with 100 additions and 26 deletions
|
@ -3,6 +3,7 @@ using System.Threading;
|
|||
using System.Threading.Tasks;
|
||||
using Ombi.Api.TheMovieDb.Models;
|
||||
using Ombi.Core.Models.Search.V2;
|
||||
using Ombi.TheMovieDbApi.Models;
|
||||
|
||||
// Due to conflicting Genre models in
|
||||
// Ombi.TheMovieDbApi.Models and Ombi.Api.TheMovieDb.Models
|
||||
|
@ -14,5 +15,6 @@ namespace Ombi.Core.Engine.V2
|
|||
{
|
||||
Task<List<MultiSearchResult>> MultiSearch(string searchTerm, MultiSearchFilter filter, CancellationToken cancellationToken);
|
||||
Task<IEnumerable<Genre>> GetGenres(string media, CancellationToken requestAborted);
|
||||
Task<IEnumerable<Language>> GetLanguages(CancellationToken requestAborted);
|
||||
}
|
||||
}
|
|
@ -17,6 +17,7 @@ using Ombi.Settings.Settings.Models;
|
|||
using Ombi.Settings.Settings.Models.External;
|
||||
using Ombi.Store.Entities;
|
||||
using Ombi.Store.Repository;
|
||||
using Ombi.TheMovieDbApi.Models;
|
||||
|
||||
// Due to conflicting Genre models in
|
||||
// Ombi.TheMovieDbApi.Models and Ombi.Api.TheMovieDb.Models
|
||||
|
@ -124,5 +125,9 @@ namespace Ombi.Core.Engine.V2
|
|||
var lang = await DefaultLanguageCode(null);
|
||||
return await _movieDbApi.GetGenres(media, cancellationToken, lang);
|
||||
}
|
||||
public async Task<IEnumerable<Language>> GetLanguages(CancellationToken cancellationToken)
|
||||
{
|
||||
return await _movieDbApi.GetLanguages(cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue