mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-24 06:55:23 -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");
|
req.AddHeader("Device", "Ombi");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<EmbyItemContainer<EmbyMovie>> GetMoviesPlayed(string apiKey, string parentIdFilder, int startIndex, int count, string userId, string baseUri)
|
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");
|
||||||
return 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)
|
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);
|
||||||
return await GetPlayed<EmbyEpisodes>("Episode", apiKey, userId, baseUri, startIndex, count, parentIdFilder);
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task<EmbyItemContainer<T>> GetPlayed<T>(
|
private async Task<EmbyItemContainer<T>> GetPlayed<T>(
|
||||||
string type,
|
string type,
|
||||||
|
|
|
@ -916,7 +916,7 @@ namespace Ombi.Core.Engine
|
||||||
var theMovieDbIds = childRequests.Select(x => x.Id);
|
var theMovieDbIds = childRequests.Select(x => x.Id);
|
||||||
foreach (var request in childRequests)
|
foreach (var request in childRequests)
|
||||||
{
|
{
|
||||||
var requestedEpisodes = getEpisodesKeys(request);
|
var requestedEpisodes = GetEpisodesKeys(request);
|
||||||
|
|
||||||
var playedEpisodes = _userPlayedEpisodeRepository
|
var playedEpisodes = _userPlayedEpisodeRepository
|
||||||
.GetAll()
|
.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>();
|
List<EpisodeKey> result = new List<EpisodeKey>();
|
||||||
foreach(var season in request.SeasonRequests)
|
foreach(var season in request.SeasonRequests)
|
||||||
|
|
|
@ -178,7 +178,7 @@ namespace Ombi.Schedule.Jobs.Emby
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await addToContent(content, new UserPlayedEpisode()
|
await AddToContent(content, new UserPlayedEpisode()
|
||||||
{
|
{
|
||||||
TheMovieDbId = int.Parse(parent.TheMovieDbId),
|
TheMovieDbId = int.Parse(parent.TheMovieDbId),
|
||||||
SeasonNumber = episode.ParentIndexNumber,
|
SeasonNumber = episode.ParentIndexNumber,
|
||||||
|
@ -194,7 +194,7 @@ namespace Ombi.Schedule.Jobs.Emby
|
||||||
_logger.LogDebug($"Multiple-episode file detected. Adding episode ${episodeNumber}");
|
_logger.LogDebug($"Multiple-episode file detected. Adding episode ${episodeNumber}");
|
||||||
episodeNumber++;
|
episodeNumber++;
|
||||||
|
|
||||||
await addToContent(content, new UserPlayedEpisode()
|
await AddToContent(content, new UserPlayedEpisode()
|
||||||
{
|
{
|
||||||
TheMovieDbId = int.Parse(parent.TheMovieDbId),
|
TheMovieDbId = int.Parse(parent.TheMovieDbId),
|
||||||
SeasonNumber = episode.ParentIndexNumber,
|
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
|
// Check if it exists
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue