fix failing scan
This commit is contained in:
parent
63f3cf97da
commit
f5919990c9
|
@ -20,6 +20,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||
public bool IsAccessedByName { get; set; }
|
||||
public List<string> ProductionLocations { get; set; }
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool IsFolder
|
||||
{
|
||||
get
|
||||
|
@ -78,6 +79,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||
/// If the item is a folder, it returns the folder itself
|
||||
/// </summary>
|
||||
/// <value>The containing folder path.</value>
|
||||
[IgnoreDataMember]
|
||||
public override string ContainingFolderPath
|
||||
{
|
||||
get
|
||||
|
@ -90,6 +92,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||
/// Gets a value indicating whether this instance is owned item.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>
|
||||
[IgnoreDataMember]
|
||||
public override bool IsOwnedItem
|
||||
{
|
||||
get
|
||||
|
@ -177,19 +180,16 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||
|
||||
public IEnumerable<BaseItem> GetTaggedItems(IEnumerable<BaseItem> inputItems)
|
||||
{
|
||||
return inputItems.Where(ItemFilter);
|
||||
return inputItems.Where(GetItemFilter());
|
||||
}
|
||||
|
||||
public Func<BaseItem, bool> ItemFilter
|
||||
public Func<BaseItem, bool> GetItemFilter()
|
||||
{
|
||||
get
|
||||
return i =>
|
||||
{
|
||||
return i =>
|
||||
{
|
||||
var hasArtist = i as IHasArtist;
|
||||
return hasArtist != null && hasArtist.HasArtist(Name);
|
||||
};
|
||||
}
|
||||
var hasArtist = i as IHasArtist;
|
||||
return hasArtist != null && hasArtist.HasArtist(Name);
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||
/// If the item is a folder, it returns the folder itself
|
||||
/// </summary>
|
||||
/// <value>The containing folder path.</value>
|
||||
[IgnoreDataMember]
|
||||
public override string ContainingFolderPath
|
||||
{
|
||||
get
|
||||
|
@ -42,6 +43,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||
/// Gets a value indicating whether this instance is owned item.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>
|
||||
[IgnoreDataMember]
|
||||
public override bool IsOwnedItem
|
||||
{
|
||||
get
|
||||
|
@ -52,13 +54,12 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||
|
||||
public IEnumerable<BaseItem> GetTaggedItems(IEnumerable<BaseItem> inputItems)
|
||||
{
|
||||
return inputItems.Where(ItemFilter);
|
||||
return inputItems.Where(GetItemFilter());
|
||||
}
|
||||
|
||||
|
||||
public Func<BaseItem, bool> ItemFilter
|
||||
public Func<BaseItem, bool> GetItemFilter()
|
||||
{
|
||||
get { return i => (i is IHasMusicGenres) && i.Genres.Contains(Name, StringComparer.OrdinalIgnoreCase); }
|
||||
return i => (i is IHasMusicGenres) && i.Genres.Contains(Name, StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
|
@ -20,6 +21,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// If the item is a folder, it returns the folder itself
|
||||
/// </summary>
|
||||
/// <value>The containing folder path.</value>
|
||||
[IgnoreDataMember]
|
||||
public override string ContainingFolderPath
|
||||
{
|
||||
get
|
||||
|
@ -32,6 +34,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// Gets a value indicating whether this instance is owned item.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>
|
||||
[IgnoreDataMember]
|
||||
public override bool IsOwnedItem
|
||||
{
|
||||
get
|
||||
|
@ -42,13 +45,12 @@ namespace MediaBrowser.Controller.Entities
|
|||
|
||||
public IEnumerable<BaseItem> GetTaggedItems(IEnumerable<BaseItem> inputItems)
|
||||
{
|
||||
return inputItems.Where(ItemFilter);
|
||||
return inputItems.Where(GetItemFilter());
|
||||
}
|
||||
|
||||
|
||||
public Func<BaseItem, bool> ItemFilter
|
||||
public Func<BaseItem, bool> GetItemFilter()
|
||||
{
|
||||
get { return i => (i is Game) && i.Genres.Contains(Name, StringComparer.OrdinalIgnoreCase); }
|
||||
return i => (i is Game) && i.Genres.Contains(Name, StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using System.Runtime.Serialization;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
@ -24,6 +25,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// If the item is a folder, it returns the folder itself
|
||||
/// </summary>
|
||||
/// <value>The containing folder path.</value>
|
||||
[IgnoreDataMember]
|
||||
public override string ContainingFolderPath
|
||||
{
|
||||
get
|
||||
|
@ -36,6 +38,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// Gets a value indicating whether this instance is owned item.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>
|
||||
[IgnoreDataMember]
|
||||
public override bool IsOwnedItem
|
||||
{
|
||||
get
|
||||
|
@ -46,12 +49,12 @@ namespace MediaBrowser.Controller.Entities
|
|||
|
||||
public IEnumerable<BaseItem> GetTaggedItems(IEnumerable<BaseItem> inputItems)
|
||||
{
|
||||
return inputItems.Where(ItemFilter);
|
||||
return inputItems.Where(GetItemFilter());
|
||||
}
|
||||
|
||||
public Func<BaseItem, bool> ItemFilter
|
||||
public Func<BaseItem, bool> GetItemFilter()
|
||||
{
|
||||
get { return i => !(i is Game) && !(i is IHasMusicGenres) && i.Genres.Contains(Name, StringComparer.OrdinalIgnoreCase); }
|
||||
return i => !(i is Game) && !(i is IHasMusicGenres) && i.Genres.Contains(Name, StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// <returns>IEnumerable{BaseItem}.</returns>
|
||||
IEnumerable<BaseItem> GetTaggedItems(IEnumerable<BaseItem> inputItems);
|
||||
|
||||
Func<BaseItem, bool> ItemFilter { get; }
|
||||
Func<BaseItem, bool> GetItemFilter();
|
||||
}
|
||||
|
||||
public interface IHasDualAccess : IItemByName
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using MediaBrowser.Controller.Providers;
|
||||
using System.Runtime.Serialization;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
@ -15,7 +16,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// </summary>
|
||||
/// <value>The place of birth.</value>
|
||||
public string PlaceOfBirth { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the user data key.
|
||||
/// </summary>
|
||||
|
@ -35,6 +36,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// If the item is a folder, it returns the folder itself
|
||||
/// </summary>
|
||||
/// <value>The containing folder path.</value>
|
||||
[IgnoreDataMember]
|
||||
public override string ContainingFolderPath
|
||||
{
|
||||
get
|
||||
|
@ -47,6 +49,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// Gets a value indicating whether this instance is owned item.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>
|
||||
[IgnoreDataMember]
|
||||
public override bool IsOwnedItem
|
||||
{
|
||||
get
|
||||
|
@ -57,13 +60,13 @@ namespace MediaBrowser.Controller.Entities
|
|||
|
||||
public IEnumerable<BaseItem> GetTaggedItems(IEnumerable<BaseItem> inputItems)
|
||||
{
|
||||
return inputItems.Where(ItemFilter);
|
||||
return inputItems.Where(GetItemFilter());
|
||||
}
|
||||
|
||||
|
||||
public Func<BaseItem, bool> ItemFilter
|
||||
public Func<BaseItem, bool> GetItemFilter()
|
||||
{
|
||||
get { return i => i.People.Any(p => string.Equals(p.Name, Name, StringComparison.OrdinalIgnoreCase)); }
|
||||
return i => i.People.Any(p => string.Equals(p.Name, Name, StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
|
@ -15,7 +16,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
{
|
||||
Tags = new List<string>();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the user data key.
|
||||
/// </summary>
|
||||
|
@ -30,6 +31,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// If the item is a folder, it returns the folder itself
|
||||
/// </summary>
|
||||
/// <value>The containing folder path.</value>
|
||||
[IgnoreDataMember]
|
||||
public override string ContainingFolderPath
|
||||
{
|
||||
get
|
||||
|
@ -42,6 +44,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// Gets a value indicating whether this instance is owned item.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>
|
||||
[IgnoreDataMember]
|
||||
public override bool IsOwnedItem
|
||||
{
|
||||
get
|
||||
|
@ -52,13 +55,13 @@ namespace MediaBrowser.Controller.Entities
|
|||
|
||||
public IEnumerable<BaseItem> GetTaggedItems(IEnumerable<BaseItem> inputItems)
|
||||
{
|
||||
return inputItems.Where(ItemFilter);
|
||||
return inputItems.Where(GetItemFilter());
|
||||
}
|
||||
|
||||
|
||||
public Func<BaseItem, bool> ItemFilter
|
||||
public Func<BaseItem, bool> GetItemFilter()
|
||||
{
|
||||
get { return i => i.Studios.Contains(Name, StringComparer.OrdinalIgnoreCase); }
|
||||
return i => i.Studios.Contains(Name, StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// If the item is a folder, it returns the folder itself
|
||||
/// </summary>
|
||||
/// <value>The containing folder path.</value>
|
||||
[IgnoreDataMember]
|
||||
public override string ContainingFolderPath
|
||||
{
|
||||
get
|
||||
|
@ -74,6 +75,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// Gets a value indicating whether this instance is owned item.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>
|
||||
[IgnoreDataMember]
|
||||
public override bool IsOwnedItem
|
||||
{
|
||||
get
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
|
@ -24,6 +25,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// If the item is a folder, it returns the folder itself
|
||||
/// </summary>
|
||||
/// <value>The containing folder path.</value>
|
||||
[IgnoreDataMember]
|
||||
public override string ContainingFolderPath
|
||||
{
|
||||
get
|
||||
|
@ -36,6 +38,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// Gets a value indicating whether this instance is owned item.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>
|
||||
[IgnoreDataMember]
|
||||
public override bool IsOwnedItem
|
||||
{
|
||||
get
|
||||
|
@ -48,8 +51,8 @@ namespace MediaBrowser.Controller.Entities
|
|||
{
|
||||
int year;
|
||||
|
||||
var usCulture = new CultureInfo("en-US");
|
||||
|
||||
var usCulture = new CultureInfo("en-US");
|
||||
|
||||
if (!int.TryParse(Name, NumberStyles.Integer, usCulture, out year))
|
||||
{
|
||||
return inputItems;
|
||||
|
@ -58,10 +61,22 @@ namespace MediaBrowser.Controller.Entities
|
|||
return inputItems.Where(i => i.ProductionYear.HasValue && i.ProductionYear.Value == year);
|
||||
}
|
||||
|
||||
|
||||
public Func<BaseItem, bool> ItemFilter
|
||||
public int? GetYearValue()
|
||||
{
|
||||
get { throw new System.NotImplementedException(); }
|
||||
int i;
|
||||
|
||||
if (int.TryParse(Name, NumberStyles.Integer, CultureInfo.InvariantCulture, out i))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public Func<BaseItem, bool> GetItemFilter()
|
||||
{
|
||||
var val = GetYearValue();
|
||||
return i => i.ProductionYear.HasValue && val.HasValue && i.ProductionYear.Value == val.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using System.Runtime.Serialization;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Users;
|
||||
|
@ -32,6 +33,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
/// Gets a value indicating whether this instance is owned item.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>
|
||||
[IgnoreDataMember]
|
||||
public override bool IsOwnedItem
|
||||
{
|
||||
get
|
||||
|
@ -40,6 +42,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override string MediaType
|
||||
{
|
||||
get
|
||||
|
@ -48,6 +51,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override LocationType LocationType
|
||||
{
|
||||
get
|
||||
|
@ -71,6 +75,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
return false;
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool SupportsLocalMetadata
|
||||
{
|
||||
get
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using MediaBrowser.Controller.Entities;
|
||||
using System.Runtime.Serialization;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
@ -30,6 +31,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
/// Gets a value indicating whether this instance is owned item.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>
|
||||
[IgnoreDataMember]
|
||||
public override bool IsOwnedItem
|
||||
{
|
||||
get
|
||||
|
@ -88,6 +90,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
return number.ToString("000-") + (Name ?? string.Empty);
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override string MediaType
|
||||
{
|
||||
get
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using MediaBrowser.Controller.Entities;
|
||||
using System.Runtime.Serialization;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using MediaBrowser.Model.LiveTv;
|
||||
|
@ -138,6 +139,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
/// If the item is a folder, it returns the folder itself
|
||||
/// </summary>
|
||||
/// <value>The containing folder path.</value>
|
||||
[IgnoreDataMember]
|
||||
public override string ContainingFolderPath
|
||||
{
|
||||
get
|
||||
|
@ -150,6 +152,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
/// Gets a value indicating whether this instance is owned item.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>
|
||||
[IgnoreDataMember]
|
||||
public override bool IsOwnedItem
|
||||
{
|
||||
get
|
||||
|
@ -158,6 +161,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override string MediaType
|
||||
{
|
||||
get
|
||||
|
@ -166,6 +170,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public bool IsAiring
|
||||
{
|
||||
get
|
||||
|
@ -176,6 +181,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public bool HasAired
|
||||
{
|
||||
get
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using MediaBrowser.Controller.Entities;
|
||||
using System.Runtime.Serialization;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using System.Linq;
|
||||
|
@ -28,6 +29,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
|
||||
public string ServiceName { get; set; }
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override string MediaType
|
||||
{
|
||||
get
|
||||
|
@ -36,6 +38,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override LocationType LocationType
|
||||
{
|
||||
get
|
||||
|
@ -53,6 +56,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
/// Gets a value indicating whether this instance is owned item.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>
|
||||
[IgnoreDataMember]
|
||||
public override bool IsOwnedItem
|
||||
{
|
||||
get
|
||||
|
|
|
@ -712,14 +712,10 @@ namespace MediaBrowser.Dlna.PlayTo
|
|||
if (avService == null)
|
||||
return;
|
||||
|
||||
var url = avService.ScpdUrl;
|
||||
if (!url.Contains("/"))
|
||||
url = "/dmr/" + url;
|
||||
if (!url.StartsWith("/"))
|
||||
url = "/" + url;
|
||||
string url = NormalizeUrl(Properties.BaseUrl, avService.ScpdUrl);
|
||||
|
||||
var httpClient = new SsdpHttpClient(_httpClient, _config);
|
||||
var document = await httpClient.GetDataAsync(Properties.BaseUrl + url);
|
||||
var document = await httpClient.GetDataAsync(url);
|
||||
|
||||
AvCommands = TransportCommands.Create(document);
|
||||
}
|
||||
|
@ -730,16 +726,28 @@ namespace MediaBrowser.Dlna.PlayTo
|
|||
|
||||
if (avService == null)
|
||||
return;
|
||||
string url = avService.ScpdUrl;
|
||||
string url = NormalizeUrl(Properties.BaseUrl, avService.ScpdUrl);
|
||||
|
||||
var httpClient = new SsdpHttpClient(_httpClient, _config);
|
||||
var document = await httpClient.GetDataAsync(url);
|
||||
|
||||
RendererCommands = TransportCommands.Create(document);
|
||||
}
|
||||
|
||||
private string NormalizeUrl(string baseUrl, string url)
|
||||
{
|
||||
// If it's already a complete url, don't stick anything onto the front of it
|
||||
if (url.StartsWith("http", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return url;
|
||||
}
|
||||
|
||||
if (!url.Contains("/"))
|
||||
url = "/dmr/" + url;
|
||||
if (!url.StartsWith("/"))
|
||||
url = "/" + url;
|
||||
|
||||
var httpClient = new SsdpHttpClient(_httpClient, _config);
|
||||
var document = await httpClient.GetDataAsync(Properties.BaseUrl + url);
|
||||
|
||||
RendererCommands = TransportCommands.Create(document);
|
||||
return baseUrl + url;
|
||||
}
|
||||
|
||||
private TransportCommands AvCommands
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using MediaBrowser.Common.Net;
|
||||
using System;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Dlna.Common;
|
||||
using System.Globalization;
|
||||
|
@ -29,11 +30,7 @@ namespace MediaBrowser.Dlna.PlayTo
|
|||
string postData,
|
||||
string header = null)
|
||||
{
|
||||
var serviceUrl = service.ControlUrl;
|
||||
if (!serviceUrl.StartsWith("/"))
|
||||
serviceUrl = "/" + serviceUrl;
|
||||
|
||||
var response = await PostSoapDataAsync(baseUrl + serviceUrl, "\"" + service.ServiceType + "#" + command + "\"", postData, header)
|
||||
var response = await PostSoapDataAsync(NormalizeServiceUrl(baseUrl, service.ControlUrl), "\"" + service.ServiceType + "#" + command + "\"", postData, header)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
using (var stream = response.Content)
|
||||
|
@ -45,6 +42,20 @@ namespace MediaBrowser.Dlna.PlayTo
|
|||
}
|
||||
}
|
||||
|
||||
private string NormalizeServiceUrl(string baseUrl, string serviceUrl)
|
||||
{
|
||||
// If it's already a complete url, don't stick anything onto the front of it
|
||||
if (serviceUrl.StartsWith("http", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return serviceUrl;
|
||||
}
|
||||
|
||||
if (!serviceUrl.StartsWith("/"))
|
||||
serviceUrl = "/" + serviceUrl;
|
||||
|
||||
return baseUrl + serviceUrl;
|
||||
}
|
||||
|
||||
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
|
||||
|
||||
public async Task SubscribeAsync(string url,
|
||||
|
|
|
@ -43,8 +43,10 @@ namespace MediaBrowser.Providers.Music
|
|||
{
|
||||
if (!item.IsLocked)
|
||||
{
|
||||
var itemFilter = item.GetItemFilter();
|
||||
|
||||
var taggedItems = item.IsAccessedByName ?
|
||||
_libraryManager.RootFolder.GetRecursiveChildren(i => !i.IsFolder && item.ItemFilter(i)).ToList() :
|
||||
_libraryManager.RootFolder.GetRecursiveChildren(i => !i.IsFolder && itemFilter(i)).ToList() :
|
||||
item.GetRecursiveChildren(i => i is IHasArtist && !i.IsFolder).ToList();
|
||||
|
||||
if (!item.LockedFields.Contains(MetadataFields.Genres))
|
||||
|
|
|
@ -95,9 +95,11 @@ namespace MediaBrowser.Server.Implementations.Dto
|
|||
|
||||
if (byName != null && !(item is LiveTvChannel))
|
||||
{
|
||||
var itemFilter = byName.GetItemFilter();
|
||||
|
||||
var libraryItems = user != null ?
|
||||
user.RootFolder.GetRecursiveChildren(user, byName.ItemFilter) :
|
||||
_libraryManager.RootFolder.GetRecursiveChildren(byName.ItemFilter);
|
||||
user.RootFolder.GetRecursiveChildren(user, itemFilter) :
|
||||
_libraryManager.RootFolder.GetRecursiveChildren(itemFilter);
|
||||
|
||||
SetItemByNameInfo(item, dto, libraryItems.ToList(), user);
|
||||
}
|
||||
|
@ -118,9 +120,11 @@ namespace MediaBrowser.Server.Implementations.Dto
|
|||
|
||||
if (byName != null && !(item is LiveTvChannel))
|
||||
{
|
||||
var itemFilter = byName.GetItemFilter();
|
||||
|
||||
var libraryItems = user != null ?
|
||||
user.RootFolder.GetRecursiveChildren(user, byName.ItemFilter) :
|
||||
_libraryManager.RootFolder.GetRecursiveChildren(byName.ItemFilter);
|
||||
user.RootFolder.GetRecursiveChildren(user, itemFilter) :
|
||||
_libraryManager.RootFolder.GetRecursiveChildren(itemFilter);
|
||||
|
||||
SetItemByNameInfo(item, dto, libraryItems.ToList(), user);
|
||||
|
||||
|
|
|
@ -899,9 +899,11 @@ namespace MediaBrowser.Server.Implementations.Session
|
|||
|
||||
if (byName != null)
|
||||
{
|
||||
var itemFilter = byName.GetItemFilter();
|
||||
|
||||
var items = user == null ?
|
||||
_libraryManager.RootFolder.GetRecursiveChildren(i => !i.IsFolder && byName.ItemFilter(i)) :
|
||||
user.RootFolder.GetRecursiveChildren(user, i => !i.IsFolder && byName.ItemFilter(i));
|
||||
_libraryManager.RootFolder.GetRecursiveChildren(i => !i.IsFolder && itemFilter(i)) :
|
||||
user.RootFolder.GetRecursiveChildren(user, i => !i.IsFolder && itemFilter(i));
|
||||
|
||||
items = items.OrderBy(i => i.SortName);
|
||||
|
||||
|
|
|
@ -289,7 +289,7 @@ namespace MediaBrowser.Server.Implementations.Sync
|
|||
if (itemByName != null)
|
||||
{
|
||||
return user.RootFolder
|
||||
.GetRecursiveChildren(user, itemByName.ItemFilter);
|
||||
.GetRecursiveChildren(user, itemByName.GetItemFilter());
|
||||
}
|
||||
|
||||
if (item.IsFolder)
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace MediaBrowser.XbmcMetadata
|
|||
return;
|
||||
}
|
||||
|
||||
var items = _libraryManager.RootFolder.GetRecursiveChildren(person.ItemFilter);
|
||||
var items = _libraryManager.RootFolder.GetRecursiveChildren(person.GetItemFilter());
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user