From 095afe6359755db83b9263fe539b7c818c0e81b0 Mon Sep 17 00:00:00 2001 From: Erik Rigtorp Date: Wed, 10 Jun 2020 10:58:43 -0700 Subject: [PATCH] Clarify comment and log actual search string --- MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbSearch.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbSearch.cs b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbSearch.cs index 717aa4eefa..e1e34afb9b 100644 --- a/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbSearch.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbSearch.cs @@ -76,19 +76,20 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies var tmdbImageUrl = tmdbSettings.images.GetImageUrl("original"); - // TODO: Investigate: Does this mean we are reparsing already parsed ItemLookupInfo? + // ParseName is required here. + // Caller provides the filename with extension stripped and NOT the parsed filename var parsedName = _libraryManager.ParseName(name); var yearInName = parsedName.Year; name = parsedName.Name; year ??= yearInName; - _logger.LogInformation("TmdbSearch: Finding id for item: {0} ({1})", name, year); var language = idInfo.MetadataLanguage.ToLowerInvariant(); // Replace sequences of non-word characters with space // TMDB expects a space separated list of words make sure that is the case name = _cleanNonWord.Replace(name, " ").Trim(); + _logger.LogInformation("TmdbSearch: Finding id for item: {0} ({1})", name, year); var results = await GetSearchResults(name, searchType, year, language, tmdbImageUrl, cancellationToken).ConfigureAwait(false); if (results.Count == 0)