The Free Software Media System - Server Backend & API
Reduce warnings in MediaBrowser.Controller (#6006)
Cody Robiberoe3f55a0c54a2
diff --git a/Emby.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.csindex 1b85a9d4ba..c56f334481 100644--- a/Emby.Server.Implementations/Collections/CollectionManager.cs+++ b/Emby.Server.Implementations/Collections/CollectionManager.cs@@ -164,7 +164,7 @@ namespace Emby.Server.Implementations.CollectionsparentFolder.AddChild(collection, CancellationToken.None);- if (options.ItemIdList.Length > 0)+ if (options.ItemIdList.Count > 0){await AddToCollectionAsync(collection.Id,@@ -248,11 +248,7 @@ namespace Emby.Server.Implementations.Collectionsif (fireEvent){- ItemsAddedToCollection?.Invoke(this, new CollectionModifiedEventArgs- {- Collection = collection,- ItemsChanged = itemList- });+ ItemsAddedToCollection?.Invoke(this, new CollectionModifiedEventArgs(collection, itemList));}}}@@ -304,11 +300,7 @@ namespace Emby.Server.Implementations.Collections},RefreshPriority.High);- ItemsRemovedFromCollection?.Invoke(this, new CollectionModifiedEventArgs- {- Collection = collection,- ItemsChanged = itemList- });+ ItemsRemovedFromCollection?.Invoke(this, new CollectionModifiedEventArgs(collection, itemList));}/// <inheritdoc />diff --git a/Emby.Server.Implementations/Images/BaseDynamicImageProvider.cs b/Emby.Server.Implementations/Images/BaseDynamicImageProvider.csindex 5f7e51858a..6fa3c1c618 100644--- a/Emby.Server.Implementations/Images/BaseDynamicImageProvider.cs+++ b/Emby.Server.Implementations/Images/BaseDynamicImageProvider.cs@@ -191,7 +191,7 @@ namespace Emby.Server.Implementations.ImagesInputPaths = GetStripCollageImagePaths(primaryItem, items).ToArray()};- if (options.InputPaths.Length == 0)+ if (options.InputPaths.Count == 0){return null;}diff --git a/Jellyfin.Api/Controllers/MoviesController.cs b/Jellyfin.Api/Controllers/MoviesController.csindex d0a2358ae2..010a3b19a7 100644--- a/Jellyfin.Api/Controllers/MoviesController.cs+++ b/Jellyfin.Api/Controllers/MoviesController.cs@@ -18,6 +18,7 @@ using MediaBrowser.Model.Dto;using MediaBrowser.Model.Entities;using MediaBrowser.Model.Querying;using Microsoft.AspNetCore.Authorization;+using Microsoft.AspNetCore.Http;using Microsoft.AspNetCore.Mvc;namespace Jellyfin.Api.Controllers@@ -300,9 +301,8 @@ namespace Jellyfin.Api.Controllersprivate IEnumerable<string> GetActors(IEnumerable<BaseItem> items){- var people = _libraryManager.GetPeople(new InternalPeopleQuery+ var people = _libraryManager.GetPeople(new InternalPeopleQuery(Array.Empty<string>(), new[] { PersonType.Director }){- ExcludePersonTypes = new[] { PersonType.Director },MaxListOrder = 3});@@ -316,10 +316,9 @@ namespace Jellyfin.Api.Controllersprivate IEnumerable<string> GetDirectors(IEnumerable<BaseItem> items){- var people = _libraryManager.GetPeople(new InternalPeopleQuery- {- PersonTypes = new[] { PersonType.Director }- });+ var people = _libraryManager.GetPeople(new InternalPeopleQuery(+ new[] { PersonType.Director },+ Array.Empty<string>()));var itemIds = items.Select(i => i.Id).ToList();diff --git a/Jellyfin.Api/Controllers/PersonsController.cs b/Jellyfin.Api/Controllers/PersonsController.csindex 70a94e27cb..b98307f879 100644--- a/Jellyfin.Api/Controllers/PersonsController.cs+++ b/Jellyfin.Api/Controllers/PersonsController.cs@@ -94,10 +94,10 @@ namespace Jellyfin.Api.Controllers}var isFavoriteInFilters = filters.Any(f => f == ItemFilter.IsFavorite);- var peopleItems = _libraryManager.GetPeopleItems(new InternalPeopleQuery+ var peopleItems = _libraryManager.GetPeopleItems(new InternalPeopleQuery(+ personTypes,+ excludePersonTypes){- PersonTypes = personTypes,- ExcludePersonTypes = excludePersonTypes,NameContains = searchTerm,User = user,IsFavorite = !isFavorite.HasValue && isFavoriteInFilters ? true : isFavorite,diff --git a/Jellyfin.Drawing.Skia/StripCollageBuilder.cs b/Jellyfin.Drawing.Skia/StripCollageBuilder.csindex e9f9aad57d..09a3702385 100644--- a/Jellyfin.Drawing.Skia/StripCollageBuilder.cs+++ b/Jellyfin.Drawing.Skia/StripCollageBuilder.cs@@ -68,7 +68,7 @@ namespace Jellyfin.Drawing.Skia/// <param name="outputPath">The path at which to place the resulting collage image.</param>/// <param name="width">The desired width of the collage.</param>/// <param name="height">The desired height of the collage.</param>- public void BuildSquareCollage(string[] paths, string outputPath, int width, int height)+ public void BuildSquareCollage(IReadOnlyList<string> paths, string outputPath, int width, int height){using var bitmap = BuildSquareCollageBitmap(paths, width, height);using var outputStream = new SKFileWStream(outputPath);@@ -84,7 +84,7 @@ namespace Jellyfin.Drawing.Skia/// <param name="width">The desired width of the collage.</param>/// <param name="height">The desired height of the collage.</param>/// <param name="libraryName">The name of the library to draw on the collage.</param>- public void BuildThumbCollage(string[] paths, string outputPath, int width, int height, string? libraryName)+ public void BuildThumbCollage(IReadOnlyList<string> paths, string outputPath, int width, int height, string? libraryName){using var bitmap = BuildThumbCollageBitmap(paths, width, height, libraryName);using var outputStream = new SKFileWStream(outputPath);@@ -92,7 +92,7 @@ namespace Jellyfin.Drawing.Skiapixmap.Encode(outputStream, GetEncodedFormat(outputPath), 90);}- private SKBitmap BuildThumbCollageBitmap(string[] paths, int width, int height, string? libraryName)+ private SKBitmap BuildThumbCollageBitmap(IReadOnlyList<string> paths, int width, int height, string? libraryName){var bitmap = new SKBitmap(width, height);@@ -152,14 +152,14 @@ namespace Jellyfin.Drawing.Skiareturn bitmap;}- private SKBitmap? GetNextValidImage(string[] paths, int currentIndex, out int newIndex)+ private SKBitmap? GetNextValidImage(IReadOnlyList<string> paths, int currentIndex, out int newIndex){var imagesTested = new Dictionary<int, int>();SKBitmap? bitmap = null;- while (imagesTested.Count < paths.Length)+ while (imagesTested.Count < paths.Count){- if (currentIndex >= paths.Length)+ if (currentIndex >= paths.Count){currentIndex = 0;}@@ -180,7 +180,7 @@ namespace Jellyfin.Drawing.Skiareturn bitmap;}- private SKBitmap BuildSquareCollageBitmap(string[] paths, int width, int height)+ private SKBitmap BuildSquareCollageBitmap(IReadOnlyList<string> paths, int width, int height){var bitmap = new SKBitmap(width, height);var imageIndex = 0;diff --git a/MediaBrowser.Controller/Channels/ChannelItemInfo.cs b/MediaBrowser.Controller/Channels/ChannelItemInfo.csindex fa7aff647b..4d1e35f9ea 100644--- a/MediaBrowser.Controller/Channels/ChannelItemInfo.cs+++ b/MediaBrowser.Controller/Channels/ChannelItemInfo.cs@@ -13,6 +13,19 @@ namespace MediaBrowser.Controller.Channels{public class ChannelItemInfo : IHasProviderIds{+ public ChannelItemInfo()+ {+ MediaSources = new List<MediaSourceInfo>();+ TrailerTypes = new List<TrailerType>();+ Genres = new List<string>();+ Studios = new List<string>();+ People = new List<PersonInfo>();+ Tags = new List<string>();+ ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);+ Artists = new List<string>();+ AlbumArtists = new List<string>();+ }+public string Name { get; set; }public string SeriesName { get; set; }@@ -80,18 +93,5 @@ namespace MediaBrowser.Controller.Channelspublic bool IsLiveStream { get; set; }public string Etag { get; set; }-- public ChannelItemInfo()- {- MediaSources = new List<MediaSourceInfo>();- TrailerTypes = new List<TrailerType>();- Genres = new List<string>();- Studios = new List<string>();- People = new List<PersonInfo>();- Tags = new List<string>();- ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);- Artists = new List<string>();- AlbumArtists = new List<string>();- }}}diff --git a/MediaBrowser.Controller/Channels/ChannelItemResult.cs b/MediaBrowser.Controller/Channels/ChannelItemResult.csindex 8e937852f1..6b20776629 100644--- a/MediaBrowser.Controller/Channels/ChannelItemResult.cs+++ b/MediaBrowser.Controller/Channels/ChannelItemResult.cs@@ -8,13 +8,13 @@ namespace MediaBrowser.Controller.Channels{public class ChannelItemResult{- public List<ChannelItemInfo> Items { get; set; }-- public int? TotalRecordCount { get; set; }-public ChannelItemResult(){Items = new List<ChannelItemInfo>();}++ public List<ChannelItemInfo> Items { get; set; }++ public int? TotalRecordCount { get; set; }}}diff --git a/MediaBrowser.Controller/Channels/ChannelLatestMediaSearch.cs b/MediaBrowser.Controller/Channels/ChannelLatestMediaSearch.csnew file mode 100644index 0000000000..6f0761e64b--- /dev/null+++ b/MediaBrowser.Controller/Channels/ChannelLatestMediaSearch.cs@@ -0,0 +1,11 @@+#nullable disable++#pragma warning disable CS1591++namespace MediaBrowser.Controller.Channels+{+ public class ChannelLatestMediaSearch+ {+ public string UserId { get; set; }+ }+}\ No newline at end of filediff --git a/MediaBrowser.Controller/Channels/ChannelSearchInfo.cs b/MediaBrowser.Controller/Channels/ChannelSearchInfo.csindex 53a73d62a9..990b025bcb 100644--- a/MediaBrowser.Controller/Channels/ChannelSearchInfo.cs+++ b/MediaBrowser.Controller/Channels/ChannelSearchInfo.cs@@ -10,9 +10,4 @@ namespace MediaBrowser.Controller.Channelspublic string UserId { get; set; }}-- public class ChannelLatestMediaSearch- {- public string UserId { get; set; }- }}diff --git a/MediaBrowser.Controller/Collections/CollectionCreatedEventArgs.cs b/MediaBrowser.Controller/Collections/CollectionCreatedEventArgs.csnew file mode 100644index 0000000000..82b3a49773--- /dev/null+++ b/MediaBrowser.Controller/Collections/CollectionCreatedEventArgs.cs@@ -0,0 +1,24 @@+#nullable disable++#pragma warning disable CS1591++using System;+using MediaBrowser.Controller.Entities.Movies;++namespace MediaBrowser.Controller.Collections+{+ public class CollectionCreatedEventArgs : EventArgs+ {+ /// <summary>+ /// Gets or sets the collection.+ /// </summary>+ /// <value>The collection.</value>+ public BoxSet Collection { get; set; }++ /// <summary>+ /// Gets or sets the options.+ /// </summary>+ /// <value>The options.</value>+ public CollectionCreationOptions Options { get; set; }+ }+}\ No newline at end of filediff --git a/MediaBrowser.Controller/Collections/CollectionCreationOptions.cs b/MediaBrowser.Controller/Collections/CollectionCreationOptions.csindex 94e7541f87..30f5f4efa2 100644--- a/MediaBrowser.Controller/Collections/CollectionCreationOptions.cs+++ b/MediaBrowser.Controller/Collections/CollectionCreationOptions.cs@@ -25,8 +25,8 @@ namespace MediaBrowser.Controller.Collectionspublic Dictionary<string, string> ProviderIds { get; set; }- public string[] ItemIdList { get; set; }+ public IReadOnlyList<string> ItemIdList { get; set; }- public Guid[] UserIds { get; set; }+ public IReadOnlyList<Guid> UserIds { get; set; }}}diff --git a/MediaBrowser.Controller/Collections/CollectionEvents.cs b/MediaBrowser.Controller/Collections/CollectionModifiedEventArgs.cssimilarity index 55%rename from MediaBrowser.Controller/Collections/CollectionEvents.csrename to MediaBrowser.Controller/Collections/CollectionModifiedEventArgs.csindex 821318ffcb..8155cf3dbd 100644--- a/MediaBrowser.Controller/Collections/CollectionEvents.cs+++ b/MediaBrowser.Controller/Collections/CollectionModifiedEventArgs.cs@@ -9,23 +9,14 @@ using MediaBrowser.Controller.Entities.Movies;namespace MediaBrowser.Controller.Collections{- public class CollectionCreatedEventArgs : EventArgs- {- /// <summary>- /// Gets or sets the collection.- /// </summary>- /// <value>The collection.</value>- public BoxSet Collection { get; set; }-- /// <summary>- /// Gets or sets the options.- /// </summary>- /// <value>The options.</value>- public CollectionCreationOptions Options { get; set; }- }-public class CollectionModifiedEventArgs : EventArgs{+ public CollectionModifiedEventArgs(BoxSet collection, IReadOnlyCollection<BaseItem> itemsChanged)+ {+ Collection = collection;+ ItemsChanged = itemsChanged;+ }+/// <summary>/// Gets or sets the collection./// </summary>@@ -36,6 +27,6 @@ namespace MediaBrowser.Controller.Collections/// Gets or sets the items changed./// </summary>/// <value>The items changed.</value>- public List<BaseItem> ItemsChanged { get; set; }+ public IReadOnlyCollection<BaseItem> ItemsChanged { get; set; }}}diff --git a/MediaBrowser.Controller/Drawing/ImageCollageOptions.cs b/MediaBrowser.Controller/Drawing/ImageCollageOptions.csindex f06bbe4d0d..e9c88ffb56 100644--- a/MediaBrowser.Controller/Drawing/ImageCollageOptions.cs+++ b/MediaBrowser.Controller/Drawing/ImageCollageOptions.cs@@ -1,5 +1,7 @@#nullable disable+using System.Collections.Generic;+#pragma warning disable CS1591namespace MediaBrowser.Controller.Drawing@@ -10,7 +12,7 @@ namespace MediaBrowser.Controller.Drawing/// Gets or sets the input paths./// </summary>/// <value>The input paths.</value>- public string[] InputPaths { get; set; }+ public IReadOnlyList<string> InputPaths { get; set; }/// <summary>/// Gets or sets the output path.diff --git a/MediaBrowser.Controller/Drawing/ImageStream.cs b/MediaBrowser.Controller/Drawing/ImageStream.csindex 591cc53d10..5ee781ffa9 100644--- a/MediaBrowser.Controller/Drawing/ImageStream.cs+++ b/MediaBrowser.Controller/Drawing/ImageStream.cs@@ -22,9 +22,15 @@ namespace MediaBrowser.Controller.Drawingpublic void Dispose(){- if (Stream != null)+ Dispose(true);+ GC.SuppressFinalize(this);+ }++ protected virtual void Dispose(bool disposing)+ {+ if (disposing){- Stream.Dispose();+ Stream?.Dispose();}}}diff --git a/MediaBrowser.Controller/Dto/DtoOptions.cs b/MediaBrowser.Controller/Dto/DtoOptions.csindex 758e841a7f..ecc833154d 100644--- a/MediaBrowser.Controller/Dto/DtoOptions.cs+++ b/MediaBrowser.Controller/Dto/DtoOptions.cs@@ -18,37 +18,17 @@ namespace MediaBrowser.Controller.DtoItemFields.RefreshState};- public IReadOnlyList<ItemFields> Fields { get; set; }-- public IReadOnlyList<ImageType> ImageTypes { get; set; }-- public int ImageTypeLimit { get; set; }-- public bool EnableImages { get; set; }-- public bool AddProgramRecordingInfo { get; set; }-- public bool EnableUserData { get; set; }+ private static readonly ImageType[] AllImageTypes = Enum.GetValues<ImageType>();- public bool AddCurrentProgram { get; set; }+ private static readonly ItemFields[] AllItemFields = Enum.GetValues<ItemFields>()+ .Except(DefaultExcludedFields)+ .ToArray();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 bool ContainsField(ItemFields field)- => Fields.Contains(field);-public DtoOptions(bool allFields){ImageTypeLimit = int.MaxValue;@@ -60,6 +40,23 @@ namespace MediaBrowser.Controller.DtoImageTypes = AllImageTypes;}+ public IReadOnlyList<ItemFields> Fields { get; set; }++ public IReadOnlyList<ImageType> ImageTypes { get; set; }++ public int ImageTypeLimit { get; set; }++ public bool EnableImages { get; set; }++ public bool AddProgramRecordingInfo { get; set; }++ public bool EnableUserData { get; set; }++ public bool AddCurrentProgram { get; set; }++ public bool ContainsField(ItemFields field)+ => Fields.Contains(field);+public int GetImageLimit(ImageType type){if (EnableImages && ImageTypes.Contains(type))diff --git a/MediaBrowser.Controller/Entities/AggregateFolder.cs b/MediaBrowser.Controller/Entities/AggregateFolder.csindex f1944a7d3d..e365bfda1f 100644--- a/MediaBrowser.Controller/Entities/AggregateFolder.cs+++ b/MediaBrowser.Controller/Entities/AggregateFolder.cs@@ -86,6 +86,7 @@ namespace MediaBrowser.Controller.Entities}private bool _requiresRefresh;+public override bool RequiresRefresh(){var changed = base.RequiresRefresh() || _requiresRefresh;diff --git a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs b/MediaBrowser.Controller/Entities/Audio/MusicArtist.csindex 6101d30169..b07c3eed13 100644--- a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs+++ b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs@@ -114,7 +114,7 @@ namespace MediaBrowser.Controller.Entities.Audio}/// <summary>- /// Returns the folder containing the item.+ /// Gets the folder containing the item./// If the item is a folder, it returns the folder itself./// </summary>/// <value>The containing folder path.</value>diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.csindex ca52132735..238c98982c 100644--- a/MediaBrowser.Controller/Entities/BaseItem.cs+++ b/MediaBrowser.Controller/Entities/BaseItem.cs@@ -339,9 +339,9 @@ namespace MediaBrowser.Controller.Entitiesget{// if (IsOffline)- //{+ // {// return LocationType.Offline;- //}+ // }var path = Path;if (string.IsNullOrEmpty(path))@@ -2769,11 +2769,11 @@ namespace MediaBrowser.Controller.Entities// var parentId = Id;// if (!video.IsOwnedItem || video.ParentId != parentId)- //{+ // {// video.IsOwnedItem = true;// video.ParentId = parentId;// newOptions.ForceSave = true;- //}+ // }if (video == null){diff --git a/MediaBrowser.Controller/Entities/Book.cs b/MediaBrowser.Controller/Entities/Book.csindex 3d0370248e..d75beb06da 100644--- a/MediaBrowser.Controller/Entities/Book.cs+++ b/MediaBrowser.Controller/Entities/Book.cs@@ -12,6 +12,11 @@ namespace MediaBrowser.Controller.Entities{public class Book : BaseItem, IHasLookupInfo<BookInfo>, IHasSeries{+ public Book()+ {+ this.RunTimeTicks = TimeSpan.TicksPerSecond;+ }+[JsonIgnore]public override string MediaType => Model.Entities.MediaType.Book;@@ -28,11 +33,6 @@ namespace MediaBrowser.Controller.Entities[JsonIgnore]public Guid SeriesId { get; set; }- public Book()- {- this.RunTimeTicks = TimeSpan.TicksPerSecond;- }-public string FindSeriesSortName(){return SeriesName;diff --git a/MediaBrowser.Controller/Entities/Genre.cs b/MediaBrowser.Controller/Entities/Genre.csindex 7987f38a07..310c0c9ec7 100644--- a/MediaBrowser.Controller/Entities/Genre.cs+++ b/MediaBrowser.Controller/Entities/Genre.cs@@ -35,7 +35,7 @@ namespace MediaBrowser.Controller.Entities}/// <summary>- /// Returns the folder containing the item.+ /// Gets the folder containing the item./// If the item is a folder, it returns the folder itself./// </summary>/// <value>The containing folder path.</value>diff --git a/MediaBrowser.Controller/Entities/InternalPeopleQuery.cs b/MediaBrowser.Controller/Entities/InternalPeopleQuery.csindex b2d6a46091..3e1d892748 100644--- a/MediaBrowser.Controller/Entities/InternalPeopleQuery.cs+++ b/MediaBrowser.Controller/Entities/InternalPeopleQuery.cs@@ -3,12 +3,24 @@#pragma warning disable CS1591using System;+using System.Collections.Generic;using Jellyfin.Data.Entities;namespace MediaBrowser.Controller.Entities{public class InternalPeopleQuery{+ public InternalPeopleQuery()+ : this(Array.Empty<string>(), Array.Empty<string>())+ {+ }++ public InternalPeopleQuery(IReadOnlyList<string> personTypes, IReadOnlyList<string> excludePersonTypes)+ {+ PersonTypes = personTypes;+ ExcludePersonTypes = excludePersonTypes;+ }+/// <summary>/// Gets or sets the maximum number of items the query should return./// </summary>@@ -16,9 +28,9 @@ namespace MediaBrowser.Controller.Entitiespublic Guid ItemId { get; set; }- public string[] PersonTypes { get; set; }+ public IReadOnlyList<string> PersonTypes { get; }- public string[] ExcludePersonTypes { get; set; }+ public IReadOnlyList<string> ExcludePersonTypes { get; }public int? MaxListOrder { get; set; }@@ -29,11 +41,5 @@ namespace MediaBrowser.Controller.Entitiespublic User User { get; set; }public bool? IsFavorite { get; set; }-- public InternalPeopleQuery()- {- PersonTypes = Array.Empty<string>();- ExcludePersonTypes = Array.Empty<string>();- }}}diff --git a/MediaBrowser.Controller/Entities/LinkedChild.cs b/MediaBrowser.Controller/Entities/LinkedChild.csindex 01c0a93393..fd5fef3dc5 100644--- a/MediaBrowser.Controller/Entities/LinkedChild.cs+++ b/MediaBrowser.Controller/Entities/LinkedChild.cs@@ -3,15 +3,18 @@#pragma warning disable CS1591using System;-using System.Collections.Generic;using System.Globalization;using System.Text.Json.Serialization;-using MediaBrowser.Model.IO;namespace MediaBrowser.Controller.Entities{public class LinkedChild{+ public LinkedChild()+ {+ Id = Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture);+ }+public string Path { get; set; }public LinkedChildType Type { get; set; }@@ -22,7 +25,7 @@ namespace MediaBrowser.Controller.Entitiespublic string Id { get; set; }/// <summary>- /// Serves as a cache.+ /// Gets or sets the linked item id./// </summary>public Guid? ItemId { get; set; }@@ -41,41 +44,5 @@ namespace MediaBrowser.Controller.Entitiesreturn child;}-- public LinkedChild()- {- Id = Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture);- }- }-- public enum LinkedChildType- {- Manual = 0,- Shortcut = 1- }-- public class LinkedChildComparer : IEqualityComparer<LinkedChild>- {- private readonly IFileSystem _fileSystem;-- public LinkedChildComparer(IFileSystem fileSystem)- {- _fileSystem = fileSystem;- }-- public bool Equals(LinkedChild x, LinkedChild y)- {- if (x.Type == y.Type)- {- return _fileSystem.AreEqual(x.Path, y.Path);- }-- return false;- }-- public int GetHashCode(LinkedChild obj)- {- return ((obj.Path ?? string.Empty) + (obj.LibraryItemId ?? string.Empty) + obj.Type).GetHashCode();- }}}diff --git a/MediaBrowser.Controller/Entities/LinkedChildComparer.cs b/MediaBrowser.Controller/Entities/LinkedChildComparer.csnew file mode 100644index 0000000000..66fc44b8a9--- /dev/null+++ b/MediaBrowser.Controller/Entities/LinkedChildComparer.cs@@ -0,0 +1,34 @@+#nullable disable++#pragma warning disable CS1591++using System.Collections.Generic;+using MediaBrowser.Model.IO;++namespace MediaBrowser.Controller.Entities+{+ public class LinkedChildComparer : IEqualityComparer<LinkedChild>+ {+ private readonly IFileSystem _fileSystem;++ public LinkedChildComparer(IFileSystem fileSystem)+ {+ _fileSystem = fileSystem;+ }++ public bool Equals(LinkedChild x, LinkedChild y)+ {+ if (x.Type == y.Type)+ {+ return _fileSystem.AreEqual(x.Path, y.Path);+ }++ return false;+ }++ public int GetHashCode(LinkedChild obj)+ {+ return ((obj.Path ?? string.Empty) + (obj.LibraryItemId ?? string.Empty) + obj.Type).GetHashCode();+ }+ }+}\ No newline at end of filediff --git a/MediaBrowser.Controller/Entities/LinkedChildType.cs b/MediaBrowser.Controller/Entities/LinkedChildType.csnew file mode 100644index 0000000000..9ddb7b6202--- /dev/null+++ b/MediaBrowser.Controller/Entities/LinkedChildType.cs@@ -0,0 +1,18 @@+namespace MediaBrowser.Controller.Entities+{+ /// <summary>+ /// The linked child type.+ /// </summary>+ public enum LinkedChildType+ {+ /// <summary>+ /// Manually linked child.+ /// </summary>+ Manual = 0,++ /// <summary>+ /// Shortcut linked child.+ /// </summary>+ Shortcut = 1+ }+}\ No newline at end of filediff --git a/MediaBrowser.Controller/Entities/MusicVideo.cs b/MediaBrowser.Controller/Entities/MusicVideo.csindex f42e7723c3..4e622ba01b 100644--- a/MediaBrowser.Controller/Entities/MusicVideo.cs+++ b/MediaBrowser.Controller/Entities/MusicVideo.cs@@ -13,15 +13,15 @@ namespace MediaBrowser.Controller.Entities{public class MusicVideo : Video, IHasArtist, IHasMusicGenres, IHasLookupInfo<MusicVideoInfo>{- /// <inheritdoc />- [JsonIgnore]- public IReadOnlyList<string> Artists { get; set; }-public MusicVideo(){Artists = Array.Empty<string>();}+ /// <inheritdoc />+ [JsonIgnore]+ public IReadOnlyList<string> Artists { get; set; }+public override UnratedItem GetBlockUnratedType(){return UnratedItem.Music;diff --git a/MediaBrowser.Controller/Library/DeleteOptions.cs b/MediaBrowser.Controller/Library/DeleteOptions.csindex b7417efcb5..408e702845 100644--- a/MediaBrowser.Controller/Library/DeleteOptions.cs+++ b/MediaBrowser.Controller/Library/DeleteOptions.cs@@ -4,13 +4,13 @@ namespace MediaBrowser.Controller.Library{public class DeleteOptions{- public bool DeleteFileLocation { get; set; }-- public bool DeleteFromExternalProvider { get; set; }-public DeleteOptions(){DeleteFromExternalProvider = true;}++ public bool DeleteFileLocation { get; set; }++ public bool DeleteFromExternalProvider { get; set; }}}diff --git a/MediaBrowser.Controller/Library/IIntroProvider.cs b/MediaBrowser.Controller/Library/IIntroProvider.csindex 3bb1bd9a09..a74d1b9f0b 100644--- a/MediaBrowser.Controller/Library/IIntroProvider.cs+++ b/MediaBrowser.Controller/Library/IIntroProvider.cs@@ -11,6 +11,12 @@ namespace MediaBrowser.Controller.Library/// </summary>public interface IIntroProvider{+ /// <summary>+ /// Gets the name.+ /// </summary>+ /// <value>The name.</value>+ string Name { get; }+/// <summary>/// Gets the intros./// </summary>@@ -24,11 +30,5 @@ namespace MediaBrowser.Controller.Library/// </summary>/// <returns>IEnumerable{System.String}.</returns>IEnumerable<string> GetAllIntroFiles();-- /// <summary>- /// Gets the name.- /// </summary>- /// <value>The name.</value>- string Name { get; }}}diff --git a/MediaBrowser.Controller/Library/Profiler.cs b/MediaBrowser.Controller/Library/Profiler.csindex 8f42d37061..583fd73c3a 100644--- a/MediaBrowser.Controller/Library/Profiler.cs+++ b/MediaBrowser.Controller/Library/Profiler.cs@@ -15,12 +15,12 @@ namespace MediaBrowser.Controller.Library/// <summary>/// The name./// </summary>- readonly string _name;+ private readonly string _name;/// <summary>/// The stopwatch./// </summary>- readonly Stopwatch _stopwatch;+ private readonly Stopwatch _stopwatch;/// <summary>/// The _logger.diff --git a/MediaBrowser.Controller/LiveTv/ActiveRecordingInfo.cs b/MediaBrowser.Controller/LiveTv/ActiveRecordingInfo.csnew file mode 100644index 0000000000..463061e686--- /dev/null+++ b/MediaBrowser.Controller/LiveTv/ActiveRecordingInfo.cs@@ -0,0 +1,19 @@+#nullable disable++#pragma warning disable CS1591++using System.Threading;++namespace MediaBrowser.Controller.LiveTv+{+ public class ActiveRecordingInfo+ {+ public string Id { get; set; }++ public string Path { get; set; }++ public TimerInfo Timer { get; set; }++ public CancellationTokenSource CancellationTokenSource { get; set; }+ }+}\ No newline at end of filediff --git a/MediaBrowser.Controller/LiveTv/ChannelInfo.cs b/MediaBrowser.Controller/LiveTv/ChannelInfo.csindex a55fd670d5..699c15f934 100644--- a/MediaBrowser.Controller/LiveTv/ChannelInfo.cs+++ b/MediaBrowser.Controller/LiveTv/ChannelInfo.cs@@ -24,7 +24,7 @@ namespace MediaBrowser.Controller.LiveTvpublic string Number { get; set; }/// <summary>- /// Get or sets the Id.+ /// Gets or sets the Id./// </summary>/// <value>The id of the channel.</value>public string Id { get; set; }@@ -54,13 +54,13 @@ namespace MediaBrowser.Controller.LiveTvpublic string ChannelGroup { get; set; }/// <summary>- /// Supply the image path if it can be accessed directly from the file system.+ /// Gets or sets the the image path if it can be accessed directly from the file system./// </summary>/// <value>The image path.</value>public string ImagePath { get; set; }/// <summary>- /// Supply the image url if it can be downloaded.+ /// Gets or sets the image url if it can be downloaded./// </summary>/// <value>The image URL.</value>public string ImageUrl { get; set; }diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.csindex c28e0426b5..f4dc18e11c 100644--- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs+++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs@@ -268,16 +268,21 @@ namespace MediaBrowser.Controller.LiveTvvoid AddChannelInfo(IReadOnlyCollection<(BaseItemDto, LiveTvChannel)> items, DtoOptions options, User user);Task<List<ChannelInfo>> GetChannelsForListingsProvider(string id, CancellationToken cancellationToken);+Task<List<ChannelInfo>> GetChannelsFromListingsProviderData(string id, CancellationToken cancellationToken);IListingsProvider[] ListingProviders { get; }List<NameIdPair> GetTunerHostTypes();+Task<List<TunerHostInfo>> DiscoverTuners(bool newDevicesOnly, CancellationToken cancellationToken);event EventHandler<GenericEventArgs<TimerEventInfo>> SeriesTimerCancelled;+event EventHandler<GenericEventArgs<TimerEventInfo>> TimerCancelled;+event EventHandler<GenericEventArgs<TimerEventInfo>> TimerCreated;+event EventHandler<GenericEventArgs<TimerEventInfo>> SeriesTimerCreated;string GetEmbyTvActiveRecordingPath(string id);@@ -288,15 +293,4 @@ namespace MediaBrowser.Controller.LiveTvList<BaseItem> GetRecordingFolders(User user);}-- public class ActiveRecordingInfo- {- public string Id { get; set; }-- public string Path { get; set; }-- public TimerInfo Timer { get; set; }-- public CancellationTokenSource CancellationTokenSource { get; set; }- }}diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.csindex d9634a731f..a66bec11cb 100644--- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs+++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs@@ -101,7 +101,7 @@ namespace MediaBrowser.Controller.LiveTvpublic bool IsMovie { get; set; }/// <summary>- /// Gets or sets a value indicating whether this instance is sports.+ /// Gets a value indicating whether this instance is sports./// </summary>/// <value><c>true</c> if this instance is sports; otherwise, <c>false</c>.</value>[JsonIgnore]@@ -115,35 +115,35 @@ namespace MediaBrowser.Controller.LiveTvpublic bool IsSeries { get; set; }/// <summary>- /// Gets or sets a value indicating whether this instance is live.+ /// Gets a value indicating whether this instance is live./// </summary>/// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>[JsonIgnore]public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);/// <summary>- /// Gets or sets a value indicating whether this instance is news.+ /// Gets a value indicating whether this instance is news./// </summary>/// <value><c>true</c> if this instance is news; otherwise, <c>false</c>.</value>[JsonIgnore]public bool IsNews => Tags.Contains("News", StringComparer.OrdinalIgnoreCase);/// <summary>- /// Gets or sets a value indicating whether this instance is kids.+ /// Gets a value indicating whether this instance is kids./// </summary>/// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>[JsonIgnore]public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);/// <summary>- /// Gets or sets a value indicating whether this instance is premiere.+ /// Gets a value indicating whether this instance is premiere./// </summary>/// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value>[JsonIgnore]public bool IsPremiere => Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);/// <summary>- /// Returns the folder containing the item.+ /// Gets the folder containing the item./// If the item is a folder, it returns the folder itself./// </summary>/// <value>The containing folder path.</value>diff --git a/MediaBrowser.Controller/LiveTv/ProgramInfo.cs b/MediaBrowser.Controller/LiveTv/ProgramInfo.csindex 4a977c5cc3..3c3ac2471f 100644--- a/MediaBrowser.Controller/LiveTv/ProgramInfo.cs+++ b/MediaBrowser.Controller/LiveTv/ProgramInfo.cs@@ -10,8 +10,16 @@ namespace MediaBrowser.Controller.LiveTv{public class ProgramInfo{+ public ProgramInfo()+ {+ Genres = new List<string>();++ ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);+ SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);+ }+/// <summary>- /// Id of the program.+ /// Gets or sets the id of the program./// </summary>public string Id { get; set; }@@ -22,7 +30,7 @@ namespace MediaBrowser.Controller.LiveTvpublic string ChannelId { get; set; }/// <summary>- /// Name of the program.+ /// Gets or sets the name of the program./// </summary>public string Name { get; set; }@@ -45,17 +53,17 @@ namespace MediaBrowser.Controller.LiveTvpublic string ShortOverview { get; set; }/// <summary>- /// The start date of the program, in UTC.+ /// Gets or sets the start date of the program, in UTC./// </summary>public DateTime StartDate { get; set; }/// <summary>- /// The end date of the program, in UTC.+ /// Gets or sets the end date of the program, in UTC./// </summary>public DateTime EndDate { get; set; }/// <summary>- /// Genre of the program.+ /// Gets or sets the genre of the program./// </summary>public List<string> Genres { get; set; }@@ -71,6 +79,9 @@ namespace MediaBrowser.Controller.LiveTv/// <value><c>true</c> if this instance is hd; otherwise, <c>false</c>.</value>public bool? IsHD { get; set; }+ /// <summary>+ /// Gets or sets a value indicating whether this instance is 3d.+ /// </summary>public bool? Is3D { get; set; }/// <summary>@@ -100,13 +111,13 @@ namespace MediaBrowser.Controller.LiveTvpublic string EpisodeTitle { get; set; }/// <summary>- /// Supply the image path if it can be accessed directly from the file system.+ /// Gets or sets the image path if it can be accessed directly from the file system./// </summary>/// <value>The image path.</value>public string ImagePath { get; set; }/// <summary>- /// Supply the image url if it can be downloaded.+ /// Gets or sets the image url if it can be downloaded./// </summary>/// <value>The image URL.</value>public string ImageUrl { get; set; }@@ -212,13 +223,5 @@ namespace MediaBrowser.Controller.LiveTvpublic Dictionary<string, string> ProviderIds { get; set; }public Dictionary<string, string> SeriesProviderIds { get; set; }-- public ProgramInfo()- {- Genres = new List<string>();-- ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);- SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);- }}}diff --git a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs b/MediaBrowser.Controller/LiveTv/RecordingInfo.csindex 00135afa81..1dcf7a58fe 100644--- a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs+++ b/MediaBrowser.Controller/LiveTv/RecordingInfo.cs@@ -10,8 +10,13 @@ namespace MediaBrowser.Controller.LiveTv{public class RecordingInfo{+ public RecordingInfo()+ {+ Genres = new List<string>();+ }+/// <summary>- /// Id of the recording.+ /// Gets or sets the id of the recording./// </summary>public string Id { get; set; }@@ -28,7 +33,7 @@ namespace MediaBrowser.Controller.LiveTvpublic string TimerId { get; set; }/// <summary>- /// ChannelId of the recording.+ /// Gets or sets the channelId of the recording./// </summary>public string ChannelId { get; set; }@@ -39,7 +44,7 @@ namespace MediaBrowser.Controller.LiveTvpublic ChannelType ChannelType { get; set; }/// <summary>- /// Name of the recording.+ /// Gets or sets the name of the recording./// </summary>public string Name { get; set; }@@ -62,12 +67,12 @@ namespace MediaBrowser.Controller.LiveTvpublic string Overview { get; set; }/// <summary>- /// The start date of the recording, in UTC.+ /// Gets or sets the start date of the recording, in UTC./// </summary>public DateTime StartDate { get; set; }/// <summary>- /// The end date of the recording, in UTC.+ /// Gets or sets the end date of the recording, in UTC./// </summary>public DateTime EndDate { get; set; }@@ -84,7 +89,7 @@ namespace MediaBrowser.Controller.LiveTvpublic RecordingStatus Status { get; set; }/// <summary>- /// Genre of the program.+ /// Gets or sets the genre of the program./// </summary>public List<string> Genres { get; set; }@@ -173,13 +178,13 @@ namespace MediaBrowser.Controller.LiveTvpublic float? CommunityRating { get; set; }/// <summary>- /// Supply the image path if it can be accessed directly from the file system.+ /// Gets or sets the image path if it can be accessed directly from the file system./// </summary>/// <value>The image path.</value>public string ImagePath { get; set; }/// <summary>- /// Supply the image url if it can be downloaded.+ /// Gets or sets the image url if it can be downloaded./// </summary>/// <value>The image URL.</value>public string ImageUrl { get; set; }@@ -201,10 +206,5 @@ namespace MediaBrowser.Controller.LiveTv/// </summary>/// <value>The date last updated.</value>public DateTime DateLastUpdated { get; set; }-- public RecordingInfo()- {- Genres = new List<string>();- }}}diff --git a/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs b/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.csindex 1bb649a991..d6811fe14e 100644--- a/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs+++ b/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs@@ -10,13 +10,20 @@ namespace MediaBrowser.Controller.LiveTv{public class SeriesTimerInfo{+ public SeriesTimerInfo()+ {+ Days = new List<DayOfWeek>();+ SkipEpisodesInLibrary = true;+ KeepUntil = KeepUntil.UntilDeleted;+ }+/// <summary>- /// Id of the recording.+ /// Gets or sets the id of the recording./// </summary>public string Id { get; set; }/// <summary>- /// ChannelId of the recording.+ /// Gets or sets the channelId of the recording./// </summary>public string ChannelId { get; set; }@@ -27,24 +34,27 @@ namespace MediaBrowser.Controller.LiveTvpublic string ProgramId { get; set; }/// <summary>- /// Name of the recording.+ /// Gets or sets the name of the recording./// </summary>public string Name { get; set; }+ /// <summary>+ /// Gets or sets the service name.+ /// </summary>public string ServiceName { get; set; }/// <summary>- /// Description of the recording.+ /// Gets or sets the description of the recording./// </summary>public string Overview { get; set; }/// <summary>- /// The start date of the recording, in UTC.+ /// Gets or sets the start date of the recording, in UTC./// </summary>public DateTime StartDate { get; set; }/// <summary>- /// The end date of the recording, in UTC.+ /// Gets or sets the end date of the recording, in UTC./// </summary>public DateTime EndDate { get; set; }@@ -113,12 +123,5 @@ namespace MediaBrowser.Controller.LiveTv/// </summary>/// <value>The series identifier.</value>public string SeriesId { get; set; }-- public SeriesTimerInfo()- {- Days = new List<DayOfWeek>();- SkipEpisodesInLibrary = true;- KeepUntil = KeepUntil.UntilDeleted;- }}}diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csprojindex 37ce35fc27..3f3a505eaf 100644--- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj+++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj@@ -16,7 +16,7 @@<ItemGroup><PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0" /><PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="5.0.0" />- <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>+ <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" /><PackageReference Include="System.Threading.Tasks.Dataflow" Version="5.0.0" /></ItemGroup>diff --git a/MediaBrowser.Controller/Net/IWebSocketConnection.cs b/MediaBrowser.Controller/Net/IWebSocketConnection.csindex 5e9fce5503..e50cd97819 100644--- a/MediaBrowser.Controller/Net/IWebSocketConnection.cs+++ b/MediaBrowser.Controller/Net/IWebSocketConnection.cs@@ -34,7 +34,7 @@ namespace MediaBrowser.Controller.NetDateTime LastKeepAliveDate { get; set; }/// <summary>- /// Gets or sets the query string.+ /// Gets the query string./// </summary>/// <value>The query string.</value>IQueryCollection QueryString { get; }diff --git a/MediaBrowser.Controller/Providers/AlbumInfo.cs b/MediaBrowser.Controller/Providers/AlbumInfo.csindex 276bcf1252..c7fad5974a 100644--- a/MediaBrowser.Controller/Providers/AlbumInfo.cs+++ b/MediaBrowser.Controller/Providers/AlbumInfo.cs@@ -7,6 +7,13 @@ namespace MediaBrowser.Controller.Providers{public class AlbumInfo : ItemLookupInfo{+ public AlbumInfo()+ {+ ArtistProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);+ SongInfos = new List<SongInfo>();+ AlbumArtists = Array.Empty<string>();+ }+/// <summary>/// Gets or sets the album artist./// </summary>@@ -20,12 +27,5 @@ namespace MediaBrowser.Controller.Providerspublic Dictionary<string, string> ArtistProviderIds { get; set; }public List<SongInfo> SongInfos { get; set; }-- public AlbumInfo()- {- ArtistProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);- SongInfos = new List<SongInfo>();- AlbumArtists = Array.Empty<string>();- }}}diff --git a/MediaBrowser.Controller/Providers/ArtistInfo.cs b/MediaBrowser.Controller/Providers/ArtistInfo.csindex adf885baa6..e9181f4765 100644--- a/MediaBrowser.Controller/Providers/ArtistInfo.cs+++ b/MediaBrowser.Controller/Providers/ArtistInfo.cs@@ -6,11 +6,11 @@ namespace MediaBrowser.Controller.Providers{public class ArtistInfo : ItemLookupInfo{- public List<SongInfo> SongInfos { get; set; }-public ArtistInfo(){SongInfos = new List<SongInfo>();}++ public List<SongInfo> SongInfos { get; set; }}}diff --git a/MediaBrowser.Controller/Providers/EpisodeInfo.cs b/MediaBrowser.Controller/Providers/EpisodeInfo.csindex 341bf69361..0c932fa877 100644--- a/MediaBrowser.Controller/Providers/EpisodeInfo.cs+++ b/MediaBrowser.Controller/Providers/EpisodeInfo.cs@@ -9,6 +9,11 @@ namespace MediaBrowser.Controller.Providers{public class EpisodeInfo : ItemLookupInfo{+ public EpisodeInfo()+ {+ SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);+ }+public Dictionary<string, string> SeriesProviderIds { get; set; }public int? IndexNumberEnd { get; set; }@@ -16,10 +21,5 @@ namespace MediaBrowser.Controller.Providerspublic bool IsMissingEpisode { get; set; }public string SeriesDisplayOrder { get; set; }-- public EpisodeInfo()- {- SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);- }}}diff --git a/MediaBrowser.Controller/Providers/IMetadataService.cs b/MediaBrowser.Controller/Providers/IMetadataService.csindex 5f3d4274ef..05fbb18ee4 100644--- a/MediaBrowser.Controller/Providers/IMetadataService.cs+++ b/MediaBrowser.Controller/Providers/IMetadataService.cs@@ -10,6 +10,12 @@ namespace MediaBrowser.Controller.Providers{public interface IMetadataService{+ /// <summary>+ /// Gets the order.+ /// </summary>+ /// <value>The order.</value>+ int Order { get; }+/// <summary>/// Determines whether this instance can refresh the specified item./// </summary>@@ -27,11 +33,5 @@ namespace MediaBrowser.Controller.Providers/// <param name="cancellationToken">The cancellation token.</param>/// <returns>Task.</returns>Task<ItemUpdateType> RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken);-- /// <summary>- /// Gets the order.- /// </summary>- /// <value>The order.</value>- int Order { get; }}}diff --git a/MediaBrowser.Controller/Providers/IProviderManager.cs b/MediaBrowser.Controller/Providers/IProviderManager.csindex b4d91f396f..684bd9e681 100644--- a/MediaBrowser.Controller/Providers/IProviderManager.cs+++ b/MediaBrowser.Controller/Providers/IProviderManager.cs@@ -191,11 +191,4 @@ namespace MediaBrowser.Controller.Providersdouble? GetRefreshProgress(Guid id);}-- public enum RefreshPriority- {- High = 0,- Normal = 1,- Low = 2- }}diff --git a/MediaBrowser.Controller/Providers/ItemLookupInfo.cs b/MediaBrowser.Controller/Providers/ItemLookupInfo.csindex f16669a781..e6f49c26ae 100644--- a/MediaBrowser.Controller/Providers/ItemLookupInfo.cs+++ b/MediaBrowser.Controller/Providers/ItemLookupInfo.cs@@ -10,6 +10,12 @@ namespace MediaBrowser.Controller.Providers{public class ItemLookupInfo : IHasProviderIds{+ public ItemLookupInfo()+ {+ IsAutomated = true;+ ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);+ }+/// <summary>/// Gets or sets the name./// </summary>@@ -53,11 +59,5 @@ namespace MediaBrowser.Controller.Providerspublic DateTime? PremiereDate { get; set; }public bool IsAutomated { get; set; }-- public ItemLookupInfo()- {- IsAutomated = true;- ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);- }}}diff --git a/MediaBrowser.Controller/Providers/MetadataRefreshOptions.cs b/MediaBrowser.Controller/Providers/MetadataRefreshOptions.csindex 5afc358ba7..1152504669 100644--- a/MediaBrowser.Controller/Providers/MetadataRefreshOptions.cs+++ b/MediaBrowser.Controller/Providers/MetadataRefreshOptions.cs@@ -11,21 +11,6 @@ namespace MediaBrowser.Controller.Providers{public class MetadataRefreshOptions : ImageRefreshOptions{- /// <summary>- /// When paired with MetadataRefreshMode=FullRefresh, all existing data will be overwritten with new data from the providers.- /// </summary>- public bool ReplaceAllMetadata { get; set; }-- public MetadataRefreshMode MetadataRefreshMode { get; set; }-- public RemoteSearchResult SearchResult { get; set; }-- public string[] RefreshPaths { get; set; }-- public bool ForceSave { get; set; }-- public bool EnableRemoteContentProbe { get; set; }-public MetadataRefreshOptions(IDirectoryService directoryService): base(directoryService){@@ -53,6 +38,22 @@ namespace MediaBrowser.Controller.Providers}}+ /// <summary>+ /// Gets or sets a value indicating whether all existing data should be overwritten with new data from providers+ /// when paired with MetadataRefreshMode=FullRefresh+ /// </summary>+ public bool ReplaceAllMetadata { get; set; }++ public MetadataRefreshMode MetadataRefreshMode { get; set; }++ public RemoteSearchResult SearchResult { get; set; }++ public string[] RefreshPaths { get; set; }++ public bool ForceSave { get; set; }++ public bool EnableRemoteContentProbe { get; set; }+public bool RefreshItem(BaseItem item){if (RefreshPaths != null && RefreshPaths.Length > 0)diff --git a/MediaBrowser.Controller/Providers/RefreshPriority.cs b/MediaBrowser.Controller/Providers/RefreshPriority.csnew file mode 100644index 0000000000..3619f679d6--- /dev/null+++ b/MediaBrowser.Controller/Providers/RefreshPriority.cs@@ -0,0 +1,23 @@+namespace MediaBrowser.Controller.Providers+{+ /// <summary>+ /// Provider refresh priority.+ /// </summary>+ public enum RefreshPriority+ {+ /// <summary>+ /// High priority.+ /// </summary>+ High = 0,++ /// <summary>+ /// Normal priority.+ /// </summary>+ Normal = 1,++ /// <summary>+ /// Low priority.+ /// </summary>+ Low = 2+ }+}\ No newline at end of filediff --git a/MediaBrowser.Controller/Providers/RemoteSearchQuery.cs b/MediaBrowser.Controller/Providers/RemoteSearchQuery.csindex d830231cfb..d4df5fa0db 100644--- a/MediaBrowser.Controller/Providers/RemoteSearchQuery.cs+++ b/MediaBrowser.Controller/Providers/RemoteSearchQuery.cs@@ -14,7 +14,7 @@ namespace MediaBrowser.Controller.Providerspublic Guid ItemId { get; set; }/// <summary>- /// Will only search within the given provider when set.+ /// Gets or sets the provider name to search within if set./// </summary>public string SearchProviderName { get; set; }diff --git a/MediaBrowser.Controller/Providers/SeasonInfo.cs b/MediaBrowser.Controller/Providers/SeasonInfo.csindex 2a4c1f03c7..7e39bc37a6 100644--- a/MediaBrowser.Controller/Providers/SeasonInfo.cs+++ b/MediaBrowser.Controller/Providers/SeasonInfo.cs@@ -7,11 +7,11 @@ namespace MediaBrowser.Controller.Providers{public class SeasonInfo : ItemLookupInfo{- public Dictionary<string, string> SeriesProviderIds { get; set; }-public SeasonInfo(){SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);}++ public Dictionary<string, string> SeriesProviderIds { get; set; }}}diff --git a/MediaBrowser.Controller/Resolvers/IResolverIgnoreRule.cs b/MediaBrowser.Controller/Resolvers/IResolverIgnoreRule.csindex bb80e60256..a07b3e8988 100644--- a/MediaBrowser.Controller/Resolvers/IResolverIgnoreRule.cs+++ b/MediaBrowser.Controller/Resolvers/IResolverIgnoreRule.cs@@ -4,7 +4,7 @@ using MediaBrowser.Model.IO;namespace MediaBrowser.Controller.Resolvers{/// <summary>- /// Provides a base "rule" that anyone can use to have paths ignored by the resolver+ /// Provides a base "rule" that anyone can use to have paths ignored by the resolver./// </summary>public interface IResolverIgnoreRule{diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.csindex 7eda49c602..4c3cf5ffe1 100644--- a/MediaBrowser.Controller/Session/ISessionManager.cs+++ b/MediaBrowser.Controller/Session/ISessionManager.cs@@ -346,21 +346,19 @@ namespace MediaBrowser.Controller.Session/// Logouts the specified access token./// </summary>/// <param name="accessToken">The access token.</param>- /// <returns>Task.</returns>void Logout(string accessToken);+void Logout(AuthenticationInfo accessToken);/// <summary>/// Revokes the user tokens./// </summary>- /// <returns>Task.</returns>void RevokeUserTokens(Guid userId, string currentAccessToken);/// <summary>/// Revokes the token./// </summary>/// <param name="id">The identifier.</param>- /// <returns>Task.</returns>void RevokeToken(string id);void CloseIfNeeded(SessionInfo session);diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.csindex 5da3783bf8..6134c0cf33 100644--- a/MediaBrowser.Controller/Session/SessionInfo.cs+++ b/MediaBrowser.Controller/Session/SessionInfo.cs@@ -54,7 +54,7 @@ namespace MediaBrowser.Controller.Sessionpublic string RemoteEndPoint { get; set; }/// <summary>- /// Gets or sets the playable media types.+ /// Gets the playable media types./// </summary>/// <value>The playable media types.</value>public IReadOnlyList<string> PlayableMediaTypes@@ -230,7 +230,7 @@ namespace MediaBrowser.Controller.Sessionpublic string UserPrimaryImageTag { get; set; }/// <summary>- /// Gets or sets the supported commands.+ /// Gets the supported commands./// </summary>/// <value>The supported commands.</value>public IReadOnlyList<GeneralCommandType> SupportedCommands