From 07124e84adcbe3de8e35b2965ed8665a23e24841 Mon Sep 17 00:00:00 2001 From: Florian Dupret <34862846+sephrat@users.noreply.github.com> Date: Wed, 19 Jan 2022 13:40:46 +0100 Subject: [PATCH] Better logging when an item is not published --- src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs b/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs index b55056158..59aabe873 100644 --- a/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs +++ b/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs @@ -502,12 +502,14 @@ namespace Ombi.Schedule.Jobs.Ombi int.TryParse(content.TheMovieDbId, out var movieDbId); if (movieDbId <= 0) { + _log.LogWarning($"{content.Title} does not have a TMDB ID, it won't be published."); continue; } var info = await _movieApi.GetMovieInformationWithExtraInfo(movieDbId, defaultLanguageCode); var mediaurl = content.Url; if (info == null) { + _log.LogWarning($"TMDB does not know movie {content.Title}, it won't be published."); continue; } try @@ -671,6 +673,8 @@ namespace Ombi.Schedule.Jobs.Ombi var externals = await _movieApi.GetTvExternals(movieId); if (externals == null || externals.tvdb_id <= 0) { + // needed later for recently added log + _log.LogWarning($"{t.Title} has no TVDB ID, it won't be published."); continue; } t.TvDbId = externals.tvdb_id.ToString(); @@ -694,6 +698,7 @@ namespace Ombi.Schedule.Jobs.Ombi var tvInfo = await _movieApi.GetTVInfo(t.TheMovieDbId, languageCode); if (tvInfo == null) { + _log.LogWarning($"TMDB does not know series {t.Title}, it won't be published."); continue; }