< Summary - Jellyfin

Information
Class: Emby.Server.Implementations.Playlists.PlaylistsFolder
Assembly: Emby.Server.Implementations
File(s): /srv/git/jellyfin/Emby.Server.Implementations/Playlists/PlaylistsFolder.cs
Line coverage
71%
Covered lines: 10
Uncovered lines: 4
Coverable lines: 14
Total lines: 55
Line coverage: 71.4%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%
get_IsHidden()100%210%
get_SupportsInheritedParentImages()100%11100%
get_CollectionType()100%11100%
GetEligibleChildrenForRecursiveChildren(...)100%210%
GetItemsInternal(...)50%2266.66%
GetClientTypeName()100%11100%

File(s)

/srv/git/jellyfin/Emby.Server.Implementations/Playlists/PlaylistsFolder.cs

#LineLine coverage
 1#pragma warning disable CS1591
 2
 3using System.Collections.Generic;
 4using System.Linq;
 5using System.Text.Json.Serialization;
 6using Jellyfin.Data.Enums;
 7using Jellyfin.Database.Implementations.Entities;
 8using MediaBrowser.Common;
 9using MediaBrowser.Controller.Entities;
 10using MediaBrowser.Controller.Playlists;
 11using MediaBrowser.Model.Querying;
 12
 13namespace Emby.Server.Implementations.Playlists
 14{
 15    [RequiresSourceSerialisation]
 16    public class PlaylistsFolder : BasePluginFolder
 17    {
 9118        public PlaylistsFolder()
 19        {
 9120            Name = "Playlists";
 9121        }
 22
 23        [JsonIgnore]
 024        public override bool IsHidden => true;
 25
 26        [JsonIgnore]
 327        public override bool SupportsInheritedParentImages => false;
 28
 29        [JsonIgnore]
 430        public override CollectionType? CollectionType => Jellyfin.Data.Enums.CollectionType.playlists;
 31
 32        protected override IEnumerable<BaseItem> GetEligibleChildrenForRecursiveChildren(User user)
 33        {
 034            return base.GetEligibleChildrenForRecursiveChildren(user).OfType<Playlist>();
 35        }
 36
 37        protected override QueryResult<BaseItem> GetItemsInternal(InternalItemsQuery query)
 38        {
 139            if (query.User is null)
 40            {
 041                query.Recursive = false;
 042                return base.GetItemsInternal(query);
 43            }
 44
 145            query.Recursive = true;
 146            query.IncludeItemTypes = new[] { BaseItemKind.Playlist };
 147            return QueryWithPostFiltering2(query);
 48        }
 49
 50        public override string GetClientTypeName()
 51        {
 452            return "ManualPlaylistsFolder";
 53        }
 54    }
 55}