update connect

pull/702/head
Luke Pulverenti 9 years ago
parent 9ffb82d96a
commit 7990f9ca50

@ -1768,6 +1768,12 @@ namespace MediaBrowser.Api.Playback
state.InputAudioSync = "1"; state.InputAudioSync = "1";
} }
if (string.Equals(mediaSource.Container, "wma", StringComparison.OrdinalIgnoreCase))
{
// Seeing some stuttering when transcoding wma to audio-only HLS
state.InputAudioSync = "1";
}
var mediaStreams = mediaSource.MediaStreams; var mediaStreams = mediaSource.MediaStreams;
if (videoRequest != null) if (videoRequest != null)

@ -5,5 +5,6 @@ namespace MediaBrowser.Controller.LiveTv
public interface ILiveTvItem : IHasId public interface ILiveTvItem : IHasId
{ {
string ServiceName { get; set; } string ServiceName { get; set; }
string ExternalId { get; set; }
} }
} }

@ -8,6 +8,7 @@ using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Dto; using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Providers; using MediaBrowser.Model.Providers;
using MediaBrowser.Providers.TV;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
@ -17,7 +18,6 @@ using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Xml; using System.Xml;
using MediaBrowser.Providers.TV;
namespace MediaBrowser.Providers.Music namespace MediaBrowser.Providers.Music
{ {

@ -130,7 +130,7 @@ namespace MediaBrowser.Providers.TV
{ {
var json = await reader.ReadToEndAsync().ConfigureAwait(false); var json = await reader.ReadToEndAsync().ConfigureAwait(false);
if (string.Equals(json, "null", StringComparison.OrdinalIgnoreCase)) if (string.Equals(json, "null", StringComparison.OrdinalIgnoreCase) || string.IsNullOrWhiteSpace(json))
{ {
return new List<string>(); return new List<string>();
} }

@ -1,4 +1,5 @@
using MediaBrowser.Common.Configuration; using System.Linq;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Net; using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Connect; using MediaBrowser.Controller.Connect;
using MediaBrowser.Controller.Plugins; using MediaBrowser.Controller.Plugins;
@ -38,34 +39,40 @@ namespace MediaBrowser.Server.Implementations.Connect
_timer = new Timer(TimerCallback, null, TimeSpan.FromSeconds(5), TimeSpan.FromHours(3)); _timer = new Timer(TimerCallback, null, TimeSpan.FromSeconds(5), TimeSpan.FromHours(3));
} }
private readonly string[] _ipLookups = { "http://bot.whatismyipaddress.com", "https://connect.mediabrowser.tv/service/ip" };
private async void TimerCallback(object state) private async void TimerCallback(object state)
{ {
try foreach (var ipLookupUrl in _ipLookups)
{ {
using (var stream = await _httpClient.Get(new HttpRequestOptions try
{
Url = "http://bot.whatismyipaddress.com/"
}).ConfigureAwait(false))
{ {
using (var reader = new StreamReader(stream)) using (var stream = await _httpClient.Get(new HttpRequestOptions
{ {
var address = await reader.ReadToEndAsync().ConfigureAwait(false); Url = ipLookupUrl
if (IsValid(address)) }).ConfigureAwait(false))
{
using (var reader = new StreamReader(stream))
{ {
((ConnectManager)_connectManager).OnWanAddressResolved(address); var address = await reader.ReadToEndAsync().ConfigureAwait(false);
CacheAddress(address);
if (IsValid(address))
{
((ConnectManager)_connectManager).OnWanAddressResolved(address);
CacheAddress(address);
return;
}
} }
} }
} }
} catch (HttpException)
catch (HttpException) {
{ }
} catch (Exception ex)
catch (Exception ex) {
{ _logger.ErrorException("Error getting connection info", ex);
_logger.ErrorException("Error getting connection info", ex); }
} }
} }

@ -664,6 +664,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv
var recording = (ILiveTvRecording)item; var recording = (ILiveTvRecording)item;
recording.ExternalId = info.Id;
recording.ProgramId = _tvDtoService.GetInternalProgramId(serviceName, info.ProgramId).ToString("N"); recording.ProgramId = _tvDtoService.GetInternalProgramId(serviceName, info.ProgramId).ToString("N");
recording.Audio = info.Audio; recording.Audio = info.Audio;
recording.ChannelType = info.ChannelType; recording.ChannelType = info.ChannelType;

@ -800,5 +800,6 @@
"HeaderYouSaid": "You Said...", "HeaderYouSaid": "You Said...",
"MessageWeDidntRecognizeCommand": "We're sorry, we didn't recognize that command.", "MessageWeDidntRecognizeCommand": "We're sorry, we didn't recognize that command.",
"MessageIfYouBlockedVoice": "If you denied voice access to the app you'll need to reconfigure before trying again.", "MessageIfYouBlockedVoice": "If you denied voice access to the app you'll need to reconfigure before trying again.",
"MessageNoItemsFound": "No items found." "MessageNoItemsFound": "No items found.",
"ButtonManageServer": "Manage Server"
} }

@ -90,6 +90,9 @@
<Content Include="dashboard-ui\css\images\clients\androidtv-tile.png"> <Content Include="dashboard-ui\css\images\clients\androidtv-tile.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="dashboard-ui\css\images\clients\chromecast.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="dashboard-ui\css\images\empty.png"> <Content Include="dashboard-ui\css\images\empty.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
@ -123,6 +126,9 @@
<Content Include="dashboard-ui\thirdparty\cordova\android\localassetmanager.js"> <Content Include="dashboard-ui\thirdparty\cordova\android\localassetmanager.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="dashboard-ui\thirdparty\velocity.min.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="dashboard-ui\voice\voice.css"> <Content Include="dashboard-ui\voice\voice.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>

Loading…
Cancel
Save