Merge pull request #6338 from richlander/mediabrowser-controller-providers

Fix warnings for MediaBrowser.Controller/Providers directory
This commit is contained in:
Bond-009 2021-07-25 14:57:14 +02:00 committed by GitHub
commit 311774e75f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 39 additions and 24 deletions

View File

@ -1,4 +1,4 @@
#pragma warning disable CS1591
#pragma warning disable CA1002, CA2227, CS1591
using System;
using System.Collections.Generic;

View File

@ -1,4 +1,4 @@
#pragma warning disable CS1591
#pragma warning disable CA1002, CA2227, CS1591
using System.Collections.Generic;

View File

@ -1,6 +1,6 @@
#nullable disable
#pragma warning disable CS1591
#pragma warning disable CA2227, CS1591
using System;
using System.Collections.Generic;

View File

@ -1,4 +1,4 @@
#pragma warning disable CS1591
#pragma warning disable CA1002, CS1591
using System.Collections.Generic;
using MediaBrowser.Model.IO;

View File

@ -31,6 +31,9 @@ namespace MediaBrowser.Controller.Providers
/// <summary>
/// Queues the refresh.
/// </summary>
/// <param name="itemId">Item ID.</param>
/// <param name="options">MetadataRefreshOptions for operation.</param>
/// <param name="priority">RefreshPriority for operation.</param>
void QueueRefresh(Guid itemId, MetadataRefreshOptions options, RefreshPriority priority);
/// <summary>
@ -85,6 +88,13 @@ namespace MediaBrowser.Controller.Providers
/// <summary>
/// Saves the image.
/// </summary>
/// <param name="item">Image to save.</param>
/// <param name="source">Source of image.</param>
/// <param name="mimeType">Mime type image.</param>
/// <param name="type">Type of image.</param>
/// <param name="imageIndex">Index of image.</param>
/// <param name="saveLocallyWithMedia">Option to save locally.</param>
/// <param name="cancellationToken">CancellationToken to use with operation.</param>
/// <returns>Task.</returns>
Task SaveImage(BaseItem item, string source, string mimeType, ImageType type, int? imageIndex, bool? saveLocallyWithMedia, CancellationToken cancellationToken);
@ -93,6 +103,11 @@ namespace MediaBrowser.Controller.Providers
/// <summary>
/// Adds the metadata providers.
/// </summary>
/// <param name="imageProviders">Image providers to use.</param>
/// <param name="metadataServices">Metadata services to use.</param>
/// <param name="metadataProviders">Metadata providers to use.</param>
/// <param name="metadataSavers">Metadata savers to use.</param>
/// <param name="externalIds">External IDs to use.</param>
void AddParts(
IEnumerable<IImageProvider> imageProviders,
IEnumerable<IMetadataService> metadataServices,

View File

@ -1,6 +1,6 @@
#nullable disable
#pragma warning disable CS1591
#pragma warning disable CA1819, CS1591
using System;
using System.Linq;
@ -10,6 +10,15 @@ namespace MediaBrowser.Controller.Providers
{
public class ImageRefreshOptions
{
public ImageRefreshOptions(IDirectoryService directoryService)
{
ImageRefreshMode = MetadataRefreshMode.Default;
DirectoryService = directoryService;
ReplaceImages = Array.Empty<ImageType>();
IsAutomated = true;
}
public MetadataRefreshMode ImageRefreshMode { get; set; }
public IDirectoryService DirectoryService { get; private set; }
@ -20,15 +29,6 @@ namespace MediaBrowser.Controller.Providers
public bool IsAutomated { get; set; }
public ImageRefreshOptions(IDirectoryService directoryService)
{
ImageRefreshMode = MetadataRefreshMode.Default;
DirectoryService = directoryService;
ReplaceImages = Array.Empty<ImageType>();
IsAutomated = true;
}
public bool IsReplacingImage(ImageType type)
{
return ImageRefreshMode == MetadataRefreshMode.FullRefresh &&

View File

@ -1,6 +1,6 @@
#nullable disable
#pragma warning disable CS1591
#pragma warning disable CA2227, CS1591
using System;
using System.Collections.Generic;

View File

@ -1,6 +1,6 @@
#nullable disable
#pragma warning disable CS1591
#pragma warning disable CA1819, CS1591
using System;
using System.Linq;

View File

@ -1,6 +1,6 @@
#nullable disable
#pragma warning disable CS1591
#pragma warning disable CA1002, CA2227, CS1591
using System;
using System.Collections.Generic;

View File

@ -1,4 +1,4 @@
#pragma warning disable CS1591
#pragma warning disable CA2227, CS1591
using System;
using System.Collections.Generic;

View File

@ -9,16 +9,16 @@ namespace MediaBrowser.Controller.Providers
{
public class SongInfo : ItemLookupInfo
{
public IReadOnlyList<string> AlbumArtists { get; set; }
public string Album { get; set; }
public IReadOnlyList<string> Artists { get; set; }
public SongInfo()
{
Artists = Array.Empty<string>();
AlbumArtists = Array.Empty<string>();
}
public IReadOnlyList<string> AlbumArtists { get; set; }
public string Album { get; set; }
public IReadOnlyList<string> Artists { get; set; }
}
}