diff options
| author | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
|---|---|---|
| committer | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
| commit | 48facb797ed912e4ea6b04b17d1ff190ac2daac4 (patch) | |
| tree | 8dae77a31670a888d733484cb17dd4077d5444e8 /MediaBrowser.Controller/Dto | |
| parent | c32d8656382a0eacb301692e0084377fc433ae9b (diff) | |
Update to 3.5.2 and .net core 2.1
Diffstat (limited to 'MediaBrowser.Controller/Dto')
| -rw-r--r-- | MediaBrowser.Controller/Dto/DtoOptions.cs | 69 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Dto/IDtoService.cs | 86 |
2 files changed, 0 insertions, 155 deletions
diff --git a/MediaBrowser.Controller/Dto/DtoOptions.cs b/MediaBrowser.Controller/Dto/DtoOptions.cs deleted file mode 100644 index f05ae4e71..000000000 --- a/MediaBrowser.Controller/Dto/DtoOptions.cs +++ /dev/null @@ -1,69 +0,0 @@ -using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Querying; -using System; -using System.Collections.Generic; -using System.Linq; - -namespace MediaBrowser.Controller.Dto -{ - public class DtoOptions - { - private static readonly List<ItemFields> DefaultExcludedFields = new List<ItemFields> - { - ItemFields.SeasonUserData, - ItemFields.RefreshState - }; - - public ItemFields[] Fields { get; set; } - public ImageType[] ImageTypes { get; set; } - public int ImageTypeLimit { get; set; } - public bool EnableImages { get; set; } - public bool AddProgramRecordingInfo { get; set; } - public string DeviceId { get; set; } - public bool EnableUserData { get; set; } - public bool AddCurrentProgram { get; set; } - - public DtoOptions() - : this(true) - { - } - - private static readonly ImageType[] AllImageTypes = Enum.GetNames(typeof(ImageType)) - .Select(i => (ImageType)Enum.Parse(typeof(ImageType), i, true)) - .ToArray(); - - private static readonly ItemFields[] AllItemFields = Enum.GetNames(typeof(ItemFields)) - .Select(i => (ItemFields)Enum.Parse(typeof(ItemFields), i, true)) - .Except(DefaultExcludedFields) - .ToArray(); - - public DtoOptions(bool allFields) - { - ImageTypeLimit = int.MaxValue; - EnableImages = true; - EnableUserData = true; - AddCurrentProgram = true; - - if (allFields) - { - Fields = AllItemFields; - } - else - { - Fields = new ItemFields[] { }; - } - - ImageTypes = AllImageTypes; - } - - public int GetImageLimit(ImageType type) - { - if (EnableImages && ImageTypes.Contains(type)) - { - return ImageTypeLimit; - } - - return 0; - } - } -} diff --git a/MediaBrowser.Controller/Dto/IDtoService.cs b/MediaBrowser.Controller/Dto/IDtoService.cs deleted file mode 100644 index 5ba6e036e..000000000 --- a/MediaBrowser.Controller/Dto/IDtoService.cs +++ /dev/null @@ -1,86 +0,0 @@ -using MediaBrowser.Controller.Entities; -using MediaBrowser.Model.Dto; -using MediaBrowser.Model.Querying; -using System.Collections.Generic; -using MediaBrowser.Controller.Sync; - -namespace MediaBrowser.Controller.Dto -{ - /// <summary> - /// Interface IDtoService - /// </summary> - public interface IDtoService - { - /// <summary> - /// Gets the dto id. - /// </summary> - /// <param name="item">The item.</param> - /// <returns>System.String.</returns> - string GetDtoId(BaseItem item); - - /// <summary> - /// Attaches the primary image aspect ratio. - /// </summary> - /// <param name="dto">The dto.</param> - /// <param name="item">The item.</param> - void AttachPrimaryImageAspectRatio(IItemDto dto, BaseItem item); - - /// <summary> - /// Gets the primary image aspect ratio. - /// </summary> - /// <param name="item">The item.</param> - /// <returns>System.Nullable<System.Double>.</returns> - double? GetPrimaryImageAspectRatio(BaseItem item); - - /// <summary> - /// Gets the base item dto. - /// </summary> - /// <param name="item">The item.</param> - /// <param name="fields">The fields.</param> - /// <param name="user">The user.</param> - /// <param name="owner">The owner.</param> - BaseItemDto GetBaseItemDto(BaseItem item, ItemFields[] fields, User user = null, BaseItem owner = null); - - /// <summary> - /// Gets the base item dto. - /// </summary> - /// <param name="item">The item.</param> - /// <param name="options">The options.</param> - /// <param name="user">The user.</param> - /// <param name="owner">The owner.</param> - /// <returns>BaseItemDto.</returns> - BaseItemDto GetBaseItemDto(BaseItem item, DtoOptions options, User user = null, BaseItem owner = null); - - /// <summary> - /// Gets the base item dtos. - /// </summary> - /// <param name="items">The items.</param> - /// <param name="options">The options.</param> - /// <param name="user">The user.</param> - /// <param name="owner">The owner.</param> - BaseItemDto[] GetBaseItemDtos(BaseItem[] items, DtoOptions options, User user = null, BaseItem owner = null); - - BaseItemDto[] GetBaseItemDtos(List<BaseItem> items, DtoOptions options, User user = null, BaseItem owner = null); - - /// <summary> - /// Gets the chapter information dto. - /// </summary> - /// <param name="item">The item.</param> - /// <returns>ChapterInfoDto.</returns> - List<ChapterInfoDto> GetChapterInfoDtos(BaseItem item); - - /// <summary> - /// Gets the user item data dto. - /// </summary> - /// <param name="data">The data.</param> - /// <returns>UserItemDataDto.</returns> - UserItemDataDto GetUserItemDataDto(UserItemData data); - - /// <summary> - /// Gets the item by name dto. - /// </summary> - BaseItemDto GetItemByNameDto(BaseItem item, DtoOptions options, List<BaseItem> taggedItems, Dictionary<string, SyncedItemProgress> syncProgress, User user = null); - - Dictionary<string, SyncedItemProgress> GetSyncedItemProgress(DtoOptions options); - } -} |
