mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 13:23:20 -07:00
Fixed a little bug in the newsletter
This commit is contained in:
parent
9bd545c736
commit
848ddbdbf0
4 changed files with 896 additions and 99 deletions
|
@ -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())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
|
||||
int.TryParse(content.TheMovieDbId, out var movieDbId);
|
||||
if (movieDbId <= 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
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">
|
||||
|
|
956
src/Ombi/package-lock.json
generated
956
src/Ombi/package-lock.json
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue