Browse Source

add some logging around playlist trimming (#1565)

pull/1567/head
Jason Dove 2 years ago committed by GitHub
parent
commit
83fc3081d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      ErsatzTV.Application/Streaming/HlsSessionWorker.cs

8
ErsatzTV.Application/Streaming/HlsSessionWorker.cs

@ -96,6 +96,8 @@ public class HlsSessionWorker : IHlsSessionWorker
return trimResult; return trimResult;
} }
_logger.LogWarning("HlsSessionWorker.TrimPlaylist read empty playlist?");
} }
finally finally
{ {
@ -107,6 +109,11 @@ public class HlsSessionWorker : IHlsSessionWorker
catch (Exception ex) when (ex is TaskCanceledException or OperationCanceledException) catch (Exception ex) when (ex is TaskCanceledException or OperationCanceledException)
{ {
// do nothing // do nothing
_logger.LogInformation("HlsSessionWorker.TrimPlaylist was canceled");
}
catch (Exception ex)
{
_logger.LogWarning(ex, "Error trimming playlist");
} }
return None; return None;
@ -572,6 +579,7 @@ public class HlsSessionWorker : IHlsSessionWorker
return await File.ReadAllLinesAsync(fileName, cancellationToken); return await File.ReadAllLinesAsync(fileName, cancellationToken);
} }
_logger.LogInformation("Playlist does not exist at expected location {File}", fileName);
return None; return None;
} }

Loading…
Cancel
Save