aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/MediaSourceManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Library/MediaSourceManager.cs')
-rw-r--r--Emby.Server.Implementations/Library/MediaSourceManager.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Library/MediaSourceManager.cs b/Emby.Server.Implementations/Library/MediaSourceManager.cs
index 0adc5553b..1ed838893 100644
--- a/Emby.Server.Implementations/Library/MediaSourceManager.cs
+++ b/Emby.Server.Implementations/Library/MediaSourceManager.cs
@@ -469,7 +469,7 @@ namespace Emby.Server.Implementations.Library
}
// TODO: Don't hardcode this
- var isAudio = false;
+ const bool isAudio = false;
try
{
@@ -480,9 +480,11 @@ namespace Emby.Server.Implementations.Library
else
{
// hack - these two values were taken from LiveTVMediaSourceProvider
- var cacheKey = request.OpenToken;
+ string cacheKey = request.OpenToken;
- await new LiveStreamHelper(_mediaEncoder(), _logger, _jsonSerializer, _appPaths).AddMediaInfoWithProbe(mediaSource, isAudio, cacheKey, true, cancellationToken).ConfigureAwait(false);
+ await new LiveStreamHelper(_mediaEncoder(), _logger, _jsonSerializer, _appPaths)
+ .AddMediaInfoWithProbe(mediaSource, isAudio, cacheKey, true, cancellationToken)
+ .ConfigureAwait(false);
}
}
catch (Exception ex)
@@ -491,6 +493,7 @@ namespace Emby.Server.Implementations.Library
AddMediaInfo(mediaSource, isAudio);
}
+ // TODO: @bond Fix
var json = _jsonSerializer.SerializeToString(mediaSource);
_logger.LogInformation("Live stream opened: " + json);
var clone = _jsonSerializer.DeserializeFromString<MediaSourceInfo>(json);