update inherited images

This commit is contained in:
Luke Pulverenti 2017-06-29 15:10:58 -04:00
parent a0910fc280
commit dcaf8356e6
23 changed files with 178 additions and 9 deletions

View File

@ -3758,10 +3758,10 @@ namespace Emby.Server.Implementations.Data
if (query.MinDateLastSavedForUser.HasValue)
{
whereClauses.Add("DateLastSaved>=@MinDateLastSaved");
whereClauses.Add("DateLastSaved>=@MinDateLastSavedForUser");
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)
{
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)
@ -1503,7 +1510,7 @@ namespace Emby.Server.Implementations.Dto
var isFirst = true;
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)
{
@ -1560,7 +1567,7 @@ namespace Emby.Server.Implementations.Dto
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
};
dto.ServerId = _appHost.SystemId;
if (session.UserId.HasValue)
{
dto.UserId = session.UserId.Value.ToString("N");

View File

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

View File

@ -1,4 +1,5 @@
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Serialization;
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)
{
return !ConfigurationManager.Configuration.DisplayCollectionsView;
}
[IgnoreDataMember]
public override string CollectionType
{
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]
public override bool SupportsCumulativeRunTimeTicks
{

View File

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

View File

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

View File

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

View File

@ -29,6 +29,7 @@ namespace MediaBrowser.Controller.Entities.Movies
Shares = new List<Share>();
}
[IgnoreDataMember]
protected override bool FilterLinkedChildrenPerUser
{
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> RemoteTrailerIds { get; set; }

View File

@ -21,5 +21,14 @@ namespace MediaBrowser.Controller.Entities
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> RemoteTrailerIds { get; set; }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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