mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 15:48:03 +00:00
Some checks failed
CodeQL / Analyze (csharp) (push) Has been cancelled
OpenAPI / OpenAPI - HEAD (push) Has been cancelled
OpenAPI / OpenAPI - BASE (push) Has been cancelled
Tests / run-tests (macos-latest) (push) Has been cancelled
Tests / run-tests (ubuntu-latest) (push) Has been cancelled
Tests / run-tests (windows-latest) (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
OpenAPI / OpenAPI - Difference (push) Has been cancelled
OpenAPI / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI / OpenAPI - Publish Stable Spec (push) Has been cancelled
38 lines
1022 B
C#
38 lines
1022 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using MediaBrowser.Model.System;
|
|
|
|
namespace Jellyfin.Api.Models.SystemInfoDtos;
|
|
|
|
/// <summary>
|
|
/// Contains informations about a libraries storage informations.
|
|
/// </summary>
|
|
public record LibraryStorageDto
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the Library Id.
|
|
/// </summary>
|
|
public required Guid Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the name of the library.
|
|
/// </summary>
|
|
public required string Name { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the storage informations about the folders used in a library.
|
|
/// </summary>
|
|
public required IReadOnlyCollection<FolderStorageDto> Folders { get; set; }
|
|
|
|
internal static LibraryStorageDto FromLibraryStorageModel(LibraryStorageInfo model)
|
|
{
|
|
return new()
|
|
{
|
|
Id = model.Id,
|
|
Name = model.Name,
|
|
Folders = model.Folders.Select(FolderStorageDto.FromFolderStorageInfo).ToArray()
|
|
};
|
|
}
|
|
}
|