aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Dto
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/Dto')
-rw-r--r--MediaBrowser.Server.Implementations/Dto/DtoService.cs45
1 files changed, 0 insertions, 45 deletions
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
index ff94552dad..0aec3230da 100644
--- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs
+++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
@@ -397,12 +397,6 @@ namespace MediaBrowser.Server.Implementations.Dto
collectionFolder.GetViewType(user);
}
- var playlist = item as Playlist;
- if (playlist != null)
- {
- AttachLinkedChildImages(dto, playlist, user, options);
- }
-
if (fields.Contains(ItemFields.CanDelete))
{
dto.CanDelete = user == null
@@ -1564,45 +1558,6 @@ namespace MediaBrowser.Server.Implementations.Dto
}
}
- private void AttachLinkedChildImages(BaseItemDto dto, Folder folder, User user, DtoOptions options)
- {
- List<BaseItem> linkedChildren = null;
-
- var backdropLimit = options.GetImageLimit(ImageType.Backdrop);
-
- if (backdropLimit > 0 && dto.BackdropImageTags.Count == 0)
- {
- linkedChildren = user == null
- ? folder.GetRecursiveChildren().ToList()
- : folder.GetRecursiveChildren(user).ToList();
-
- var parentWithBackdrop = linkedChildren.FirstOrDefault(i => i.GetImages(ImageType.Backdrop).Any());
-
- if (parentWithBackdrop != null)
- {
- dto.ParentBackdropItemId = GetDtoId(parentWithBackdrop);
- dto.ParentBackdropImageTags = GetBackdropImageTags(parentWithBackdrop, backdropLimit);
- }
- }
-
- if (!dto.ImageTags.ContainsKey(ImageType.Primary) && options.GetImageLimit(ImageType.Primary) > 0)
- {
- if (linkedChildren == null)
- {
- linkedChildren = user == null
- ? folder.GetRecursiveChildren().ToList()
- : folder.GetRecursiveChildren(user).ToList();
- }
- var parentWithImage = linkedChildren.FirstOrDefault(i => i.GetImages(ImageType.Primary).Any());
-
- if (parentWithImage != null)
- {
- dto.ParentPrimaryImageItemId = GetDtoId(parentWithImage);
- dto.ParentPrimaryImageTag = GetImageCacheTag(parentWithImage, ImageType.Primary);
- }
- }
- }
-
private string GetMappedPath(IHasMetadata item)
{
var path = item.Path;