|
|
|
@ -99,8 +99,8 @@ namespace Ombi.Schedule.Jobs.Ombi
|
|
|
|
|
addedLog.Where(x => x.Type == RecentlyAddedType.Emby && x.ContentType == ContentType.Episode);
|
|
|
|
|
|
|
|
|
|
// Filter out the ones that we haven't sent yet
|
|
|
|
|
var plexContentMoviesToSend = plexContent.Where(x => x.Type == PlexMediaTypeEntity.Movie && !addedPlexMovieLogIds.Contains(int.Parse(x.TheMovieDbId)));
|
|
|
|
|
var embyContentMoviesToSend = embyContent.Where(x => x.Type == EmbyMediaType.Movie && !addedEmbyMoviesLogIds.Contains(int.Parse(x.TheMovieDbId)));
|
|
|
|
|
var plexContentMoviesToSend = plexContent.Where(x => x.Type == PlexMediaTypeEntity.Movie && !addedPlexMovieLogIds.Contains(StringHelper.IntParseLinq(x.TheMovieDbId)));
|
|
|
|
|
var embyContentMoviesToSend = embyContent.Where(x => x.Type == EmbyMediaType.Movie && !addedEmbyMoviesLogIds.Contains(StringHelper.IntParseLinq(x.TheMovieDbId)));
|
|
|
|
|
_log.LogInformation("Plex Movies to send: {0}", plexContentMoviesToSend.Count());
|
|
|
|
|
_log.LogInformation("Emby Movies to send: {0}", embyContentMoviesToSend.Count());
|
|
|
|
|
|
|
|
|
@ -174,7 +174,7 @@ namespace Ombi.Schedule.Jobs.Ombi
|
|
|
|
|
AddedAt = DateTime.Now,
|
|
|
|
|
Type = RecentlyAddedType.Plex,
|
|
|
|
|
ContentType = ContentType.Parent,
|
|
|
|
|
ContentId = int.Parse(p.TheMovieDbId),
|
|
|
|
|
ContentId = StringHelper.IntParseLinq(p.TheMovieDbId),
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -186,7 +186,7 @@ namespace Ombi.Schedule.Jobs.Ombi
|
|
|
|
|
AddedAt = DateTime.Now,
|
|
|
|
|
Type = RecentlyAddedType.Plex,
|
|
|
|
|
ContentType = ContentType.Episode,
|
|
|
|
|
ContentId = int.Parse(p.Series.TvDbId),
|
|
|
|
|
ContentId = StringHelper.IntParseLinq(p.Series.TvDbId),
|
|
|
|
|
EpisodeNumber = p.EpisodeNumber,
|
|
|
|
|
SeasonNumber = p.SeasonNumber
|
|
|
|
|
});
|
|
|
|
@ -200,7 +200,7 @@ namespace Ombi.Schedule.Jobs.Ombi
|
|
|
|
|
AddedAt = DateTime.Now,
|
|
|
|
|
Type = RecentlyAddedType.Emby,
|
|
|
|
|
ContentType = ContentType.Parent,
|
|
|
|
|
ContentId = int.Parse(e.TheMovieDbId),
|
|
|
|
|
ContentId = StringHelper.IntParseLinq(e.TheMovieDbId),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -212,7 +212,7 @@ namespace Ombi.Schedule.Jobs.Ombi
|
|
|
|
|
AddedAt = DateTime.Now,
|
|
|
|
|
Type = RecentlyAddedType.Emby,
|
|
|
|
|
ContentType = ContentType.Episode,
|
|
|
|
|
ContentId = int.Parse(p.Series.TvDbId),
|
|
|
|
|
ContentId = StringHelper.IntParseLinq(p.Series.TvDbId),
|
|
|
|
|
EpisodeNumber = p.EpisodeNumber,
|
|
|
|
|
SeasonNumber = p.SeasonNumber
|
|
|
|
|
});
|
|
|
|
@ -260,7 +260,7 @@ namespace Ombi.Schedule.Jobs.Ombi
|
|
|
|
|
var itemsToReturn = new HashSet<PlexEpisode>();
|
|
|
|
|
foreach (var ep in source)
|
|
|
|
|
{
|
|
|
|
|
var tvDbId = int.Parse(ep.Series.TvDbId);
|
|
|
|
|
var tvDbId = StringHelper.IntParseLinq(ep.Series.TvDbId);
|
|
|
|
|
if (recentlyAdded.Any(x => x.ContentId == tvDbId && x.EpisodeNumber == ep.EpisodeNumber && x.SeasonNumber == ep.SeasonNumber))
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
@ -277,7 +277,7 @@ namespace Ombi.Schedule.Jobs.Ombi
|
|
|
|
|
var itemsToReturn = new HashSet<EmbyEpisode>();
|
|
|
|
|
foreach (var ep in source)
|
|
|
|
|
{
|
|
|
|
|
var tvDbId = int.Parse(ep.Series.TvDbId);
|
|
|
|
|
var tvDbId = StringHelper.IntParseLinq(ep.Series.TvDbId);
|
|
|
|
|
if (recentlyAdded.Any(x => x.ContentId == tvDbId && x.EpisodeNumber == ep.EpisodeNumber && x.SeasonNumber == ep.SeasonNumber))
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
@ -406,8 +406,8 @@ namespace Ombi.Schedule.Jobs.Ombi
|
|
|
|
|
theMovieDbId = result.id.ToString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var info = await _movieApi.GetMovieInformationWithExtraInfo(int.Parse(theMovieDbId));
|
|
|
|
|
var mediaurl = content.Url;
|
|
|
|
|
var info = await _movieApi.GetMovieInformationWithExtraInfo(StringHelper.IntParseLinq(theMovieDbId));
|
|
|
|
|
if (info == null)
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|