mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
Newsletter almost finished. !wip
This commit is contained in:
parent
df95962aa6
commit
9767380f83
23 changed files with 1811 additions and 31 deletions
|
@ -15,7 +15,7 @@ namespace Ombi.Store.Context
|
|||
public OmbiContext()
|
||||
{
|
||||
if (_created) return;
|
||||
|
||||
|
||||
_created = true;
|
||||
Database.Migrate();
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ namespace Ombi.Store.Context
|
|||
public DbSet<IssueCategory> IssueCategories { get; set; }
|
||||
public DbSet<IssueComments> IssueComments { get; set; }
|
||||
public DbSet<RequestLog> RequestLogs { get; set; }
|
||||
public DbSet<RecentlyAddedLog> RecentlyAddedLogs { get; set; }
|
||||
|
||||
|
||||
public DbSet<Audit> Audit { get; set; }
|
||||
|
@ -55,7 +56,7 @@ namespace Ombi.Store.Context
|
|||
{
|
||||
i.StoragePath = string.Empty;
|
||||
}
|
||||
optionsBuilder.UseSqlite($"Data Source={Path.Combine(i.StoragePath,"Ombi.db")}");
|
||||
optionsBuilder.UseSqlite($"Data Source={Path.Combine(i.StoragePath, "Ombi.db")}");
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
|
@ -70,7 +71,7 @@ namespace Ombi.Store.Context
|
|||
.WithMany(b => b.Episodes)
|
||||
.HasPrincipalKey(x => x.EmbyId)
|
||||
.HasForeignKey(p => p.ParentId);
|
||||
|
||||
|
||||
base.OnModelCreating(builder);
|
||||
}
|
||||
|
||||
|
@ -218,6 +219,16 @@ namespace Ombi.Store.Context
|
|||
break;
|
||||
case NotificationType.AdminNote:
|
||||
continue;
|
||||
case NotificationType.Newsletter:
|
||||
notificationToAdd = new NotificationTemplates
|
||||
{
|
||||
NotificationType = notificationType,
|
||||
Message = "Here is a list of Movies and TV Shows that have recently been added!",
|
||||
Subject = "{ApplicationName}: Recently Added Content!",
|
||||
Agent = agent,
|
||||
Enabled = true,
|
||||
};
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue