Merge pull request #2733 from MediaBrowser/dev

Dev
This commit is contained in:
Luke 2017-06-29 15:11:44 -04:00 committed by GitHub
commit a25a064c84
23 changed files with 178 additions and 9 deletions

View File

@ -3758,10 +3758,10 @@ namespace Emby.Server.Implementations.Data
if (query.MinDateLastSavedForUser.HasValue) if (query.MinDateLastSavedForUser.HasValue)
{ {
whereClauses.Add("DateLastSaved>=@MinDateLastSaved"); whereClauses.Add("DateLastSaved>=@MinDateLastSavedForUser");
if (statement != null) if (statement != null)
{ {
statement.TryBind("@MinDateLastSaved", query.MinDateLastSavedForUser.Value); statement.TryBind("@MinDateLastSavedForUser", query.MinDateLastSavedForUser.Value);
} }
} }

View File

@ -1464,9 +1464,9 @@ namespace Emby.Server.Implementations.Dto
} }
} }
private BaseItem GetImageDisplayParent(BaseItem item) private BaseItem GetImageDisplayParent(BaseItem currentItem, BaseItem originalItem)
{ {
var musicAlbum = item as MusicAlbum; var musicAlbum = currentItem as MusicAlbum;
if (musicAlbum != null) if (musicAlbum != null)
{ {
var artist = musicAlbum.GetMusicArtist(new DtoOptions(false)); var artist = musicAlbum.GetMusicArtist(new DtoOptions(false));
@ -1476,7 +1476,14 @@ namespace Emby.Server.Implementations.Dto
} }
} }
return item.DisplayParent ?? item.GetParent(); var parent = currentItem.DisplayParent ?? currentItem.GetParent();
if (parent == null && !(originalItem is UserRootFolder) && !(originalItem is UserView) && !(originalItem is AggregateFolder) && !(originalItem is ICollectionFolder) && !(originalItem is Channel))
{
parent = _libraryManager.GetCollectionFolders(originalItem).FirstOrDefault();
}
return parent;
} }
private void AddInheritedImages(BaseItemDto dto, BaseItem item, DtoOptions options, BaseItem owner) private void AddInheritedImages(BaseItemDto dto, BaseItem item, DtoOptions options, BaseItem owner)
@ -1503,7 +1510,7 @@ namespace Emby.Server.Implementations.Dto
var isFirst = true; var isFirst = true;
while (((!dto.HasLogo && logoLimit > 0) || (!dto.HasArtImage && artLimit > 0) || (!dto.HasThumb && thumbLimit > 0) || parent is Series) && while (((!dto.HasLogo && logoLimit > 0) || (!dto.HasArtImage && artLimit > 0) || (!dto.HasThumb && thumbLimit > 0) || parent is Series) &&
(parent = parent ?? (isFirst ? GetImageDisplayParent(item) ?? owner : parent)) != null) (parent = parent ?? (isFirst ? GetImageDisplayParent(item, item) ?? owner : parent)) != null)
{ {
if (parent == null) if (parent == null)
{ {
@ -1560,7 +1567,7 @@ namespace Emby.Server.Implementations.Dto
break; break;
} }
parent = GetImageDisplayParent(parent); parent = GetImageDisplayParent(parent, item);
} }
} }

View File

@ -1622,6 +1622,8 @@ namespace Emby.Server.Implementations.Session
TranscodingInfo = session.NowPlayingItem == null ? null : session.TranscodingInfo TranscodingInfo = session.NowPlayingItem == null ? null : session.TranscodingInfo
}; };
dto.ServerId = _appHost.SystemId;
if (session.UserId.HasValue) if (session.UserId.HasValue)
{ {
dto.UserId = session.UserId.Value.ToString("N"); dto.UserId = session.UserId.Value.ToString("N");

View File

@ -32,6 +32,15 @@ namespace MediaBrowser.Controller.Channels
return base.IsVisible(user); return base.IsVisible(user);
} }
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
[IgnoreDataMember] [IgnoreDataMember]
public override SourceType SourceType public override SourceType SourceType
{ {

View File

@ -1,4 +1,5 @@
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Serialization;
namespace MediaBrowser.Controller.Collections namespace MediaBrowser.Controller.Collections
{ {
@ -18,11 +19,21 @@ namespace MediaBrowser.Controller.Collections
} }
} }
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public bool IsHiddenFromUser(User user) public bool IsHiddenFromUser(User user)
{ {
return !ConfigurationManager.Configuration.DisplayCollectionsView; return !ConfigurationManager.Configuration.DisplayCollectionsView;
} }
[IgnoreDataMember]
public override string CollectionType public override string CollectionType
{ {
get { return Model.Entities.CollectionType.BoxSets; } get { return Model.Entities.CollectionType.BoxSets; }

View File

@ -35,6 +35,15 @@ namespace MediaBrowser.Controller.Entities.Audio
} }
} }
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
[IgnoreDataMember] [IgnoreDataMember]
public override bool SupportsCumulativeRunTimeTicks public override bool SupportsCumulativeRunTimeTicks
{ {

View File

@ -9,6 +9,7 @@ namespace MediaBrowser.Controller.Entities
/// </summary> /// </summary>
public abstract class BasePluginFolder : Folder, ICollectionFolder public abstract class BasePluginFolder : Folder, ICollectionFolder
{ {
[IgnoreDataMember]
public virtual string CollectionType public virtual string CollectionType
{ {
get { return null; } get { return null; }
@ -24,6 +25,15 @@ namespace MediaBrowser.Controller.Entities
return true; return true;
} }
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
[IgnoreDataMember] [IgnoreDataMember]
public override bool SupportsPeople public override bool SupportsPeople
{ {

View File

@ -49,6 +49,15 @@ namespace MediaBrowser.Controller.Entities
} }
} }
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool CanDelete() public override bool CanDelete()
{ {
return false; return false;

View File

@ -65,6 +65,15 @@ namespace MediaBrowser.Controller.Entities
get { return false; } get { return false; }
} }
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return true;
}
}
[IgnoreDataMember] [IgnoreDataMember]
public override bool SupportsPlayedStatus public override bool SupportsPlayedStatus
{ {

View File

@ -35,6 +35,15 @@ namespace MediaBrowser.Controller.Entities
} }
} }
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
/// <summary> /// <summary>
/// Gets or sets the game system. /// Gets or sets the game system.
/// </summary> /// </summary>

View File

@ -29,6 +29,7 @@ namespace MediaBrowser.Controller.Entities.Movies
Shares = new List<Share>(); Shares = new List<Share>();
} }
[IgnoreDataMember]
protected override bool FilterLinkedChildrenPerUser protected override bool FilterLinkedChildrenPerUser
{ {
get get
@ -37,6 +38,15 @@ namespace MediaBrowser.Controller.Entities.Movies
} }
} }
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public List<Guid> LocalTrailerIds { get; set; } public List<Guid> LocalTrailerIds { get; set; }
public List<Guid> RemoteTrailerIds { get; set; } public List<Guid> RemoteTrailerIds { get; set; }

View File

@ -21,5 +21,14 @@ namespace MediaBrowser.Controller.Entities
return false; return false;
} }
} }
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
} }
} }

View File

@ -53,6 +53,15 @@ namespace MediaBrowser.Controller.Entities.TV
} }
} }
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public List<Guid> LocalTrailerIds { get; set; } public List<Guid> LocalTrailerIds { get; set; }
public List<Guid> RemoteTrailerIds { get; set; } public List<Guid> RemoteTrailerIds { get; set; }

View File

@ -33,6 +33,15 @@ namespace MediaBrowser.Controller.Entities
} }
} }
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
[IgnoreDataMember] [IgnoreDataMember]
public override bool SupportsPlayedStatus public override bool SupportsPlayedStatus
{ {

View File

@ -40,6 +40,15 @@ namespace MediaBrowser.Controller.Entities
return list; return list;
} }
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
[IgnoreDataMember] [IgnoreDataMember]
public override bool SupportsPlayedStatus public override bool SupportsPlayedStatus
{ {

View File

@ -43,6 +43,15 @@ namespace MediaBrowser.Controller.Entities
} }
} }
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return true;
}
}
[IgnoreDataMember] [IgnoreDataMember]
public override bool SupportsPositionTicksResume public override bool SupportsPositionTicksResume
{ {

View File

@ -26,6 +26,15 @@ namespace MediaBrowser.Controller.LiveTv
} }
} }
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
[IgnoreDataMember] [IgnoreDataMember]
public override SourceType SourceType public override SourceType SourceType
{ {

View File

@ -32,6 +32,15 @@ namespace MediaBrowser.Controller.Playlists
} }
} }
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
[IgnoreDataMember] [IgnoreDataMember]
public override bool SupportsPlayedStatus public override bool SupportsPlayedStatus
{ {

View File

@ -37,6 +37,7 @@ namespace MediaBrowser.Model.Session
/// <summary> /// <summary>
/// The fast forward /// The fast forward
/// </summary> /// </summary>
FastForward FastForward,
PlayPause
} }
} }

View File

@ -26,6 +26,8 @@ namespace MediaBrowser.Model.Session
/// <value>The id.</value> /// <value>The id.</value>
public string Id { get; set; } public string Id { get; set; }
public string ServerId { get; set; }
/// <summary> /// <summary>
/// Gets or sets the user id. /// Gets or sets the user id.
/// </summary> /// </summary>

View File

@ -33,6 +33,15 @@ namespace MediaBrowser.Server.Implementations.Devices
get { return Model.Entities.CollectionType.Photos; } get { return Model.Entities.CollectionType.Photos; }
} }
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override string GetClientTypeName() public override string GetClientTypeName()
{ {
return typeof(CollectionFolder).Name; return typeof(CollectionFolder).Name;

View File

@ -37,6 +37,15 @@ namespace MediaBrowser.Server.Implementations.Playlists
} }
} }
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
[IgnoreDataMember] [IgnoreDataMember]
public override string CollectionType public override string CollectionType
{ {

View File

@ -1,3 +1,3 @@
using System.Reflection; using System.Reflection;
[assembly: AssemblyVersion("3.2.20.16")] [assembly: AssemblyVersion("3.2.20.17")]