mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
fix(discover): TV shows now display on the Actor Pages (#4388)
* Add TV shows to Actor discover page * Fix actor page not loading after actor change * Remove user filter from discover actor page * Clean up code
This commit is contained in:
parent
907353a54d
commit
6b716e7220
8 changed files with 57 additions and 12 deletions
|
@ -1,6 +1,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Ombi.Api.TheMovieDb.Models;
|
||||
using Ombi.Core.Models.Search;
|
||||
using Ombi.Core.Models.Search.V2;
|
||||
|
||||
|
@ -10,6 +11,7 @@ namespace Ombi.Core
|
|||
{
|
||||
Task<SearchFullInfoTvShowViewModel> GetShowInformation(string tvdbid, CancellationToken token);
|
||||
Task<SearchFullInfoTvShowViewModel> GetShowByRequest(int requestId, CancellationToken token);
|
||||
Task<ActorCredits> GetTvByActor(int actorId, string langCode);
|
||||
Task<IEnumerable<StreamingData>> GetStreamInformation(int movieDbId, CancellationToken cancellationToken);
|
||||
Task<IEnumerable<SearchTvShowViewModel>> Popular(int currentlyLoaded, int amountToLoad, string langCustomCode = null);
|
||||
Task<IEnumerable<SearchTvShowViewModel>> Anticipated(int currentlyLoaded, int amountToLoad);
|
||||
|
|
|
@ -147,6 +147,12 @@ namespace Ombi.Core.Engine.V2
|
|||
return await processed;
|
||||
}
|
||||
|
||||
public async Task<ActorCredits> GetTvByActor(int actorId, string langCode)
|
||||
{
|
||||
var result = await Cache.GetOrAddAsync(nameof(GetTvByActor) + actorId + langCode,
|
||||
() => _movieApi.GetActorTvCredits(actorId, langCode), DateTimeOffset.Now.AddHours(12));
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<StreamingData>> GetStreamInformation(int movieDbId, CancellationToken cancellationToken)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue