aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/LiveTv
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-18 23:25:01 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-18 23:25:01 -0500
commitd2cae4012853bb6457554516f06e5bbf11121b8d (patch)
tree7e3dbc416fc99266310635dd85b0ce7962054807 /MediaBrowser.Server.Implementations/LiveTv
parent18a9720857ec9e6cdd580b3812bb72cf864d2f20 (diff)
rework news downloading
Diffstat (limited to 'MediaBrowser.Server.Implementations/LiveTv')
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs26
1 files changed, 25 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
index 8577e7510..f62efd9da 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -229,6 +229,12 @@ namespace MediaBrowser.Server.Implementations.LiveTv
return result;
}
+ catch (Exception ex)
+ {
+ _logger.ErrorException("Error getting recording stream", ex);
+
+ throw;
+ }
finally
{
_liveStreamSemaphore.Release();
@@ -245,6 +251,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv
var channel = GetInternalChannel(id);
+ _logger.Info("Opening channel stream from {0}, external channel Id: {1}", service.Name, channel.ChannelInfo.Id);
+
var result = await service.GetChannelStream(channel.ChannelInfo.Id, cancellationToken).ConfigureAwait(false);
if (!string.IsNullOrEmpty(result.Id))
@@ -254,6 +262,12 @@ namespace MediaBrowser.Server.Implementations.LiveTv
return result;
}
+ catch (Exception ex)
+ {
+ _logger.ErrorException("Error getting channel stream", ex);
+
+ throw;
+ }
finally
{
_liveStreamSemaphore.Release();
@@ -1261,9 +1275,19 @@ namespace MediaBrowser.Server.Implementations.LiveTv
{
await _liveStreamSemaphore.WaitAsync(cancellationToken).ConfigureAwait(false);
+ var service = ActiveService;
+
+ _logger.Info("Closing live stream from {0}, stream Id: {1}", service.Name, id);
+
try
{
- await ActiveService.CloseLiveStream(id, cancellationToken).ConfigureAwait(false);
+ await service.CloseLiveStream(id, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception ex)
+ {
+ _logger.ErrorException("Error closing live stream", ex);
+
+ throw;
}
finally
{