use server to build stream url's

This commit is contained in:
Luke Pulverenti
2015-03-26 15:18:21 -04:00
parent 3ec7090c6e
commit cd99ad4366
3 changed files with 72 additions and 17 deletions

View File

@@ -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());

View File

@@ -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; }
}
}