#1460 looks like the permissions issue has been resolved. Just need to make sure the Ombi process is terminated.

Also fixed that we were not sending email notifications to users when something was available.
This commit is contained in:
Jamie.Rees 2017-10-18 11:46:59 +01:00
parent 22a0e92b63
commit c58cb4dbe1
6 changed files with 22 additions and 9 deletions

View file

@ -57,7 +57,7 @@ namespace Ombi.Notifications.Agents
{
Message = html,
Subject = parsed.Subject,
To = settings.AdminEmail,
To = model.Recipient.HasValue() ? model.Recipient : settings.AdminEmail,
};
return message;

View file

@ -11,5 +11,6 @@ namespace Ombi.Notifications.Models
public DateTime DateTime { get; set; } = DateTime.Now;
public NotificationType NotificationType { get; set; }
public RequestType RequestType { get; set; }
public string Recipient { get; set; }
}
}

View file

@ -82,7 +82,8 @@ namespace Ombi.Schedule.Jobs.Emby
DateTime = DateTime.Now,
NotificationType = NotificationType.RequestAvailable,
RequestId = movie.Id,
RequestType = RequestType.Movie
RequestType = RequestType.Movie,
Recipient = movie.RequestedUser.Email,
}));
}
}
@ -130,7 +131,8 @@ namespace Ombi.Schedule.Jobs.Emby
DateTime = DateTime.Now,
NotificationType = NotificationType.RequestAvailable,
RequestId = child.ParentRequestId,
RequestType = RequestType.TvShow
RequestType = RequestType.TvShow,
Recipient = child.RequestedUser.Email,
}));
}
}

View file

@ -71,7 +71,8 @@ namespace Ombi.Schedule.Jobs.Plex
DateTime = DateTime.Now,
NotificationType = NotificationType.RequestAvailable,
RequestId = child.ParentRequestId,
RequestType = RequestType.TvShow
RequestType = RequestType.TvShow,
Recipient = child.RequestedUser.Email
}));
}
}
@ -101,7 +102,8 @@ namespace Ombi.Schedule.Jobs.Plex
DateTime = DateTime.Now,
NotificationType = NotificationType.RequestAvailable,
RequestId = movie.Id,
RequestType = RequestType.Movie
RequestType = RequestType.Movie,
Recipient = movie.RequestedUser.Email
}));
}
}

View file

@ -5,6 +5,7 @@ using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
namespace Ombi.Updater
{
@ -18,9 +19,16 @@ namespace Ombi.Updater
// Make sure the process has been killed
if (p.FindProcessByName("Ombi").Any())
while (p.FindProcessByName("Ombi").Any())
{
// throw
Console.WriteLine("Found another process called Ombi, KILLING!");
var proc = p.FindProcessByName("Ombi").FirstOrDefault();
if (proc != null)
{
Console.WriteLine($"[{proc.Id}] - {proc.Name} - Path: {proc.StartPath}");
p.Kill(proc.Id);
}
Thread.Sleep(500);
}
MoveFiles(options);

View file

@ -24,12 +24,12 @@
<small>If you are getting any permissions issues, you can specify a user for the update process to run under.</small>
<div class="form-group">
<input type="text" id="username" formControlName="username">
<input type="text" id="username" class="form-control form-control-custom" formControlName="username">
<label for="username">Username</label>
</div>
<div class="form-group">
<input type="password" id="password" formControlName="password">
<input type="password" id="password" class="form-control form-control-custom" formControlName="password">
<label for="password">Password</label>
</div>