diff --git a/Kyoo.Abstractions/Controllers/IRepository.cs b/Kyoo.Abstractions/Controllers/IRepository.cs index db3e73f5..65fc9286 100644 --- a/Kyoo.Abstractions/Controllers/IRepository.cs +++ b/Kyoo.Abstractions/Controllers/IRepository.cs @@ -625,6 +625,7 @@ namespace Kyoo.Abstractions.Controllers /// A predicate to add arbitrary filter /// A sort by expression /// Pagination information (where to start and how many to get) + /// The type of metadata to retrieve /// A filtered list of external ids. Task> GetMetadataID([Optional] Expression> where, Expression> sort, diff --git a/Kyoo.Abstractions/Models/Attributes/LoadableRelationAttribute.cs b/Kyoo.Abstractions/Models/Attributes/LoadableRelationAttribute.cs index c8ec0d95..bf34520e 100644 --- a/Kyoo.Abstractions/Models/Attributes/LoadableRelationAttribute.cs +++ b/Kyoo.Abstractions/Models/Attributes/LoadableRelationAttribute.cs @@ -1,9 +1,8 @@ -using System; +using System; using Kyoo.Abstractions.Controllers; namespace Kyoo.Abstractions.Models.Attributes { - /// /// The targeted relation can be loaded via a call to . /// diff --git a/Kyoo.Abstractions/Models/Attributes/SerializeAttribute.cs b/Kyoo.Abstractions/Models/Attributes/SerializeAttribute.cs index 4bed3ab6..3424420c 100644 --- a/Kyoo.Abstractions/Models/Attributes/SerializeAttribute.cs +++ b/Kyoo.Abstractions/Models/Attributes/SerializeAttribute.cs @@ -3,7 +3,7 @@ using System; namespace Kyoo.Abstractions.Models.Attributes { /// - /// Remove an property from the serialization pipeline. It will simply be skipped. + /// Remove an property from the serialization pipeline. It will simply be skipped. /// [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] public class SerializeIgnoreAttribute : Attribute { } diff --git a/Kyoo.Abstractions/Models/Exceptions/TaskFailedException.cs b/Kyoo.Abstractions/Models/Exceptions/TaskFailedException.cs index be032386..58b3df53 100644 --- a/Kyoo.Abstractions/Models/Exceptions/TaskFailedException.cs +++ b/Kyoo.Abstractions/Models/Exceptions/TaskFailedException.cs @@ -34,7 +34,7 @@ namespace Kyoo.Abstractions.Models.Exceptions { } /// - /// The serialization constructor + /// The serialization constructor /// /// Serialization infos /// The serialization context diff --git a/Kyoo.Abstractions/Models/Resources/Interfaces/IMetadata.cs b/Kyoo.Abstractions/Models/Resources/Interfaces/IMetadata.cs index 4b37c686..660c2ae1 100644 --- a/Kyoo.Abstractions/Models/Resources/Interfaces/IMetadata.cs +++ b/Kyoo.Abstractions/Models/Resources/Interfaces/IMetadata.cs @@ -26,7 +26,7 @@ namespace Kyoo.Abstractions.Models public static class MetadataExtension { /// - /// Retrieve the internal provider's ID of an item using it's provider slug. + /// Retrieve the internal provider's ID of an item using it's provider slug. /// /// /// This method will never return anything if the are not loaded. diff --git a/Kyoo.Abstractions/Models/Resources/Interfaces/IResource.cs b/Kyoo.Abstractions/Models/Resources/Interfaces/IResource.cs index b7f03c4c..f03375c3 100644 --- a/Kyoo.Abstractions/Models/Resources/Interfaces/IResource.cs +++ b/Kyoo.Abstractions/Models/Resources/Interfaces/IResource.cs @@ -12,7 +12,7 @@ namespace Kyoo.Abstractions.Models /// /// /// You don't need to specify an ID manually when creating a new resource, - /// this field is automatically assigned by the . + /// this field is automatically assigned by the . /// public int ID { get; set; } diff --git a/Kyoo.Abstractions/Models/Resources/People.cs b/Kyoo.Abstractions/Models/Resources/People.cs index 9a2edb0c..3c3d7081 100644 --- a/Kyoo.Abstractions/Models/Resources/People.cs +++ b/Kyoo.Abstractions/Models/Resources/People.cs @@ -5,7 +5,7 @@ using Kyoo.Abstractions.Models.Attributes; namespace Kyoo.Abstractions.Models { /// - /// An actor, voice actor, writer, animator, somebody who worked on a . + /// An actor, voice actor, writer, animator, somebody who worked on a . /// public class People : IResource, IMetadata, IThumbnails { diff --git a/Kyoo.Abstractions/Models/Resources/Provider.cs b/Kyoo.Abstractions/Models/Resources/Provider.cs index ff2de000..300aa6f4 100644 --- a/Kyoo.Abstractions/Models/Resources/Provider.cs +++ b/Kyoo.Abstractions/Models/Resources/Provider.cs @@ -47,7 +47,7 @@ namespace Kyoo.Abstractions.Models /// /// Create a new and specify it's . - /// The is automatically calculated from it's name. + /// The is automatically calculated from it's name. /// /// The name of this provider. /// The logo of this provider. diff --git a/Kyoo.Abstractions/Models/Resources/Season.cs b/Kyoo.Abstractions/Models/Resources/Season.cs index 965e1f44..d3a0ec1b 100644 --- a/Kyoo.Abstractions/Models/Resources/Season.cs +++ b/Kyoo.Abstractions/Models/Resources/Season.cs @@ -8,7 +8,7 @@ using Kyoo.Abstractions.Models.Attributes; namespace Kyoo.Abstractions.Models { /// - /// A season of a . + /// A season of a . /// public class Season : IResource, IMetadata, IThumbnails { @@ -24,9 +24,10 @@ namespace Kyoo.Abstractions.Models return $"{ShowID}-s{SeasonNumber}"; return $"{ShowSlug ?? Show?.Slug}-s{SeasonNumber}"; } + [UsedImplicitly] [NotNull] private set { - Match match = Regex.Match(value ?? "", @"(?.+)-s(?\d+)"); + Match match = Regex.Match(value ?? string.Empty, @"(?.+)-s(?\d+)"); if (!match.Success) throw new ArgumentException("Invalid season slug. Format: {showSlug}-s{seasonNumber}"); diff --git a/Kyoo.Abstractions/Models/Resources/User.cs b/Kyoo.Abstractions/Models/Resources/User.cs index 482a579c..41d41196 100644 --- a/Kyoo.Abstractions/Models/Resources/User.cs +++ b/Kyoo.Abstractions/Models/Resources/User.cs @@ -51,30 +51,4 @@ namespace Kyoo.Abstractions.Models /// public ICollection CurrentlyWatching { get; set; } } - - /// - /// Metadata of episode currently watching by an user - /// - public class WatchedEpisode - { - /// - /// The ID of the user that started watching this episode. - /// - public int UserID { get; set; } - - /// - /// The ID of the episode started. - /// - public int EpisodeID { get; set; } - - /// - /// The started. - /// - public Episode Episode { get; set; } - - /// - /// Where the player has stopped watching the episode (between 0 and 100). - /// - public int WatchedPercentage { get; set; } - } } diff --git a/Kyoo.Abstractions/Utility/EnumerableExtensions.cs b/Kyoo.Abstractions/Utility/EnumerableExtensions.cs index 51c50c86..a518e54c 100644 --- a/Kyoo.Abstractions/Utility/EnumerableExtensions.cs +++ b/Kyoo.Abstractions/Utility/EnumerableExtensions.cs @@ -45,7 +45,7 @@ namespace Kyoo.Utils /// /// A map where the mapping function is asynchronous. - /// Note: might interest you. + /// Note: might interest you. /// /// The IEnumerable to map. /// The asynchronous function that will map each items diff --git a/Kyoo.Authentication/Controllers/Certificates.cs b/Kyoo.Authentication/Controllers/Certificates.cs index fa01204d..454962d0 100644 --- a/Kyoo.Authentication/Controllers/Certificates.cs +++ b/Kyoo.Authentication/Controllers/Certificates.cs @@ -23,7 +23,7 @@ namespace Kyoo.Authentication { /// /// Add the certificate file to the identity server. If the certificate will expire soon, automatically renew it. - /// If no certificate exists, one is generated. + /// If no certificate exists, one is generated. /// /// The identity server that will be modified. /// The certificate options diff --git a/Kyoo.Authentication/Models/DTO/RegisterRequest.cs b/Kyoo.Authentication/Models/DTO/RegisterRequest.cs index fad5fd7a..edf21742 100644 --- a/Kyoo.Authentication/Models/DTO/RegisterRequest.cs +++ b/Kyoo.Authentication/Models/DTO/RegisterRequest.cs @@ -17,7 +17,7 @@ namespace Kyoo.Authentication.Models.DTO public string Email { get; set; } /// - /// The user's username. + /// The user's username. /// [MinLength(4, ErrorMessage = "The username must have at least {1} characters")] public string Username { get; set; } diff --git a/Kyoo.Authentication/Models/Options/AuthenticationOption.cs b/Kyoo.Authentication/Models/Options/AuthenticationOption.cs index 3b730ad8..343f71cf 100644 --- a/Kyoo.Authentication/Models/Options/AuthenticationOption.cs +++ b/Kyoo.Authentication/Models/Options/AuthenticationOption.cs @@ -21,7 +21,7 @@ namespace Kyoo.Authentication.Models public PermissionOption Permissions { get; set; } /// - /// Root path of user's profile pictures. + /// Root path of user's profile pictures. /// public string ProfilePicturePath { get; set; } } diff --git a/Kyoo.Authentication/Views/AccountApi.cs b/Kyoo.Authentication/Views/AccountApi.cs index 20996a0c..67b34240 100644 --- a/Kyoo.Authentication/Views/AccountApi.cs +++ b/Kyoo.Authentication/Views/AccountApi.cs @@ -60,7 +60,7 @@ namespace Kyoo.Authentication.Views } /// - /// Register a new user and return a OTAC to connect to it. + /// Register a new user and return a OTAC to connect to it. /// /// The DTO register request /// A OTAC to connect to this new account diff --git a/Kyoo.Core/Controllers/PluginManager.cs b/Kyoo.Core/Controllers/PluginManager.cs index 1e5f020d..fca45aa3 100644 --- a/Kyoo.Core/Controllers/PluginManager.cs +++ b/Kyoo.Core/Controllers/PluginManager.cs @@ -29,7 +29,7 @@ namespace Kyoo.Core.Controllers private readonly IOptions _options; /// - /// The logger used by this class. + /// The logger used by this class. /// private readonly ILogger _logger; diff --git a/Kyoo.Core/Controllers/TaskManager.cs b/Kyoo.Core/Controllers/TaskManager.cs index 962084ff..5e9f688e 100644 --- a/Kyoo.Core/Controllers/TaskManager.cs +++ b/Kyoo.Core/Controllers/TaskManager.cs @@ -55,7 +55,7 @@ namespace Kyoo.Core.Controllers public ManagedTask Task { get; init; } /// - /// The progress reporter that this task should use. + /// The progress reporter that this task should use. /// public IProgress ProgressReporter { get; init; } diff --git a/Kyoo.Core/Models/Stream.cs b/Kyoo.Core/Models/Stream.cs index 6d7e927a..00deaccc 100644 --- a/Kyoo.Core/Models/Stream.cs +++ b/Kyoo.Core/Models/Stream.cs @@ -31,7 +31,7 @@ namespace Kyoo.Core.Models.Watch [MarshalAs(UnmanagedType.I1)] public bool IsDefault; /// - /// Is this stream tagged as forced? + /// Is this stream tagged as forced? /// [MarshalAs(UnmanagedType.I1)] public bool IsForced; diff --git a/Kyoo.Core/Tasks/Crawler.cs b/Kyoo.Core/Tasks/Crawler.cs index 75a328b5..41711abf 100644 --- a/Kyoo.Core/Tasks/Crawler.cs +++ b/Kyoo.Core/Tasks/Crawler.cs @@ -24,12 +24,12 @@ namespace Kyoo.Core.Tasks private readonly ILibraryManager _libraryManager; /// - /// The file manager used walk inside directories and check they existences. + /// The file manager used walk inside directories and check they existences. /// private readonly IFileSystem _fileSystem; /// - /// A task manager used to create sub tasks for each episode to add to the database. + /// A task manager used to create sub tasks for each episode to add to the database. /// private readonly ITaskManager _taskManager; @@ -117,7 +117,7 @@ namespace Kyoo.Core.Tasks // We try to group episodes by shows to register one episode of each show first. // This speeds up the scan process because further episodes of a show are registered when all metadata - // of the show has already been fetched. + // of the show has already been fetched. List> shows = files .Where(FileExtensions.IsVideo) .Where(x => episodes.All(y => y.Path != x)) diff --git a/Kyoo.Core/Tasks/ExtractMetadata.cs b/Kyoo.Core/Tasks/ExtractMetadata.cs index f1b56a22..9f241109 100644 --- a/Kyoo.Core/Tasks/ExtractMetadata.cs +++ b/Kyoo.Core/Tasks/ExtractMetadata.cs @@ -22,7 +22,7 @@ // private ILibraryManager _library; // private IThumbnailsManager _thumbnails; // private ITranscoder _transcoder; -// +// // public async Task Run(IServiceProvider serviceProvider, CancellationToken token, string arguments = null) // { // string[] args = arguments?.Split('/'); @@ -33,13 +33,13 @@ // string slug = args[1]; // bool thumbs = args.Length < 3 || string.Equals(args[2], "thumbnails", StringComparison.InvariantCultureIgnoreCase); // bool subs = args.Length < 3 || string.Equals(args[2], "subs", StringComparison.InvariantCultureIgnoreCase); -// +// // using IServiceScope serviceScope = serviceProvider.CreateScope(); // _library = serviceScope.ServiceProvider.GetService(); // _thumbnails = serviceScope.ServiceProvider.GetService(); // _transcoder = serviceScope.ServiceProvider.GetService(); // int id; -// +// // switch (args[0].ToLowerInvariant()) // { // case "show": @@ -51,15 +51,15 @@ // break; // case "season": // case "seasons": -// Season season = await (int.TryParse(slug, out id) -// ? _library!.Get(id) +// Season season = await (int.TryParse(slug, out id) +// ? _library!.Get(id) // : _library!.Get(slug)); // await ExtractSeason(season, thumbs, subs, token); // break; // case "episode": // case "episodes": -// Episode episode = await (int.TryParse(slug, out id) -// ? _library!.Get(id) +// Episode episode = await (int.TryParse(slug, out id) +// ? _library!.Get(id) // : _library!.Get(slug)); // await ExtractEpisode(episode, thumbs, subs); // break; @@ -91,7 +91,7 @@ // await ExtractEpisode(episode, thumbs, subs); // } // } -// +// // private async Task ExtractEpisode(Episode episode, bool thumbs, bool subs) // { // if (thumbs) @@ -106,7 +106,7 @@ // await _library.Edit(episode, false); // } // } -// +// // public Task> GetPossibleParameters() // { // return Task.FromResult>(null); diff --git a/Kyoo.Core/Tasks/Housekeeping.cs b/Kyoo.Core/Tasks/Housekeeping.cs index 544e54ce..e259be8e 100644 --- a/Kyoo.Core/Tasks/Housekeeping.cs +++ b/Kyoo.Core/Tasks/Housekeeping.cs @@ -20,12 +20,12 @@ namespace Kyoo.Core.Tasks private readonly ILibraryManager _libraryManager; /// - /// The file manager used walk inside directories and check they existences. + /// The file manager used walk inside directories and check they existences. /// private readonly IFileSystem _fileSystem; /// - /// The logger used to inform the user that episodes has been removed. + /// The logger used to inform the user that episodes has been removed. /// private readonly ILogger _logger; diff --git a/Kyoo.Core/Tasks/MetadataProviderLoader.cs b/Kyoo.Core/Tasks/MetadataProviderLoader.cs index 5def6702..f8d07894 100644 --- a/Kyoo.Core/Tasks/MetadataProviderLoader.cs +++ b/Kyoo.Core/Tasks/MetadataProviderLoader.cs @@ -16,7 +16,7 @@ namespace Kyoo.Core.Tasks public class MetadataProviderLoader : ITask { /// - /// The provider repository used to create in-db providers from metadata providers. + /// The provider repository used to create in-db providers from metadata providers. /// private readonly IProviderRepository _providers; diff --git a/Kyoo.Core/Tasks/ReScan.cs b/Kyoo.Core/Tasks/ReScan.cs index 8e8fedb5..39a4637f 100644 --- a/Kyoo.Core/Tasks/ReScan.cs +++ b/Kyoo.Core/Tasks/ReScan.cs @@ -17,8 +17,8 @@ // public string HelpMessage => null; // public bool RunOnStartup => false; // public int Priority => 0; -// -// +// +// // private IServiceProvider _serviceProvider; // private IThumbnailsManager _thumbnailsManager; // private IProviderManager _providerManager; @@ -31,7 +31,7 @@ // _thumbnailsManager = serviceProvider.GetService(); // _providerManager = serviceProvider.GetService(); // _database = serviceScope.ServiceProvider.GetService(); -// +// // if (arguments == null || !arguments.Contains('/')) // return; // @@ -50,7 +50,7 @@ // private async Task ReScanShow(string slug) // { // Show old; -// +// // using (IServiceScope serviceScope = _serviceProvider.CreateScope()) // { // ILibraryManager libraryManager = serviceScope.ServiceProvider.GetService(); @@ -71,7 +71,7 @@ // if (orphans.Any()) // await Task.WhenAll(orphans.Select(x => ReScanEpisode(old, x))); // } -// +// // private async Task ReScanSeason(string seasonSlug) // { // string[] infos = seasonSlug.Split('-'); diff --git a/Kyoo.TheTvdb/TvdbOption.cs b/Kyoo.TheTvdb/TvdbOption.cs index dab8d00c..17f99adf 100644 --- a/Kyoo.TheTvdb/TvdbOption.cs +++ b/Kyoo.TheTvdb/TvdbOption.cs @@ -11,7 +11,7 @@ namespace Kyoo.TheTvdb.Models public const string Path = "tvdb"; /// - /// The api key of the tvdb. + /// The api key of the tvdb. /// public string ApiKey { get; set; } }