From 9ffb82d96a405fdb35cdd925d8ddbba716592fef Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 4 Jun 2015 00:50:10 -0400 Subject: [PATCH] remove probing of live tv feeds --- .../Connect/ConnectEntryPoint.cs | 11 ++++++++-- .../LiveTv/LiveTvMediaSourceProvider.cs | 20 ------------------- .../Localization/JavaScript/javascript.json | 1 + .../Localization/Server/server.json | 3 ++- 4 files changed, 12 insertions(+), 23 deletions(-) diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs b/MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs index 3e211d003e..6dc83bc74d 100644 --- a/MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs +++ b/MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs @@ -54,7 +54,7 @@ namespace MediaBrowser.Server.Implementations.Connect if (IsValid(address)) { - ((ConnectManager) _connectManager).OnWanAddressResolved(address); + ((ConnectManager)_connectManager).OnWanAddressResolved(address); CacheAddress(address); } } @@ -115,7 +115,14 @@ namespace MediaBrowser.Server.Implementations.Connect private bool IsValid(string address) { IPAddress ipAddress; - return IPAddress.TryParse(address, out ipAddress); + var valid = IPAddress.TryParse(address, out ipAddress); + + if (!valid) + { + _logger.Error("{0} is not a valid ip address", address); + } + + return valid; } public void Dispose() diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs index 4a9028af4e..b267324411 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs @@ -3,7 +3,6 @@ using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.MediaEncoding; -using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Logging; using MediaBrowser.Model.MediaInfo; @@ -137,25 +136,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv { var originalRuntime = mediaSource.RunTimeTicks; - var info = await _mediaEncoder.GetMediaInfo(new MediaInfoRequest - { - InputPath = mediaSource.Path, - Protocol = mediaSource.Protocol, - MediaType = isAudio ? DlnaProfileType.Audio : DlnaProfileType.Video, - ExtractChapters = false - - }, cancellationToken).ConfigureAwait(false); - - mediaSource.Bitrate = info.Bitrate; - mediaSource.Container = info.Container; - mediaSource.Formats = info.Formats; - mediaSource.MediaStreams = info.MediaStreams; - mediaSource.RunTimeTicks = info.RunTimeTicks; - mediaSource.Size = info.Size; - mediaSource.Timestamp = info.Timestamp; - mediaSource.Video3DFormat = info.Video3DFormat; - mediaSource.VideoType = info.VideoType; - mediaSource.DefaultSubtitleStreamIndex = null; // Null this out so that it will be treated like a live stream diff --git a/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json b/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json index d2815b4af5..c4100f2194 100644 --- a/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json +++ b/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json @@ -786,6 +786,7 @@ "ButtonUnlockWithSupporter": "Sign in with Emby Supporter Membership", "MessagePleaseSignInLocalNetwork": "Before proceeding, please ensure that you're connected to your local network using a Wifi or LAN connection.", "ButtonUnlockWithPurchase": "Unlock with Purchase", + "ButtonUnlockPrice": "Unlock {0}", "MessageLiveTvGuideRequiresUnlock": "The Live TV Guide is currently limited to {0} channels. Click the unlock button to learn how to enjoy the full experience.", "OptionEnableFullscreen": "Enable Fullscreen", "ButtonServer": "Server", diff --git a/MediaBrowser.Server.Implementations/Localization/Server/server.json b/MediaBrowser.Server.Implementations/Localization/Server/server.json index ea4893ebfd..f37eeed53c 100644 --- a/MediaBrowser.Server.Implementations/Localization/Server/server.json +++ b/MediaBrowser.Server.Implementations/Localization/Server/server.json @@ -1452,5 +1452,6 @@ "HeaderColumns": "Columns", "ButtonReset": "Reset", "OptionEnableExternalVideoPlayers": "Enable external video players", - "ButtonUnlockGuide": "Unlock Guide" + "ButtonUnlockGuide": "Unlock Guide", + "LabelEnableFullScreen": "Enable fullScreen mode" }