");
+ TableData(sb);
+
+ Href(sb, $"https://www.imdb.com/title/{info.ImdbId}/");
+ Header(sb, 3, $"{info.Title} {info.ReleaseDate ?? string.Empty}");
+ EndTag(sb, "a");
+
+ if (info.Genres.Any())
+ {
+ AddParagraph(sb,
+ $"Genre: {string.Join(", ", info.Genres.Select(x => x.Name.ToString()).ToArray())}");
+ }
+
+ AddParagraph(sb, info.Overview);
+ }
+
private async Task ProcessPlexTv(IQueryable plexContent, StringBuilder sb)
{
var orderedTv = plexContent.OrderByDescending(x => x.AddedAt);
diff --git a/src/Ombi.Store/Context/OmbiContext.cs b/src/Ombi.Store/Context/OmbiContext.cs
index 31b879d11..e4c9be516 100644
--- a/src/Ombi.Store/Context/OmbiContext.cs
+++ b/src/Ombi.Store/Context/OmbiContext.cs
@@ -119,7 +119,10 @@ namespace Ombi.Store.Context
var roles = Roles.Where(x => x.Name == OmbiRoles.RecievesNewsletter);
if (!roles.Any())
{
- Roles.Add(new IdentityRole(OmbiRoles.RecievesNewsletter));
+ Roles.Add(new IdentityRole(OmbiRoles.RecievesNewsletter)
+ {
+ NormalizedName = OmbiRoles.RecievesNewsletter.ToUpper()
+ });
}
//Check if templates exist
var templates = NotificationTemplates.ToList();
@@ -143,7 +146,7 @@ namespace Ombi.Store.Context
notificationToAdd = new NotificationTemplates
{
NotificationType = notificationType,
- Message = "Hello! The user '{RequestedUser}' has requested the {Type} '{Title}'! Please log in to approve this request. Request Date: {RequestedDate}",
+ Message = "Hello! The user '{UserName}' has requested the {Type} '{Title}'! Please log in to approve this request. Request Date: {RequestedDate}",
Subject = "{ApplicationName}: New {Type} request for {Title}!",
Agent = agent,
Enabled = true,
@@ -153,7 +156,7 @@ namespace Ombi.Store.Context
notificationToAdd = new NotificationTemplates
{
NotificationType = notificationType,
- Message = "Hello! The user '{IssueUser}' has reported a new issue for the title {Title}! {IssueCategory} - {IssueSubject} : {IssueDescription}",
+ Message = "Hello! The user '{UserName}' has reported a new issue for the title {Title}! {IssueCategory} - {IssueSubject} : {IssueDescription}",
Subject = "{ApplicationName}: New issue for {Title}!",
Agent = agent,
Enabled = true,
@@ -163,7 +166,7 @@ namespace Ombi.Store.Context
notificationToAdd = new NotificationTemplates
{
NotificationType = notificationType,
- Message = "Hello! You requested {Title} on {ApplicationName}! This is now available! :)",
+ Message = "Hello! You {Title} on {ApplicationName}! This is now available! :)",
Subject = "{ApplicationName}: {Title} is now available!",
Agent = agent,
Enabled = true,
@@ -207,7 +210,7 @@ namespace Ombi.Store.Context
notificationToAdd = new NotificationTemplates
{
NotificationType = notificationType,
- Message = "Hello {IssueUser} Your issue for {Title} has now been resolved.",
+ Message = "Hello {UserName} Your issue for {Title} has now been resolved.",
Subject = "{ApplicationName}: Issue has been resolved for {Title}!",
Agent = agent,
Enabled = true,
diff --git a/src/Ombi/ClientApp/app/search/tvsearch.component.ts b/src/Ombi/ClientApp/app/search/tvsearch.component.ts
index 6f05f2b51..aa3cf20db 100644
--- a/src/Ombi/ClientApp/app/search/tvsearch.component.ts
+++ b/src/Ombi/ClientApp/app/search/tvsearch.component.ts
@@ -129,7 +129,6 @@ export class TvSearchComponent implements OnInit {
public getExtraInfo() {
this.tvResults.forEach((val, index) => {
-
this.imageService.getTvBanner(val.data.id).subscribe(x => {
val.data.background = this.sanitizer.
diff --git a/src/Ombi/ClientApp/app/services/job.service.ts b/src/Ombi/ClientApp/app/services/job.service.ts
index 94d73ec7e..79957af97 100644
--- a/src/Ombi/ClientApp/app/services/job.service.ts
+++ b/src/Ombi/ClientApp/app/services/job.service.ts
@@ -38,4 +38,8 @@ export class JobService extends ServiceHelpers {
public runEmbyCacher(): Observable {
return this.http.post(`${this.url}embycontentcacher/`, {headers: this.headers});
}
+
+ public runNewsletter(): Observable {
+ return this.http.post(`${this.url}newsletter/`, {headers: this.headers});
+ }
}
diff --git a/src/Ombi/ClientApp/app/settings/notifications/newsletter.component.html b/src/Ombi/ClientApp/app/settings/notifications/newsletter.component.html
index b6e35ab23..9560cd333 100644
--- a/src/Ombi/ClientApp/app/settings/notifications/newsletter.component.html
+++ b/src/Ombi/ClientApp/app/settings/notifications/newsletter.component.html
@@ -30,14 +30,18 @@
+
+
- NOTE: Please see the tooltip on the Update Database button.
- When testing, the test newsletter will go to all users that have the Admin role, please ensure that there are valid email addresses for this. The test will also only grab the latest 10 movies and 10 shows just to give you an example.
-
+
+ NOTE: Please see the tooltip on the Update Database button - Please see the wiki for more information
+
+
+ When testing, the test newsletter will go to all users that have the Admin role, please ensure that there are valid email addresses for this. The test will also only grab the latest 10 movies and 10 shows just to give you an example.
diff --git a/src/Ombi/ClientApp/app/settings/notifications/newsletter.component.ts b/src/Ombi/ClientApp/app/settings/notifications/newsletter.component.ts
index 9c91cab10..2716b4604 100644
--- a/src/Ombi/ClientApp/app/settings/notifications/newsletter.component.ts
+++ b/src/Ombi/ClientApp/app/settings/notifications/newsletter.component.ts
@@ -1,9 +1,9 @@
-
+import { } from './../../services/job.service';
+
import { Component, OnInit } from "@angular/core";
import { INewsletterNotificationSettings, NotificationType } from "../../interfaces";
-import { NotificationService } from "../../services";
-import { SettingsService } from "../../services";
+import { JobService, NotificationService, SettingsService } from "../../services";
import { TesterService } from "./../../services/applications/tester.service";
@Component({
@@ -16,7 +16,8 @@ export class NewsletterComponent implements OnInit {
constructor(private settingsService: SettingsService,
private notificationService: NotificationService,
- private testService: TesterService) { }
+ private testService: TesterService,
+ private jobService: JobService) { }
public ngOnInit() {
this.settingsService.getNewsletterSettings().subscribe(x => {
@@ -26,10 +27,17 @@ export class NewsletterComponent implements OnInit {
public updateDatabase() {
this.settingsService.updateNewsletterDatabase().subscribe();
+ this.notificationService.success("Database updated");
}
public test() {
this.testService.newsletterTest(this.settings).subscribe();
+ this.notificationService.success("Test message queued");
+ }
+
+ public trigger() {
+ this.jobService.runNewsletter().subscribe();
+ this.notificationService.success("Triggered newsletter job");
}
public onSubmit() {
diff --git a/src/Ombi/ClientApp/styles/_imports.scss b/src/Ombi/ClientApp/styles/_imports.scss
index 852ffce37..09da286f8 100644
--- a/src/Ombi/ClientApp/styles/_imports.scss
+++ b/src/Ombi/ClientApp/styles/_imports.scss
@@ -1 +1,2 @@
-@import './styles.scss';
\ No newline at end of file
+@import './styles.scss';
+@import './scrollbar.scss';
\ No newline at end of file
diff --git a/src/Ombi/ClientApp/styles/scrollbar.scss b/src/Ombi/ClientApp/styles/scrollbar.scss
new file mode 100644
index 000000000..a384ff9c1
--- /dev/null
+++ b/src/Ombi/ClientApp/styles/scrollbar.scss
@@ -0,0 +1,23 @@
+::-webkit-scrollbar {
+ width: 15px;
+}
+
+::-webkit-scrollbar-track {
+ background-color: rgba(0,0,0,.2);
+}
+
+::-webkit-scrollbar-thumb {
+ min-height: 50px;
+ background-color: rgba(255,255,255,.15);
+ border: 3px solid transparent;
+ border-radius: 8px;
+ background-clip: padding-box;
+}
+
+pre::-webkit-scrollbar-track {
+ background-color: rgba(255,255,255,.2);
+}
+
+pre::-webkit-scrollbar-thumb {
+ background-color: rgba(0,0,0,.15);
+}
diff --git a/src/Ombi/Controllers/JobController.cs b/src/Ombi/Controllers/JobController.cs
index 5d2b3a5e9..76ca42c41 100644
--- a/src/Ombi/Controllers/JobController.cs
+++ b/src/Ombi/Controllers/JobController.cs
@@ -20,7 +20,7 @@ namespace Ombi.Controllers
{
public JobController(IOmbiAutomaticUpdater updater, IPlexUserImporter userImporter,
ICacheService mem, IEmbyUserImporter embyImporter, IPlexContentSync plexContentSync,
- IEmbyContentSync embyContentSync)
+ IEmbyContentSync embyContentSync, INewsletterJob newsletter)
{
_updater = updater;
_plexUserImporter = userImporter;
@@ -28,6 +28,7 @@ namespace Ombi.Controllers
_memCache = mem;
_plexContentSync = plexContentSync;
_embyContentSync = embyContentSync;
+ _newsletterJob = newsletter;
}
private readonly IOmbiAutomaticUpdater _updater;
@@ -36,6 +37,7 @@ namespace Ombi.Controllers
private readonly ICacheService _memCache;
private readonly IPlexContentSync _plexContentSync;
private readonly IEmbyContentSync _embyContentSync;
+ private readonly INewsletterJob _newsletterJob;
///
/// Runs the update job
@@ -129,5 +131,16 @@ namespace Ombi.Controllers
BackgroundJob.Enqueue(() => _embyContentSync.Start());
return true;
}
+
+ ///
+ /// Runs the newsletter
+ ///
+ ///
+ [HttpPost("newsletter")]
+ public bool StartNewsletter()
+ {
+ BackgroundJob.Enqueue(() => _newsletterJob.Start());
+ return true;
+ }
}
}
\ No newline at end of file
diff --git a/src/Ombi/Startup.cs b/src/Ombi/Startup.cs
index d92650d85..3e76ccab0 100644
--- a/src/Ombi/Startup.cs
+++ b/src/Ombi/Startup.cs
@@ -165,6 +165,12 @@ namespace Ombi
var ombiService =
app.ApplicationServices.GetService>();
var settings = ombiService.GetSettings();
+ if (settings.ApiKey.IsNullOrEmpty())
+ {
+ // Generate a API Key
+ settings.ApiKey = Guid.NewGuid().ToString("N");
+ ombiService.SaveSettings(settings);
+ }
if (settings.BaseUrl.HasValue())
{
app.UsePathBase(settings.BaseUrl);
diff --git a/src/Ombi/wwwroot/images/favicon/android-icon-144x144.png b/src/Ombi/wwwroot/images/favicon/android-icon-144x144.png
index b37bc4d30..cfe4f838f 100644
Binary files a/src/Ombi/wwwroot/images/favicon/android-icon-144x144.png and b/src/Ombi/wwwroot/images/favicon/android-icon-144x144.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/android-icon-192x192.png b/src/Ombi/wwwroot/images/favicon/android-icon-192x192.png
index 417f11658..66834b472 100644
Binary files a/src/Ombi/wwwroot/images/favicon/android-icon-192x192.png and b/src/Ombi/wwwroot/images/favicon/android-icon-192x192.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/android-icon-36x36.png b/src/Ombi/wwwroot/images/favicon/android-icon-36x36.png
index fa3c06262..215339d90 100644
Binary files a/src/Ombi/wwwroot/images/favicon/android-icon-36x36.png and b/src/Ombi/wwwroot/images/favicon/android-icon-36x36.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/android-icon-48x48.png b/src/Ombi/wwwroot/images/favicon/android-icon-48x48.png
index eb4292ec8..9d425f81f 100644
Binary files a/src/Ombi/wwwroot/images/favicon/android-icon-48x48.png and b/src/Ombi/wwwroot/images/favicon/android-icon-48x48.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/android-icon-72x72.png b/src/Ombi/wwwroot/images/favicon/android-icon-72x72.png
index f3b06552a..3876d051a 100644
Binary files a/src/Ombi/wwwroot/images/favicon/android-icon-72x72.png and b/src/Ombi/wwwroot/images/favicon/android-icon-72x72.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/android-icon-96x96.png b/src/Ombi/wwwroot/images/favicon/android-icon-96x96.png
index f573f633c..c8e26d722 100644
Binary files a/src/Ombi/wwwroot/images/favicon/android-icon-96x96.png and b/src/Ombi/wwwroot/images/favicon/android-icon-96x96.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/apple-icon-114x114.png b/src/Ombi/wwwroot/images/favicon/apple-icon-114x114.png
index c18c3d66b..a8fa6f81f 100644
Binary files a/src/Ombi/wwwroot/images/favicon/apple-icon-114x114.png and b/src/Ombi/wwwroot/images/favicon/apple-icon-114x114.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/apple-icon-120x120.png b/src/Ombi/wwwroot/images/favicon/apple-icon-120x120.png
index 4cd706318..5ea108611 100644
Binary files a/src/Ombi/wwwroot/images/favicon/apple-icon-120x120.png and b/src/Ombi/wwwroot/images/favicon/apple-icon-120x120.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/apple-icon-144x144.png b/src/Ombi/wwwroot/images/favicon/apple-icon-144x144.png
index b37bc4d30..cfe4f838f 100644
Binary files a/src/Ombi/wwwroot/images/favicon/apple-icon-144x144.png and b/src/Ombi/wwwroot/images/favicon/apple-icon-144x144.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/apple-icon-152x152.png b/src/Ombi/wwwroot/images/favicon/apple-icon-152x152.png
index 6bc39c989..df70d578e 100644
Binary files a/src/Ombi/wwwroot/images/favicon/apple-icon-152x152.png and b/src/Ombi/wwwroot/images/favicon/apple-icon-152x152.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/apple-icon-180x180.png b/src/Ombi/wwwroot/images/favicon/apple-icon-180x180.png
index b063d735d..a917d113c 100644
Binary files a/src/Ombi/wwwroot/images/favicon/apple-icon-180x180.png and b/src/Ombi/wwwroot/images/favicon/apple-icon-180x180.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/apple-icon-57x57.png b/src/Ombi/wwwroot/images/favicon/apple-icon-57x57.png
index b03b6d120..cb852ffd9 100644
Binary files a/src/Ombi/wwwroot/images/favicon/apple-icon-57x57.png and b/src/Ombi/wwwroot/images/favicon/apple-icon-57x57.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/apple-icon-60x60.png b/src/Ombi/wwwroot/images/favicon/apple-icon-60x60.png
index 135e74806..7aeeb1243 100644
Binary files a/src/Ombi/wwwroot/images/favicon/apple-icon-60x60.png and b/src/Ombi/wwwroot/images/favicon/apple-icon-60x60.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/apple-icon-72x72.png b/src/Ombi/wwwroot/images/favicon/apple-icon-72x72.png
index f3b06552a..3876d051a 100644
Binary files a/src/Ombi/wwwroot/images/favicon/apple-icon-72x72.png and b/src/Ombi/wwwroot/images/favicon/apple-icon-72x72.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/apple-icon-76x76.png b/src/Ombi/wwwroot/images/favicon/apple-icon-76x76.png
index 947ebd0f6..32826bd09 100644
Binary files a/src/Ombi/wwwroot/images/favicon/apple-icon-76x76.png and b/src/Ombi/wwwroot/images/favicon/apple-icon-76x76.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/apple-icon-precomposed.png b/src/Ombi/wwwroot/images/favicon/apple-icon-precomposed.png
index 417f11658..7fb80052d 100644
Binary files a/src/Ombi/wwwroot/images/favicon/apple-icon-precomposed.png and b/src/Ombi/wwwroot/images/favicon/apple-icon-precomposed.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/apple-icon.png b/src/Ombi/wwwroot/images/favicon/apple-icon.png
index 417f11658..7fb80052d 100644
Binary files a/src/Ombi/wwwroot/images/favicon/apple-icon.png and b/src/Ombi/wwwroot/images/favicon/apple-icon.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/favicon-16x16.png b/src/Ombi/wwwroot/images/favicon/favicon-16x16.png
index d95ca06da..7dfea78a5 100644
Binary files a/src/Ombi/wwwroot/images/favicon/favicon-16x16.png and b/src/Ombi/wwwroot/images/favicon/favicon-16x16.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/favicon-32x32.png b/src/Ombi/wwwroot/images/favicon/favicon-32x32.png
index 4be616622..c3853b662 100644
Binary files a/src/Ombi/wwwroot/images/favicon/favicon-32x32.png and b/src/Ombi/wwwroot/images/favicon/favicon-32x32.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/favicon-96x96.png b/src/Ombi/wwwroot/images/favicon/favicon-96x96.png
index f573f633c..c8e26d722 100644
Binary files a/src/Ombi/wwwroot/images/favicon/favicon-96x96.png and b/src/Ombi/wwwroot/images/favicon/favicon-96x96.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/favicon.ico b/src/Ombi/wwwroot/images/favicon/favicon.ico
index efc681af1..62b406080 100644
Binary files a/src/Ombi/wwwroot/images/favicon/favicon.ico and b/src/Ombi/wwwroot/images/favicon/favicon.ico differ
diff --git a/src/Ombi/wwwroot/images/favicon/ms-icon-144x144.png b/src/Ombi/wwwroot/images/favicon/ms-icon-144x144.png
index b37bc4d30..cfe4f838f 100644
Binary files a/src/Ombi/wwwroot/images/favicon/ms-icon-144x144.png and b/src/Ombi/wwwroot/images/favicon/ms-icon-144x144.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/ms-icon-150x150.png b/src/Ombi/wwwroot/images/favicon/ms-icon-150x150.png
index 35f2f5efd..7664f1729 100644
Binary files a/src/Ombi/wwwroot/images/favicon/ms-icon-150x150.png and b/src/Ombi/wwwroot/images/favicon/ms-icon-150x150.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/ms-icon-310x310.png b/src/Ombi/wwwroot/images/favicon/ms-icon-310x310.png
index 62cad4e68..fc6ffd626 100644
Binary files a/src/Ombi/wwwroot/images/favicon/ms-icon-310x310.png and b/src/Ombi/wwwroot/images/favicon/ms-icon-310x310.png differ
diff --git a/src/Ombi/wwwroot/images/favicon/ms-icon-70x70.png b/src/Ombi/wwwroot/images/favicon/ms-icon-70x70.png
index 9d0d96bec..78e6bb882 100644
Binary files a/src/Ombi/wwwroot/images/favicon/ms-icon-70x70.png and b/src/Ombi/wwwroot/images/favicon/ms-icon-70x70.png differ