mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
CodingStyle: Removing trailing spaces
This commit is contained in:
parent
af285a7c6c
commit
ad0235307f
@ -625,6 +625,7 @@ namespace Kyoo.Abstractions.Controllers
|
||||
/// <param name="where">A predicate to add arbitrary filter</param>
|
||||
/// <param name="sort">A sort by expression</param>
|
||||
/// <param name="limit">Pagination information (where to start and how many to get)</param>
|
||||
/// <typeparam name="T">The type of metadata to retrieve</typeparam>
|
||||
/// <returns>A filtered list of external ids.</returns>
|
||||
Task<ICollection<MetadataID>> GetMetadataID<T>([Optional] Expression<Func<MetadataID, bool>> where,
|
||||
Expression<Func<MetadataID, object>> sort,
|
||||
|
@ -1,9 +1,8 @@
|
||||
using System;
|
||||
using System;
|
||||
using Kyoo.Abstractions.Controllers;
|
||||
|
||||
namespace Kyoo.Abstractions.Models.Attributes
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The targeted relation can be loaded via a call to <see cref="ILibraryManager.Load"/>.
|
||||
/// </summary>
|
||||
|
@ -3,7 +3,7 @@ using System;
|
||||
namespace Kyoo.Abstractions.Models.Attributes
|
||||
{
|
||||
/// <summary>
|
||||
/// Remove an property from the serialization pipeline. It will simply be skipped.
|
||||
/// Remove an property from the serialization pipeline. It will simply be skipped.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
|
||||
public class SerializeIgnoreAttribute : Attribute { }
|
||||
|
@ -34,7 +34,7 @@ namespace Kyoo.Abstractions.Models.Exceptions
|
||||
{ }
|
||||
|
||||
/// <summary>
|
||||
/// The serialization constructor
|
||||
/// The serialization constructor
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization infos</param>
|
||||
/// <param name="context">The serialization context</param>
|
||||
|
@ -26,7 +26,7 @@ namespace Kyoo.Abstractions.Models
|
||||
public static class MetadataExtension
|
||||
{
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This method will never return anything if the <see cref="IMetadata.ExternalIDs"/> are not loaded.
|
||||
|
@ -12,7 +12,7 @@ namespace Kyoo.Abstractions.Models
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// You don't need to specify an ID manually when creating a new resource,
|
||||
/// this field is automatically assigned by the <see cref="IRepository{T}"/>.
|
||||
/// this field is automatically assigned by the <see cref="IRepository{T}"/>.
|
||||
/// </remarks>
|
||||
public int ID { get; set; }
|
||||
|
||||
|
@ -5,7 +5,7 @@ using Kyoo.Abstractions.Models.Attributes;
|
||||
namespace Kyoo.Abstractions.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// An actor, voice actor, writer, animator, somebody who worked on a <see cref="Show"/>.
|
||||
/// An actor, voice actor, writer, animator, somebody who worked on a <see cref="Show"/>.
|
||||
/// </summary>
|
||||
public class People : IResource, IMetadata, IThumbnails
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ namespace Kyoo.Abstractions.Models
|
||||
|
||||
/// <summary>
|
||||
/// Create a new <see cref="Provider"/> and specify it's <see cref="Name"/>.
|
||||
/// The <see cref="Slug"/> is automatically calculated from it's name.
|
||||
/// The <see cref="Slug"/> is automatically calculated from it's name.
|
||||
/// </summary>
|
||||
/// <param name="name">The name of this provider.</param>
|
||||
/// <param name="logo">The logo of this provider.</param>
|
||||
|
@ -8,7 +8,7 @@ using Kyoo.Abstractions.Models.Attributes;
|
||||
namespace Kyoo.Abstractions.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// A season of a <see cref="Show"/>.
|
||||
/// A season of a <see cref="Show"/>.
|
||||
/// </summary>
|
||||
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 ?? "", @"(?<show>.+)-s(?<season>\d+)");
|
||||
Match match = Regex.Match(value ?? string.Empty, @"(?<show>.+)-s(?<season>\d+)");
|
||||
|
||||
if (!match.Success)
|
||||
throw new ArgumentException("Invalid season slug. Format: {showSlug}-s{seasonNumber}");
|
||||
|
@ -51,30 +51,4 @@ namespace Kyoo.Abstractions.Models
|
||||
/// </summary>
|
||||
public ICollection<WatchedEpisode> CurrentlyWatching { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metadata of episode currently watching by an user
|
||||
/// </summary>
|
||||
public class WatchedEpisode
|
||||
{
|
||||
/// <summary>
|
||||
/// The ID of the user that started watching this episode.
|
||||
/// </summary>
|
||||
public int UserID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The ID of the episode started.
|
||||
/// </summary>
|
||||
public int EpisodeID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Episode"/> started.
|
||||
/// </summary>
|
||||
public Episode Episode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Where the player has stopped watching the episode (between 0 and 100).
|
||||
/// </summary>
|
||||
public int WatchedPercentage { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ namespace Kyoo.Utils
|
||||
|
||||
/// <summary>
|
||||
/// A map where the mapping function is asynchronous.
|
||||
/// Note: <see cref="SelectAsync{T,T2}"/> might interest you.
|
||||
/// Note: <see cref="SelectAsync{T,T2}"/> might interest you.
|
||||
/// </summary>
|
||||
/// <param name="self">The IEnumerable to map.</param>
|
||||
/// <param name="mapper">The asynchronous function that will map each items</param>
|
||||
|
@ -23,7 +23,7 @@ namespace Kyoo.Authentication
|
||||
{
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <param name="builder">The identity server that will be modified.</param>
|
||||
/// <param name="options">The certificate options</param>
|
||||
|
@ -17,7 +17,7 @@ namespace Kyoo.Authentication.Models.DTO
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The user's username.
|
||||
/// The user's username.
|
||||
/// </summary>
|
||||
[MinLength(4, ErrorMessage = "The username must have at least {1} characters")]
|
||||
public string Username { get; set; }
|
||||
|
@ -21,7 +21,7 @@ namespace Kyoo.Authentication.Models
|
||||
public PermissionOption Permissions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Root path of user's profile pictures.
|
||||
/// Root path of user's profile pictures.
|
||||
/// </summary>
|
||||
public string ProfilePicturePath { get; set; }
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ namespace Kyoo.Authentication.Views
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Register a new user and return a OTAC to connect to it.
|
||||
/// Register a new user and return a OTAC to connect to it.
|
||||
/// </summary>
|
||||
/// <param name="request">The DTO register request</param>
|
||||
/// <returns>A OTAC to connect to this new account</returns>
|
||||
|
@ -29,7 +29,7 @@ namespace Kyoo.Core.Controllers
|
||||
private readonly IOptions<BasicOptions> _options;
|
||||
|
||||
/// <summary>
|
||||
/// The logger used by this class.
|
||||
/// The logger used by this class.
|
||||
/// </summary>
|
||||
private readonly ILogger<PluginManager> _logger;
|
||||
|
||||
|
@ -55,7 +55,7 @@ namespace Kyoo.Core.Controllers
|
||||
public ManagedTask Task { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The progress reporter that this task should use.
|
||||
/// The progress reporter that this task should use.
|
||||
/// </summary>
|
||||
public IProgress<float> ProgressReporter { get; init; }
|
||||
|
||||
|
@ -31,7 +31,7 @@ namespace Kyoo.Core.Models.Watch
|
||||
[MarshalAs(UnmanagedType.I1)] public bool IsDefault;
|
||||
|
||||
/// <summary>
|
||||
/// Is this stream tagged as forced?
|
||||
/// Is this stream tagged as forced?
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.I1)] public bool IsForced;
|
||||
|
||||
|
@ -24,12 +24,12 @@ namespace Kyoo.Core.Tasks
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
|
||||
/// <summary>
|
||||
/// The file manager used walk inside directories and check they existences.
|
||||
/// The file manager used walk inside directories and check they existences.
|
||||
/// </summary>
|
||||
private readonly IFileSystem _fileSystem;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
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<IGrouping<string, string>> shows = files
|
||||
.Where(FileExtensions.IsVideo)
|
||||
.Where(x => episodes.All(y => y.Path != x))
|
||||
|
@ -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<ILibraryManager>();
|
||||
// _thumbnails = serviceScope.ServiceProvider.GetService<IThumbnailsManager>();
|
||||
// _transcoder = serviceScope.ServiceProvider.GetService<ITranscoder>();
|
||||
// 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<Season>(id)
|
||||
// Season season = await (int.TryParse(slug, out id)
|
||||
// ? _library!.Get<Season>(id)
|
||||
// : _library!.Get<Season>(slug));
|
||||
// await ExtractSeason(season, thumbs, subs, token);
|
||||
// break;
|
||||
// case "episode":
|
||||
// case "episodes":
|
||||
// Episode episode = await (int.TryParse(slug, out id)
|
||||
// ? _library!.Get<Episode>(id)
|
||||
// Episode episode = await (int.TryParse(slug, out id)
|
||||
// ? _library!.Get<Episode>(id)
|
||||
// : _library!.Get<Episode>(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<IEnumerable<string>> GetPossibleParameters()
|
||||
// {
|
||||
// return Task.FromResult<IEnumerable<string>>(null);
|
||||
|
@ -20,12 +20,12 @@ namespace Kyoo.Core.Tasks
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
|
||||
/// <summary>
|
||||
/// The file manager used walk inside directories and check they existences.
|
||||
/// The file manager used walk inside directories and check they existences.
|
||||
/// </summary>
|
||||
private readonly IFileSystem _fileSystem;
|
||||
|
||||
/// <summary>
|
||||
/// The logger used to inform the user that episodes has been removed.
|
||||
/// The logger used to inform the user that episodes has been removed.
|
||||
/// </summary>
|
||||
private readonly ILogger<Housekeeping> _logger;
|
||||
|
||||
|
@ -16,7 +16,7 @@ namespace Kyoo.Core.Tasks
|
||||
public class MetadataProviderLoader : ITask
|
||||
{
|
||||
/// <summary>
|
||||
/// The provider repository used to create in-db providers from metadata providers.
|
||||
/// The provider repository used to create in-db providers from metadata providers.
|
||||
/// </summary>
|
||||
private readonly IProviderRepository _providers;
|
||||
|
||||
|
@ -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<IThumbnailsManager>();
|
||||
// _providerManager = serviceProvider.GetService<IProviderManager>();
|
||||
// _database = serviceScope.ServiceProvider.GetService<DatabaseContext>();
|
||||
//
|
||||
//
|
||||
// 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<ILibraryManager>();
|
||||
@ -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('-');
|
||||
|
@ -11,7 +11,7 @@ namespace Kyoo.TheTvdb.Models
|
||||
public const string Path = "tvdb";
|
||||
|
||||
/// <summary>
|
||||
/// The api key of the tvdb.
|
||||
/// The api key of the tvdb.
|
||||
/// </summary>
|
||||
public string ApiKey { get; set; }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user