< Summary - Jellyfin

Information
Class: MediaBrowser.Model.Dto.UserDto
Assembly: MediaBrowser.Model
File(s): /srv/git/jellyfin/MediaBrowser.Model/Dto/UserDto.cs
Line coverage
85%
Covered lines: 6
Uncovered lines: 1
Coverable lines: 7
Total lines: 116
Line coverage: 85.7%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 9/14/2025 - 12:09:49 AM Line coverage: 75% (3/4) Branch coverage: 0% (0/2) Total lines: 11311/28/2025 - 12:11:11 AM Line coverage: 85.7% (6/7) Branch coverage: 0% (0/2) Total lines: 116 9/14/2025 - 12:09:49 AM Line coverage: 75% (3/4) Branch coverage: 0% (0/2) Total lines: 11311/28/2025 - 12:11:11 AM Line coverage: 85.7% (6/7) Branch coverage: 0% (0/2) Total lines: 116

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%
ToString()0%620%

File(s)

/srv/git/jellyfin/MediaBrowser.Model/Dto/UserDto.cs

#LineLine coverage
 1#nullable disable
 2using System;
 3using System.ComponentModel;
 4using MediaBrowser.Model.Configuration;
 5using MediaBrowser.Model.Users;
 6
 7namespace MediaBrowser.Model.Dto
 8{
 9    /// <summary>
 10    /// Class UserDto.
 11    /// </summary>
 12    public class UserDto : IItemDto, IHasServerId
 13    {
 14        /// <summary>
 15        /// Initializes a new instance of the <see cref="UserDto"/> class.
 16        /// </summary>
 17        public UserDto()
 18        {
 5419            Configuration = new UserConfiguration();
 5420            Policy = new UserPolicy();
 5421        }
 22
 23        /// <summary>
 24        /// Gets or sets the name.
 25        /// </summary>
 26        /// <value>The name.</value>
 27        public string Name { get; set; }
 28
 29        /// <summary>
 30        /// Gets or sets the server identifier.
 31        /// </summary>
 32        /// <value>The server identifier.</value>
 33        public string ServerId { get; set; }
 34
 35        /// <summary>
 36        /// Gets or sets the name of the server.
 37        /// This is not used by the server and is for client-side usage only.
 38        /// </summary>
 39        /// <value>The name of the server.</value>
 40        public string ServerName { get; set; }
 41
 42        /// <summary>
 43        /// Gets or sets the id.
 44        /// </summary>
 45        /// <value>The id.</value>
 46        public Guid Id { get; set; }
 47
 48        /// <summary>
 49        /// Gets or sets the primary image tag.
 50        /// </summary>
 51        /// <value>The primary image tag.</value>
 52        public string PrimaryImageTag { get; set; }
 53
 54        /// <summary>
 55        /// Gets or sets a value indicating whether this instance has password.
 56        /// </summary>
 57        /// <value><c>true</c> if this instance has password; otherwise, <c>false</c>.</value>
 58        [Obsolete("This information is no longer provided")]
 5459        public bool? HasPassword { get; set; } = true;
 60
 61        /// <summary>
 62        /// Gets or sets a value indicating whether this instance has configured password.
 63        /// </summary>
 64        /// <value><c>true</c> if this instance has configured password; otherwise, <c>false</c>.</value>
 65        [Obsolete("This is always true")]
 5466        public bool? HasConfiguredPassword { get; set; } = true;
 67
 68        /// <summary>
 69        /// Gets or sets a value indicating whether this instance has configured easy password.
 70        /// </summary>
 71        /// <value><c>true</c> if this instance has configured easy password; otherwise, <c>false</c>.</value>
 72        [Obsolete("Easy Password has been replaced with Quick Connect")]
 5473        public bool? HasConfiguredEasyPassword { get; set; } = false;
 74
 75        /// <summary>
 76        /// Gets or sets whether async login is enabled or not.
 77        /// </summary>
 78        public bool? EnableAutoLogin { get; set; }
 79
 80        /// <summary>
 81        /// Gets or sets the last login date.
 82        /// </summary>
 83        /// <value>The last login date.</value>
 84        public DateTime? LastLoginDate { get; set; }
 85
 86        /// <summary>
 87        /// Gets or sets the last activity date.
 88        /// </summary>
 89        /// <value>The last activity date.</value>
 90        public DateTime? LastActivityDate { get; set; }
 91
 92        /// <summary>
 93        /// Gets or sets the configuration.
 94        /// </summary>
 95        /// <value>The configuration.</value>
 96        public UserConfiguration Configuration { get; set; }
 97
 98        /// <summary>
 99        /// Gets or sets the policy.
 100        /// </summary>
 101        /// <value>The policy.</value>
 102        public UserPolicy Policy { get; set; }
 103
 104        /// <summary>
 105        /// Gets or sets the primary image aspect ratio.
 106        /// </summary>
 107        /// <value>The primary image aspect ratio.</value>
 108        public double? PrimaryImageAspectRatio { get; set; }
 109
 110        /// <inheritdoc />
 111        public override string ToString()
 112        {
 0113            return Name ?? base.ToString();
 114        }
 115    }
 116}

Methods/Properties

.ctor()
ToString()