Skip to content

Commit

Permalink
Fix loggor placeholder (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
danny50610 authored Jul 29, 2024
1 parent 5a43291 commit cc5a238
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public virtual async Task<MetadataResult<T>> GetMetadata(E info, CancellationTok
var id = GetYTID(info.Path);
if (string.IsNullOrWhiteSpace(id))
{
_logger.LogInformation("YTDL GetMetadata: Youtube ID not found in filename of title: {info.Name}", info.Name);
_logger.LogInformation("YTDL GetMetadata: Youtube ID not found in filename of title: {Name}", info.Name);
result.HasMetadata = false;
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal async override Task GetAndCacheMetadata(
IServerApplicationPaths appPaths,
CancellationToken cancellationToken)
{
_logger.LogDebug("YTDLEpisodeProvider: GetAndCacheMetadata ", id);
_logger.LogDebug("YTDLEpisodeProvider: GetAndCacheMetadata {Id}", id);
await Utils.YTDLMetadata(id, appPaths, cancellationToken);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ public async Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, Cancell
var id = Utils.GetYTID(item.FileNameWithoutExtension);
if (string.IsNullOrWhiteSpace(id))
{
_logger.LogDebug("YTDLImage GetImages: Youtube ID not found in filename of title: {item.Name}", item.Name);
_logger.LogDebug("YTDLImage GetImages: Youtube ID not found in filename of title: {Name}", item.Name);
return result;
}
var ytPath = Utils.GetVideoInfoPath(_config.ApplicationPaths, id);
var fileInfo = _fileSystem.GetFileSystemInfo(ytPath);
if (!(Utils.IsFresh(fileInfo)))
{
_logger.LogDebug("YTDLImage GetImages: {item.Name} is not fresh.", item.Name);
_logger.LogDebug("YTDLImage GetImages: {Name} is not fresh.", item.Name);
await Utils.YTDLMetadata(id, _config.ApplicationPaths, cancellationToken);
}
var path = Utils.GetVideoInfoPath(_config.ApplicationPaths, id);
Expand All @@ -96,7 +96,7 @@ public async Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, Cancell
/// <returns></returns>
public async Task<HttpResponseMessage> GetImageResponse(string url, CancellationToken cancellationToken)
{
_logger.LogDebug("YTDLImage GetImages: GetImageResponse ", url);
_logger.LogDebug("YTDLImage GetImages: GetImageResponse {Url}", url);
var httpClient = Plugin.Instance.GetHttpClient();
return await httpClient.GetAsync(url, cancellationToken).ConfigureAwait(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public async Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, Cancell
var name = item.Name;
if (string.IsNullOrWhiteSpace(name))
{
_logger.LogDebug("YTDLSeriesImage GetImages: Youtube ID not found in Item: {item.Name}", item.Name);
_logger.LogDebug("YTDLSeriesImage GetImages: Youtube ID not found in Item: {Name}", item.Name);
return result;
}
var ytPath = Utils.GetVideoInfoPath(_config.ApplicationPaths, name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public override async Task<MetadataResult<Series>> GetMetadata(SeriesInfo info,
var name = info.Name;
if (string.IsNullOrWhiteSpace(name))
{
_logger.LogDebug("YTDLSeries GetMetadata: No name found for media: ", info.Path);
_logger.LogDebug("YTDLSeries GetMetadata: No name found for media: {Path}", info.Path);
result.HasMetadata = false;
return result;
}
Expand All @@ -51,7 +51,7 @@ public override async Task<MetadataResult<Series>> GetMetadata(SeriesInfo info,
_logger.LogDebug("YTDLSeries GetMetadata: FileInfo: {Path} ", fileInfo.Name);
if (!IsFresh(fileInfo))
{
_logger.LogDebug("YTDLSeries GetMetadata: {info.Name} is not fresh.", fileInfo.Name);
_logger.LogDebug("YTDLSeries GetMetadata: {Name} is not fresh.", fileInfo.Name);
await this.GetAndCacheMetadata(name, this._config.ApplicationPaths, cancellationToken);
}
var video = ReadYTDLInfo(ytPath, cancellationToken);
Expand Down

0 comments on commit cc5a238

Please sign in to comment.