mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-14 01:02:57 -07:00
#1802 and other small fixes
This commit is contained in:
parent
152189213d
commit
40e732de27
5 changed files with 9 additions and 12 deletions
|
@ -285,7 +285,7 @@ namespace Ombi.Core.Senders
|
||||||
settings.ApiKey, settings.FullUri);
|
settings.ApiKey, settings.FullUri);
|
||||||
|
|
||||||
Logger.LogDebug("Added the show (tvdbid) {0}. The result is '{2}' : '{3}'", tvdbid, addResult.result, addResult.message);
|
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
|
// Do something
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -48,12 +48,9 @@ namespace Ombi.Notifications
|
||||||
Body = body.ToMessageBody(),
|
Body = body.ToMessageBody(),
|
||||||
Subject = model.Subject
|
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));
|
message.To.Add(new MailboxAddress(model.To, model.To));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using (var client = new SmtpClient())
|
using (var client = new SmtpClient())
|
||||||
{
|
{
|
||||||
if (settings.DisableCertificateChecking)
|
if (settings.DisableCertificateChecking)
|
||||||
|
|
|
@ -77,15 +77,14 @@ namespace Ombi.Schedule.Jobs.Plex
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await StartTheCache(plexSettings);
|
await StartTheCache(plexSettings);
|
||||||
|
|
||||||
|
|
||||||
Logger.LogInformation("Starting EP Cacher");
|
|
||||||
BackgroundJob.Enqueue(() => EpisodeSync.Start());
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Logger.LogWarning(LoggingEvents.Cacher, e, "Exception thrown when attempting to cache the Plex Content");
|
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)
|
private async Task StartTheCache(PlexSettings plexSettings)
|
||||||
|
|
|
@ -104,7 +104,7 @@ export class RequestService extends ServiceHelpers {
|
||||||
public approveChild(child: ITvUpdateModel): Observable<IRequestEngineResult> {
|
public approveChild(child: ITvUpdateModel): Observable<IRequestEngineResult> {
|
||||||
return this.http.post<IRequestEngineResult>(`${this.url}tv/approve`, JSON.stringify(child), {headers: this.headers});
|
return this.http.post<IRequestEngineResult>(`${this.url}tv/approve`, JSON.stringify(child), {headers: this.headers});
|
||||||
}
|
}
|
||||||
public deleteChild(child: IChildRequests): Observable<any> {
|
public deleteChild(child: IChildRequests): Observable<boolean> {
|
||||||
return this.http.delete(`${this.url}tv/child/${child.id}`, {headers: this.headers});
|
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>
|
/// <param name="requestId">The model.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpDelete("tv/child/{requestId:int}")]
|
[HttpDelete("tv/child/{requestId:int}")]
|
||||||
public async Task DeleteChildRequest(int requestId)
|
public async Task<bool> DeleteChildRequest(int requestId)
|
||||||
{
|
{
|
||||||
await TvRequestEngine.RemoveTvChild(requestId);
|
await TvRequestEngine.RemoveTvChild(requestId);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue