| | 1 | | using System; |
| | 2 | | using System.Collections.Generic; |
| | 3 | | using System.Linq; |
| | 4 | | using MediaBrowser.Model.System; |
| | 5 | |
|
| | 6 | | namespace Jellyfin.Api.Models.SystemInfoDtos; |
| | 7 | |
|
| | 8 | | /// <summary> |
| | 9 | | /// Contains informations about the systems storage. |
| | 10 | | /// </summary> |
| | 11 | | public record SystemStorageDto |
| | 12 | | { |
| | 13 | | /// <summary> |
| | 14 | | /// Gets or sets the Storage information of the program data folder. |
| | 15 | | /// </summary> |
| | 16 | | public required FolderStorageDto ProgramDataFolder { get; set; } |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// Gets or sets the Storage information of the web UI resources folder. |
| | 20 | | /// </summary> |
| | 21 | | public required FolderStorageDto WebFolder { get; set; } |
| | 22 | |
|
| | 23 | | /// <summary> |
| | 24 | | /// Gets or sets the Storage information of the folder where images are cached. |
| | 25 | | /// </summary> |
| | 26 | | public required FolderStorageDto ImageCacheFolder { get; set; } |
| | 27 | |
|
| | 28 | | /// <summary> |
| | 29 | | /// Gets or sets the Storage information of the cache folder. |
| | 30 | | /// </summary> |
| | 31 | | public required FolderStorageDto CacheFolder { get; set; } |
| | 32 | |
|
| | 33 | | /// <summary> |
| | 34 | | /// Gets or sets the Storage information of the folder where logfiles are saved to. |
| | 35 | | /// </summary> |
| | 36 | | public required FolderStorageDto LogFolder { get; set; } |
| | 37 | |
|
| | 38 | | /// <summary> |
| | 39 | | /// Gets or sets the Storage information of the folder where metadata is stored. |
| | 40 | | /// </summary> |
| | 41 | | public required FolderStorageDto InternalMetadataFolder { get; set; } |
| | 42 | |
|
| | 43 | | /// <summary> |
| | 44 | | /// Gets or sets the Storage information of the transcoding cache. |
| | 45 | | /// </summary> |
| | 46 | | public required FolderStorageDto TranscodingTempFolder { get; set; } |
| | 47 | |
|
| | 48 | | /// <summary> |
| | 49 | | /// Gets or sets the storage informations of all libraries. |
| | 50 | | /// </summary> |
| | 51 | | public required IReadOnlyCollection<LibraryStorageDto> Libraries { get; set; } |
| | 52 | |
|
| | 53 | | internal static SystemStorageDto FromSystemStorageInfo(SystemStorageInfo model) |
| | 54 | | { |
| 0 | 55 | | return new SystemStorageDto() |
| 0 | 56 | | { |
| 0 | 57 | | ProgramDataFolder = FolderStorageDto.FromFolderStorageInfo(model.ProgramDataFolder), |
| 0 | 58 | | WebFolder = FolderStorageDto.FromFolderStorageInfo(model.WebFolder), |
| 0 | 59 | | ImageCacheFolder = FolderStorageDto.FromFolderStorageInfo(model.ImageCacheFolder), |
| 0 | 60 | | CacheFolder = FolderStorageDto.FromFolderStorageInfo(model.CacheFolder), |
| 0 | 61 | | LogFolder = FolderStorageDto.FromFolderStorageInfo(model.LogFolder), |
| 0 | 62 | | InternalMetadataFolder = FolderStorageDto.FromFolderStorageInfo(model.InternalMetadataFolder), |
| 0 | 63 | | TranscodingTempFolder = FolderStorageDto.FromFolderStorageInfo(model.TranscodingTempFolder), |
| 0 | 64 | | Libraries = model.Libraries.Select(LibraryStorageDto.FromLibraryStorageModel).ToArray() |
| 0 | 65 | | }; |
| | 66 | | } |
| | 67 | | } |