Fixed a little bug in the newsletter

pull/2142/head
Jamie 7 years ago
parent 9bd545c736
commit 848ddbdbf0

@ -111,7 +111,7 @@ namespace Ombi.Schedule.Jobs.Ombi
}
}
if (!test)
{
// Get the users to send it to
@ -259,19 +259,11 @@ namespace Ombi.Schedule.Jobs.Ombi
var ordered = plexContentToSend.OrderByDescending(x => x.AddedAt);
foreach (var content in ordered)
{
if (content.TheMovieDbId.IsNullOrEmpty())
int.TryParse(content.TheMovieDbId, out var movieDbId);
if (movieDbId <= 0)
{
// Maybe we should try the ImdbId?
if (content.ImdbId.HasValue())
{
var findResult = await _movieApi.Find(content.ImdbId, ExternalSource.imdb_id);
var movieId = findResult.movie_results?[0]?.id ?? 0;
content.TheMovieDbId = movieId.ToString();
}
continue;
}
int.TryParse(content.TheMovieDbId, out var movieDbId);
var info = await _movieApi.GetMovieInformationWithExtraInfo(movieDbId);
if (info == null)
{

@ -67,11 +67,27 @@ namespace Ombi
}
}
DeleteSchedulesDb();
Console.WriteLine($"We are running on {urlValue}");
BuildWebHost(args).Run();
}
private static void DeleteSchedulesDb()
{
try
{
if (File.Exists("Schedules.db"))
{
File.Delete("Schedules.db");
}
}
catch (Exception)
{
}
}
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
@ -98,9 +114,9 @@ namespace Ombi
" Use \"*\" to indicate that the server should listen for requests on any IP address or hostname using the specified port and protocol (for example, http://*:5000). " +
"The protocol (http:// or https://) must be included with each URL. Supported formats vary between servers.", Default = "http://*:5000")]
public string Host { get; set; }
[Option("storage", Required = false, HelpText = "Storage path, where we save the logs and database")]
public string StoragePath { get; set; }
}
}

@ -68,7 +68,6 @@ O:::::::OOO:::::::Om::::m m::::m m::::mb:::::bbbbbb::::::bi::::::i
<link rel="apple-touch-icon" sizes="180x180" href="~/images/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="~/images/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="~/images/favicon/favicon-16x16.png">
<link rel="manifest" href="~/images/favicon/site.webmanifest">
<link rel="mask-icon" href="~/images/favicon/safari-pinned-tab.svg" color="#df691a">
<link rel="shortcut icon" href="~/images/favicon/favicon.ico">
<meta name="msapplication-TileColor" content="#df691a">

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save