Skip to content

Commit

Permalink
Logging for AutoId for movies
Browse files Browse the repository at this point in the history
  • Loading branch information
SirSparkles committed Jun 9, 2023
1 parent 5c7d83f commit 9ded233
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions TVRename/TVRename/PossibleNewMovie.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public void GuessMovie(bool showErrorMsgBox)
if (tmdbCode.HasValue)
{
SetId(tmdbCode.Value, TVDoc.ProviderType.TMDB);
Logger.Info($"BULK ADD AUTO ID: identified {Name} ({movieFile.Name}) based on TMDB = {tmdbId} which validated to {tmdbCode}");
return;
}

Expand All @@ -86,6 +87,7 @@ public void GuessMovie(bool showErrorMsgBox)
{
SetId(s.TmdbCode, TVDoc.ProviderType.TMDB);
imdbCodeInternal = imdbToTest;
Logger.Info($"BULK ADD AUTO ID: identified {Name} ({movieFile.Name}) based on IMDB = {imdbToTest} which we looked up to get {s.TmdbCode}");
return;
}
}
Expand All @@ -95,6 +97,7 @@ public void GuessMovie(bool showErrorMsgBox)
if (ser != null)
{
SetId(ser.TmdbCode, TVDoc.ProviderType.TMDB);
Logger.Info($"BULK ADD AUTO ID: identified {Name} ({movieFile.Name}) based on Name = {RefinedHint} which we looked up to get {ser.TmdbCode}");
return;
}

Expand All @@ -103,6 +106,7 @@ public void GuessMovie(bool showErrorMsgBox)
if (ser != null)
{
SetId(ser.TmdbCode, TVDoc.ProviderType.TMDB);
Logger.Info($"BULK ADD AUTO ID: identified {Name} ({movieFile.Name}) based on Name = {RefinedHint}({PossibleYear}) which we looked up to get {ser.TmdbCode}");
return;
}

Expand All @@ -113,6 +117,7 @@ public void GuessMovie(bool showErrorMsgBox)
CachedMovieInfo? s2 = TMDB.LocalCache.Instance.LookupMovieByTvdb(tvdbId.Value, preferredLocale);
if (s2 != null)
{
Logger.Info($"BULK ADD AUTO ID: identified {Name} ({movieFile.Name}) based on TVDB = {tvdbId}({PossibleYear}) which we looked up to get {s2.TmdbCode}");
SetId(s2.TmdbCode, TVDoc.ProviderType.TMDB);
}
else
Expand All @@ -121,6 +126,7 @@ public void GuessMovie(bool showErrorMsgBox)
CachedMovieInfo? s3 = TheTVDB.LocalCache.Instance.GetMovieAndDownload(this, preferredLocale, showErrorMsgBox);
if (s3 != null)
{
Logger.Info($"BULK ADD AUTO ID: identified {Name} ({movieFile.Name}) based on TVDB(s3) = {tvdbId}({PossibleYear}) which we looked up to get {s3.TmdbCode}");
SetId(s3.TvdbCode, TVDoc.ProviderType.TheTVDB);
}
}
Expand Down

0 comments on commit 9ded233

Please sign in to comment.