mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
!wip fixed merge
This commit is contained in:
parent
79d7cc9a2d
commit
b80ef04ab7
1 changed files with 47 additions and 57 deletions
|
@ -84,6 +84,13 @@ namespace Ombi.Schedule.Jobs.Ombi
|
||||||
|
|
||||||
|
|
||||||
var customization = await _customizationSettings.GetSettingsAsync();
|
var customization = await _customizationSettings.GetSettingsAsync();
|
||||||
|
// Get the Content
|
||||||
|
var plexContent = _plex.GetAll().Include(x => x.Episodes).AsNoTracking();
|
||||||
|
var embyContent = _emby.GetAll().Include(x => x.Episodes).AsNoTracking();
|
||||||
|
|
||||||
|
var addedLog = _recentlyAddedLog.GetAll();
|
||||||
|
var addedPlexMovieLogIds = addedLog.Where(x => x.Type == RecentlyAddedType.Plex && x.ContentType == ContentType.Parent).Select(x => x.ContentId);
|
||||||
|
var addedEmbyMoviesLogIds = addedLog.Where(x => x.Type == RecentlyAddedType.Emby && x.ContentType == ContentType.Parent).Select(x => x.ContentId);
|
||||||
|
|
||||||
var addedPlexEpisodesLogIds =
|
var addedPlexEpisodesLogIds =
|
||||||
addedLog.Where(x => x.Type == RecentlyAddedType.Plex && x.ContentType == ContentType.Episode);
|
addedLog.Where(x => x.Type == RecentlyAddedType.Plex && x.ContentType == ContentType.Episode);
|
||||||
|
@ -142,23 +149,6 @@ namespace Ombi.Schedule.Jobs.Ombi
|
||||||
foreach (var user in users)
|
foreach (var user in users)
|
||||||
{
|
{
|
||||||
// Get the users to send it to
|
// Get the users to send it to
|
||||||
var users = await _userManager.GetUsersInRoleAsync(OmbiRoles.RecievesNewsletter);
|
|
||||||
if (!users.Any())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var emails in settings.ExternalEmails)
|
|
||||||
{
|
|
||||||
users.Add(new OmbiUser
|
|
||||||
{
|
|
||||||
UserName = emails,
|
|
||||||
Email = emails
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var emailTasks = new List<Task>();
|
|
||||||
foreach (var user in users)
|
|
||||||
{
|
|
||||||
if (user.Email.IsNullOrEmpty())
|
if (user.Email.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue