#1802 and other small fixes

pull/1805/head
tidusjar 7 years ago
parent 152189213d
commit 40e732de27

@ -285,7 +285,7 @@ namespace Ombi.Core.Senders
settings.ApiKey, settings.FullUri);
Logger.LogDebug("Added the show (tvdbid) {0}. The result is '{2}' : '{3}'", tvdbid, addResult.result, addResult.message);
if (addResult.result.Equals("failure"))
if (addResult.result.Equals("failure") || addResult.result.Equals("fatal"))
{
// Do something
return false;

@ -48,12 +48,9 @@ namespace Ombi.Notifications
Body = body.ToMessageBody(),
Subject = model.Subject
};
message.From.Add(new MailboxAddress(settings.SenderAddress, settings.SenderAddress));
message.From.Add(new MailboxAddress(string.IsNullOrEmpty(settings.SenderName) ? settings.SenderAddress : settings.SenderName, settings.SenderAddress));
message.To.Add(new MailboxAddress(model.To, model.To));
using (var client = new SmtpClient())
{
if (settings.DisableCertificateChecking)

@ -77,15 +77,14 @@ namespace Ombi.Schedule.Jobs.Plex
try
{
await StartTheCache(plexSettings);
Logger.LogInformation("Starting EP Cacher");
BackgroundJob.Enqueue(() => EpisodeSync.Start());
}
catch (Exception e)
{
Logger.LogWarning(LoggingEvents.Cacher, e, "Exception thrown when attempting to cache the Plex Content");
}
Logger.LogInformation("Starting EP Cacher");
BackgroundJob.Enqueue(() => EpisodeSync.Start());
}
private async Task StartTheCache(PlexSettings plexSettings)

@ -104,7 +104,7 @@ export class RequestService extends ServiceHelpers {
public approveChild(child: ITvUpdateModel): Observable<IRequestEngineResult> {
return this.http.post<IRequestEngineResult>(`${this.url}tv/approve`, JSON.stringify(child), {headers: this.headers});
}
public deleteChild(child: IChildRequests): Observable<any> {
return this.http.delete(`${this.url}tv/child/${child.id}`, {headers: this.headers});
public deleteChild(child: IChildRequests): Observable<boolean> {
return this.http.delete<boolean>(`${this.url}tv/child/${child.id}`, {headers: this.headers});
}
}

@ -284,9 +284,10 @@ namespace Ombi.Controllers
/// <param name="requestId">The model.</param>
/// <returns></returns>
[HttpDelete("tv/child/{requestId:int}")]
public async Task DeleteChildRequest(int requestId)
public async Task<bool> DeleteChildRequest(int requestId)
{
await TvRequestEngine.RemoveTvChild(requestId);
return true;
}

Loading…
Cancel
Save