mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-29 20:08:27 +01:00
updated nuget
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Querying;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -25,5 +26,10 @@ namespace MediaBrowser.Model.ApiClient
|
||||
{
|
||||
return apiClient.GetPublicUsersAsync(CancellationToken.None);
|
||||
}
|
||||
|
||||
public static Task<ItemsResult> GetItemsAsync(this IApiClient apiClient, ItemQuery query)
|
||||
{
|
||||
return apiClient.GetItemsAsync(query, CancellationToken.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,9 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
DlnaFlags flagValue = DlnaFlags.StreamingTransferMode |
|
||||
DlnaFlags.BackgroundTransferMode |
|
||||
DlnaFlags.InteractiveTransferMode |
|
||||
DlnaFlags.DlnaV15;
|
||||
|
||||
|
||||
string dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}",
|
||||
DlnaMaps.FlagsToString(flagValue));
|
||||
|
||||
@@ -62,16 +63,17 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
DlnaFlags flagValue = DlnaFlags.StreamingTransferMode |
|
||||
DlnaFlags.BackgroundTransferMode |
|
||||
DlnaFlags.InteractiveTransferMode |
|
||||
DlnaFlags.DlnaV15;
|
||||
|
||||
if (isDirectStream)
|
||||
{
|
||||
//flagValue = flagValue | DlnaFlags.DLNA_ORG_FLAG_BYTE_BASED_SEEK;
|
||||
}
|
||||
else if (runtimeTicks.HasValue)
|
||||
{
|
||||
//flagValue = flagValue | DlnaFlags.DLNA_ORG_FLAG_TIME_BASED_SEEK;
|
||||
flagValue = flagValue | DlnaFlags.ByteBasedSeek;
|
||||
}
|
||||
//else if (runtimeTicks.HasValue)
|
||||
//{
|
||||
// flagValue = flagValue | DlnaFlags.TimeBasedSeek;
|
||||
//}
|
||||
|
||||
string dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}",
|
||||
DlnaMaps.FlagsToString(flagValue));
|
||||
@@ -120,16 +122,17 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
DlnaFlags flagValue = DlnaFlags.StreamingTransferMode |
|
||||
DlnaFlags.BackgroundTransferMode |
|
||||
DlnaFlags.InteractiveTransferMode |
|
||||
DlnaFlags.DlnaV15;
|
||||
|
||||
if (isDirectStream)
|
||||
{
|
||||
//flagValue = flagValue | DlnaFlags.DLNA_ORG_FLAG_BYTE_BASED_SEEK;
|
||||
}
|
||||
else if (runtimeTicks.HasValue)
|
||||
{
|
||||
//flagValue = flagValue | DlnaFlags.DLNA_ORG_FLAG_TIME_BASED_SEEK;
|
||||
flagValue = flagValue | DlnaFlags.ByteBasedSeek;
|
||||
}
|
||||
//else if (runtimeTicks.HasValue)
|
||||
//{
|
||||
// flagValue = flagValue | DlnaFlags.TimeBasedSeek;
|
||||
//}
|
||||
|
||||
string dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}",
|
||||
DlnaMaps.FlagsToString(flagValue));
|
||||
|
||||
@@ -99,7 +99,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
ResponseProfiles = new ResponseProfile[] { };
|
||||
CodecProfiles = new CodecProfile[] { };
|
||||
ContainerProfiles = new ContainerProfile[] { };
|
||||
|
||||
SubtitleProfiles = new SubtitleProfile[] { };
|
||||
|
||||
XmlRootAttributes = new XmlAttribute[] { };
|
||||
|
||||
SupportedMediaTypes = "Audio,Photo,Video";
|
||||
|
||||
@@ -5,17 +5,44 @@ namespace MediaBrowser.Model.Dlna
|
||||
[Flags]
|
||||
public enum DlnaFlags : ulong
|
||||
{
|
||||
/*! <i>Background</i> transfer mode.
|
||||
For use with upload and download transfers to and from the server.
|
||||
The primary difference between \ref DH_TransferMode_Interactive and
|
||||
\ref DH_TransferMode_Bulk is that the latter assumes that the user
|
||||
is not relying on the transfer for immediately rendering the content
|
||||
and there are no issues with causing a buffer overflow if the
|
||||
receiver uses TCP flow control to reduce total throughput.
|
||||
*/
|
||||
BackgroundTransferMode = (1 << 22),
|
||||
|
||||
ByteBasedSeek = (1 << 29),
|
||||
ConnectionStall = (1 << 21),
|
||||
|
||||
DlnaV15 = (1 << 20),
|
||||
|
||||
/*! <i>Interactive</i> transfer mode.
|
||||
For best effort transfer of images and non-real-time transfers.
|
||||
URIs with image content usually support \ref DH_TransferMode_Bulk too.
|
||||
The primary difference between \ref DH_TransferMode_Interactive and
|
||||
\ref DH_TransferMode_Bulk is that the former assumes that the
|
||||
transfer is intended for immediate rendering.
|
||||
*/
|
||||
InteractiveTransferMode = (1 << 23),
|
||||
|
||||
PlayContainer = (1 << 28),
|
||||
RtspPause = (1 << 25),
|
||||
S0Increase = (1 << 27),
|
||||
SenderPaced = (1L << 31),
|
||||
SnIncrease = (1 << 26),
|
||||
|
||||
/*! <i>Streaming</i> transfer mode.
|
||||
The server transmits at a throughput sufficient for real-time playback of
|
||||
audio or video. URIs with audio or video often support the
|
||||
\ref DH_TransferMode_Interactive and \ref DH_TransferMode_Bulk transfer modes.
|
||||
The most well-known exception to this general claim is for live streams.
|
||||
*/
|
||||
StreamingTransferMode = (1 << 24),
|
||||
|
||||
TimeBasedSeek = (1 << 30)
|
||||
}
|
||||
}
|
||||
@@ -537,16 +537,6 @@ namespace MediaBrowser.Model.Dlna
|
||||
return SubtitleDeliveryMethod.Encode;
|
||||
}
|
||||
|
||||
private string NormalizeSubtitleFormat(string codec)
|
||||
{
|
||||
if (StringHelper.EqualsIgnoreCase(codec, "subrip"))
|
||||
{
|
||||
return SubtitleFormat.SRT;
|
||||
}
|
||||
|
||||
return codec;
|
||||
}
|
||||
|
||||
private bool ContainsSubtitleFormat(SubtitleProfile[] profiles, SubtitleDeliveryMethod method, string[] formats)
|
||||
{
|
||||
foreach (SubtitleProfile profile in profiles)
|
||||
|
||||
@@ -172,7 +172,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
Url = url,
|
||||
IsForced = stream.IsForced,
|
||||
Language = stream.Language,
|
||||
Name = stream.Language ?? "Unknown"
|
||||
Name = stream.Language ?? "Unknown",
|
||||
Format = SubtitleFormat
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -512,5 +513,6 @@ namespace MediaBrowser.Model.Dlna
|
||||
public string Language { get; set; }
|
||||
public string Name { get; set; }
|
||||
public bool IsForced { get; set; }
|
||||
public string Format { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,10 +7,11 @@ namespace MediaBrowser.Model.Dlna
|
||||
[XmlAttribute("format")]
|
||||
public string Format { get; set; }
|
||||
|
||||
[XmlAttribute("protocol")]
|
||||
public string Protocol { get; set; }
|
||||
|
||||
[XmlAttribute("method")]
|
||||
public SubtitleDeliveryMethod Method { get; set; }
|
||||
|
||||
[XmlAttribute("didlMode")]
|
||||
public string DidlMode { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user