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