< Summary - Jellyfin

Information
Class: Jellyfin.Api.Models.SessionDtos.ClientCapabilitiesDto
Assembly: Jellyfin.Api
File(s): /srv/git/jellyfin/Jellyfin.Api/Models/SessionDtos/ClientCapabilitiesDto.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 12
Coverable lines: 12
Total lines: 83
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
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%210%
ToClientCapabilities()100%210%

File(s)

/srv/git/jellyfin/Jellyfin.Api/Models/SessionDtos/ClientCapabilitiesDto.cs

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using System.ComponentModel;
 4using System.Text.Json.Serialization;
 5using Jellyfin.Data.Enums;
 6using Jellyfin.Extensions.Json.Converters;
 7using MediaBrowser.Model.Dlna;
 8using MediaBrowser.Model.Session;
 9
 10namespace Jellyfin.Api.Models.SessionDtos;
 11
 12/// <summary>
 13/// Client capabilities dto.
 14/// </summary>
 15public class ClientCapabilitiesDto
 16{
 17    /// <summary>
 18    /// Gets or sets the list of playable media types.
 19    /// </summary>
 20    [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
 21    public IReadOnlyList<MediaType> PlayableMediaTypes { get; set; } = Array.Empty<MediaType>();
 22
 23    /// <summary>
 24    /// Gets or sets the list of supported commands.
 25    /// </summary>
 26    [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
 27    public IReadOnlyList<GeneralCommandType> SupportedCommands { get; set; } = Array.Empty<GeneralCommandType>();
 28
 29    /// <summary>
 30    /// Gets or sets a value indicating whether session supports media control.
 31    /// </summary>
 32    public bool SupportsMediaControl { get; set; }
 33
 34    /// <summary>
 35    /// Gets or sets a value indicating whether session supports a persistent identifier.
 36    /// </summary>
 37    public bool SupportsPersistentIdentifier { get; set; }
 38
 39    /// <summary>
 40    /// Gets or sets the device profile.
 41    /// </summary>
 42    public DeviceProfile? DeviceProfile { get; set; }
 43
 44    /// <summary>
 45    /// Gets or sets the app store url.
 46    /// </summary>
 47    public string? AppStoreUrl { get; set; }
 48
 49    /// <summary>
 50    /// Gets or sets the icon url.
 51    /// </summary>
 52    public string? IconUrl { get; set; }
 53
 54#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
 55    // TODO: Remove after 10.9
 56    [Obsolete("Unused")]
 57    [DefaultValue(false)]
 058    public bool? SupportsContentUploading { get; set; } = false;
 59
 60    // TODO: Remove after 10.9
 61    [Obsolete("Unused")]
 62    [DefaultValue(false)]
 063    public bool? SupportsSync { get; set; } = false;
 64#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
 65
 66    /// <summary>
 67    /// Convert the dto to the full <see cref="ClientCapabilities"/> model.
 68    /// </summary>
 69    /// <returns>The converted <see cref="ClientCapabilities"/> model.</returns>
 70    public ClientCapabilities ToClientCapabilities()
 71    {
 072        return new ClientCapabilities
 073        {
 074            PlayableMediaTypes = PlayableMediaTypes,
 075            SupportedCommands = SupportedCommands,
 076            SupportsMediaControl = SupportsMediaControl,
 077            SupportsPersistentIdentifier = SupportsPersistentIdentifier,
 078            DeviceProfile = DeviceProfile,
 079            AppStoreUrl = AppStoreUrl,
 080            IconUrl = IconUrl
 081        };
 82    }
 83}

Methods/Properties

.ctor()
ToClientCapabilities()