updated nuget

This commit is contained in:
Luke Pulverenti
2014-08-06 00:18:13 -04:00
parent e3c52b6f73
commit 284bd3e9f5
14 changed files with 105 additions and 25 deletions

View File

@@ -14,12 +14,13 @@ namespace MediaBrowser.Model.Dlna
public string BuildImageHeader(string container,
int? width,
int? height)
int? height,
bool isDirectStream)
{
string orgOp = ";DLNA.ORG_OP=" + DlnaMaps.GetImageOrgOpValue();
// 0 = native, 1 = transcoded
const string orgCi = ";DLNA.ORG_CI=0";
var orgCi = isDirectStream ? ";DLNA.ORG_CI=0" : ";DLNA.ORG_CI=1";
DlnaFlags flagValue = DlnaFlags.StreamingTransferMode |
DlnaFlags.BackgroundTransferMode |

View File

@@ -48,7 +48,7 @@
orgOp += "0";
// Byte-based seeking only possible when not transcoding
orgOp += "1";
orgOp += "0";
return orgOp;
}

View File

@@ -385,7 +385,7 @@ namespace MediaBrowser.Model.Dlna
return ResolveImageJPGFormat(width, height);
if (StringHelper.EqualsIgnoreCase(container, "png"))
return MediaFormatProfile.PNG_LRG;
return ResolveImagePNGFormat(width, height);
if (StringHelper.EqualsIgnoreCase(container, "gif"))
return MediaFormatProfile.GIF_LRG;
@@ -401,7 +401,7 @@ namespace MediaBrowser.Model.Dlna
if (width.HasValue && height.HasValue)
{
if ((width.Value <= 160) && (height.Value <= 160))
return MediaFormatProfile.JPEG_SM;
return MediaFormatProfile.JPEG_TN;
if ((width.Value <= 640) && (height.Value <= 480))
return MediaFormatProfile.JPEG_SM;
@@ -416,5 +416,16 @@ namespace MediaBrowser.Model.Dlna
return MediaFormatProfile.JPEG_SM;
}
private MediaFormatProfile ResolveImagePNGFormat(int? width, int? height)
{
if (width.HasValue && height.HasValue)
{
if ((width.Value <= 160) && (height.Value <= 160))
return MediaFormatProfile.PNG_TN;
}
return MediaFormatProfile.PNG_LRG;
}
}
}

View File

@@ -133,14 +133,21 @@ namespace MediaBrowser.Model.Dlna
public List<SubtitleStreamInfo> GetExternalSubtitles(string baseUrl)
{
if (string.IsNullOrEmpty(baseUrl))
{
throw new ArgumentNullException(baseUrl);
}
List<SubtitleStreamInfo> list = new List<SubtitleStreamInfo>();
if (SubtitleDeliveryMethod != SubtitleDeliveryMethod.External)
{
return null;
return list;
}
if (!SubtitleStreamIndex.HasValue)
{
return null;
return list;
}
// HLS will preserve timestamps so we can just grab the full subtitle stream
@@ -156,8 +163,6 @@ namespace MediaBrowser.Model.Dlna
StringHelper.ToStringCultureInvariant(startPositionTicks),
SubtitleFormat);
List<SubtitleStreamInfo> list = new List<SubtitleStreamInfo>();
foreach (MediaStream stream in MediaSource.MediaStreams)
{
if (stream.Type == MediaStreamType.Subtitle && stream.Index == SubtitleStreamIndex.Value)