mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-03 07:16:31 +01:00
use server to build stream url's
This commit is contained in:
@@ -102,10 +102,29 @@ namespace MediaBrowser.Model.Dlna
|
||||
List<string> list = new List<string>();
|
||||
foreach (NameValuePair pair in BuildParams(this, accessToken))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(pair.Value))
|
||||
if (string.IsNullOrEmpty(pair.Value))
|
||||
{
|
||||
list.Add(string.Format("{0}={1}", pair.Name, pair.Value));
|
||||
continue;
|
||||
}
|
||||
|
||||
// Try to keep the url clean by omitting defaults
|
||||
if (StringHelper.EqualsIgnoreCase(pair.Name, "StartTimeTicks") &&
|
||||
StringHelper.EqualsIgnoreCase(pair.Value, "0"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (StringHelper.EqualsIgnoreCase(pair.Name, "SubtitleStreamIndex") &&
|
||||
StringHelper.EqualsIgnoreCase(pair.Value, "-1"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (StringHelper.EqualsIgnoreCase(pair.Name, "Static") &&
|
||||
StringHelper.EqualsIgnoreCase(pair.Value, "false"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
list.Add(string.Format("{0}={1}", pair.Name, pair.Value));
|
||||
}
|
||||
|
||||
string queryString = string.Join("&", list.ToArray());
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Dto;
|
||||
|
||||
namespace MediaBrowser.Model.MediaInfo
|
||||
{
|
||||
public class PlaybackInfoRequest
|
||||
{
|
||||
public DeviceProfile DeviceProfile { get; set; }
|
||||
public MediaSourceInfo MediaSource { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user