mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 22:03:15 -07:00
Fix unrespected code guidelines
This commit is contained in:
parent
592139ccdd
commit
f19366475f
3 changed files with 9 additions and 13 deletions
|
@ -249,15 +249,11 @@ namespace Ombi.Api.Emby
|
|||
req.AddHeader("Device", "Ombi");
|
||||
}
|
||||
|
||||
public async Task<EmbyItemContainer<EmbyMovie>> GetMoviesPlayed(string apiKey, string parentIdFilder, int startIndex, int count, string userId, string baseUri)
|
||||
{
|
||||
return await GetPlayed<EmbyMovie>("Movie", apiKey, userId, baseUri, startIndex, count, parentIdFilder, "ProviderIds");
|
||||
}
|
||||
public async Task<EmbyItemContainer<EmbyMovie>> GetMoviesPlayed(string apiKey, string parentIdFilder, int startIndex, int count, string userId, string baseUri) =>
|
||||
await GetPlayed<EmbyMovie>("Movie", apiKey, userId, baseUri, startIndex, count, parentIdFilder, "ProviderIds");
|
||||
|
||||
public async Task<EmbyItemContainer<EmbyEpisodes>> GetTvPlayed(string apiKey, string parentIdFilder, int startIndex, int count, string userId, string baseUri)
|
||||
{
|
||||
return await GetPlayed<EmbyEpisodes>("Episode", apiKey, userId, baseUri, startIndex, count, parentIdFilder);
|
||||
}
|
||||
public async Task<EmbyItemContainer<EmbyEpisodes>> GetTvPlayed(string apiKey, string parentIdFilder, int startIndex, int count, string userId, string baseUri) =>
|
||||
await GetPlayed<EmbyEpisodes>("Episode", apiKey, userId, baseUri, startIndex, count, parentIdFilder);
|
||||
|
||||
private async Task<EmbyItemContainer<T>> GetPlayed<T>(
|
||||
string type,
|
||||
|
|
|
@ -916,7 +916,7 @@ namespace Ombi.Core.Engine
|
|||
var theMovieDbIds = childRequests.Select(x => x.Id);
|
||||
foreach (var request in childRequests)
|
||||
{
|
||||
var requestedEpisodes = getEpisodesKeys(request);
|
||||
var requestedEpisodes = GetEpisodesKeys(request);
|
||||
|
||||
var playedEpisodes = _userPlayedEpisodeRepository
|
||||
.GetAll()
|
||||
|
@ -934,7 +934,7 @@ namespace Ombi.Core.Engine
|
|||
}
|
||||
}
|
||||
|
||||
private List<EpisodeKey> getEpisodesKeys(ChildRequests request)
|
||||
private List<EpisodeKey> GetEpisodesKeys(ChildRequests request)
|
||||
{
|
||||
List<EpisodeKey> result = new List<EpisodeKey>();
|
||||
foreach(var season in request.SeasonRequests)
|
||||
|
|
|
@ -178,7 +178,7 @@ namespace Ombi.Schedule.Jobs.Emby
|
|||
return;
|
||||
}
|
||||
|
||||
await addToContent(content, new UserPlayedEpisode()
|
||||
await AddToContent(content, new UserPlayedEpisode()
|
||||
{
|
||||
TheMovieDbId = int.Parse(parent.TheMovieDbId),
|
||||
SeasonNumber = episode.ParentIndexNumber,
|
||||
|
@ -194,7 +194,7 @@ namespace Ombi.Schedule.Jobs.Emby
|
|||
_logger.LogDebug($"Multiple-episode file detected. Adding episode ${episodeNumber}");
|
||||
episodeNumber++;
|
||||
|
||||
await addToContent(content, new UserPlayedEpisode()
|
||||
await AddToContent(content, new UserPlayedEpisode()
|
||||
{
|
||||
TheMovieDbId = int.Parse(parent.TheMovieDbId),
|
||||
SeasonNumber = episode.ParentIndexNumber,
|
||||
|
@ -208,7 +208,7 @@ namespace Ombi.Schedule.Jobs.Emby
|
|||
}
|
||||
}
|
||||
|
||||
private async Task addToContent(ICollection<UserPlayedEpisode> content, UserPlayedEpisode episode)
|
||||
private async Task AddToContent(ICollection<UserPlayedEpisode> content, UserPlayedEpisode episode)
|
||||
{
|
||||
|
||||
// Check if it exists
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue