aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-04-28 09:56:57 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-04-28 09:56:57 -0400
commit52e3d875c22ed8229584cf3d53c3df53c2b4d9f5 (patch)
treee8361cfd19384dceb24856bd880712a63a5bbb01
parentd274d1d807c8431a1d8b02433629b32d0f529aba (diff)
resolve live tv with ios
-rw-r--r--MediaBrowser.Api/Playback/MediaInfoService.cs5
-rw-r--r--MediaBrowser.Api/Sync/SyncService.cs8
2 files changed, 10 insertions, 3 deletions
diff --git a/MediaBrowser.Api/Playback/MediaInfoService.cs b/MediaBrowser.Api/Playback/MediaInfoService.cs
index c71048b0d..69fb6f43f 100644
--- a/MediaBrowser.Api/Playback/MediaInfoService.cs
+++ b/MediaBrowser.Api/Playback/MediaInfoService.cs
@@ -325,10 +325,11 @@ namespace MediaBrowser.Api.Playback
private int? GetMaxBitrate(int? clientMaxBitrate)
{
var maxBitrate = clientMaxBitrate;
+ var remoteClientMaxBitrate = _config.Configuration.RemoteClientBitrateLimit;
- if (_config.Configuration.RemoteClientBitrateLimit > 0 && !_networkManager.IsInLocalNetwork(Request.RemoteIp))
+ if (remoteClientMaxBitrate > 0 && !_networkManager.IsInLocalNetwork(Request.RemoteIp))
{
- maxBitrate = Math.Min(maxBitrate ?? _config.Configuration.RemoteClientBitrateLimit, _config.Configuration.RemoteClientBitrateLimit);
+ maxBitrate = Math.Min(maxBitrate ?? remoteClientMaxBitrate, remoteClientMaxBitrate);
}
return maxBitrate;
diff --git a/MediaBrowser.Api/Sync/SyncService.cs b/MediaBrowser.Api/Sync/SyncService.cs
index d5f88e6a4..5863e05e3 100644
--- a/MediaBrowser.Api/Sync/SyncService.cs
+++ b/MediaBrowser.Api/Sync/SyncService.cs
@@ -1,4 +1,5 @@
-using MediaBrowser.Controller.Dto;
+using MediaBrowser.Common.Extensions;
+using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Sync;
@@ -230,6 +231,11 @@ namespace MediaBrowser.Api.Sync
{
var jobItem = _syncManager.GetJobItem(request.Id);
+ if (jobItem == null)
+ {
+ throw new ResourceNotFoundException();
+ }
+
if (jobItem.Status < SyncJobItemStatus.ReadyToTransfer)
{
throw new ArgumentException("The job item is not yet ready for transfer.");