mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-04 23:08:42 +01:00
fixes #697 - Support xbmc offline discs
This commit is contained in:
@@ -229,19 +229,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public bool IsUnidentified
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ProviderIds.Any())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public bool IsUnidentified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the locked fields.
|
||||
|
||||
@@ -352,6 +352,26 @@ namespace MediaBrowser.Controller.Entities
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
private bool IsValidFromResolver(BaseItem current, BaseItem newItem)
|
||||
{
|
||||
var currentAsPlaceHolder = current as ISupportsPlaceHolders;
|
||||
|
||||
if (currentAsPlaceHolder != null)
|
||||
{
|
||||
var newHasPlaceHolder = newItem as ISupportsPlaceHolders;
|
||||
|
||||
if (newHasPlaceHolder != null)
|
||||
{
|
||||
if (currentAsPlaceHolder.IsPlaceHolder != newHasPlaceHolder.IsPlaceHolder)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return current.IsInMixedFolder == newItem.IsInMixedFolder;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the children internal.
|
||||
/// </summary>
|
||||
@@ -401,7 +421,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
BaseItem currentChild;
|
||||
|
||||
if (currentChildren.TryGetValue(child.Id, out currentChild) && child.IsInMixedFolder == currentChild.IsInMixedFolder)
|
||||
if (currentChildren.TryGetValue(child.Id, out currentChild) && IsValidFromResolver(currentChild, child))
|
||||
{
|
||||
var currentChildLocationType = currentChild.LocationType;
|
||||
if (currentChildLocationType != LocationType.Remote &&
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Linq;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
public class Game : BaseItem, IHasSoundtracks, IHasTrailers, IHasThemeMedia, IHasTags, IHasScreenshots, IHasPreferredMetadataLanguage, IHasLookupInfo<GameInfo>
|
||||
public class Game : BaseItem, IHasSoundtracks, IHasTrailers, IHasThemeMedia, IHasTags, IHasScreenshots, ISupportsPlaceHolders, IHasPreferredMetadataLanguage, IHasLookupInfo<GameInfo>
|
||||
{
|
||||
public List<Guid> SoundtrackIds { get; set; }
|
||||
|
||||
@@ -63,10 +63,10 @@ namespace MediaBrowser.Controller.Entities
|
||||
public int? PlayersSupported { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is installed on client.
|
||||
/// Gets a value indicating whether this instance is place holder.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is installed on client; otherwise, <c>false</c>.</value>
|
||||
public bool IsInstalledOnClient { get; set; }
|
||||
/// <value><c>true</c> if this instance is place holder; otherwise, <c>false</c>.</value>
|
||||
public bool IsPlaceHolder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the game system.
|
||||
|
||||
@@ -49,5 +49,11 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
bool BeforeMetadataRefresh();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is unidentified.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is unidentified; otherwise, <c>false</c>.</value>
|
||||
bool IsUnidentified { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
12
MediaBrowser.Controller/Entities/ISupportsPlaceHolders.cs
Normal file
12
MediaBrowser.Controller/Entities/ISupportsPlaceHolders.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
public interface ISupportsPlaceHolders
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is place holder.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is place holder; otherwise, <c>false</c>.</value>
|
||||
bool IsPlaceHolder { get; }
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <summary>
|
||||
/// Class Video
|
||||
/// </summary>
|
||||
public class Video : BaseItem, IHasMediaStreams, IHasAspectRatio, IHasTags
|
||||
public class Video : BaseItem, IHasMediaStreams, IHasAspectRatio, IHasTags, ISupportsPlaceHolders
|
||||
{
|
||||
public bool IsMultiPart { get; set; }
|
||||
|
||||
@@ -42,6 +42,8 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <value><c>true</c> if this instance has subtitles; otherwise, <c>false</c>.</value>
|
||||
public bool HasSubtitles { get; set; }
|
||||
|
||||
public bool IsPlaceHolder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the tags.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user