Fix warnings for MediaBrowser.Controller/Providers directory

This commit is contained in:
Rich Lander 2021-07-23 09:16:48 -07:00
parent 0e2a6f8216
commit 717ff4ec62
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;
using System.Collections.Generic; using System.Collections.Generic;

View File

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

View File

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

View File

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

View File

@ -31,6 +31,9 @@ namespace MediaBrowser.Controller.Providers
/// <summary> /// <summary>
/// Queues the refresh. /// Queues the refresh.
/// </summary> /// </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); void QueueRefresh(Guid itemId, MetadataRefreshOptions options, RefreshPriority priority);
/// <summary> /// <summary>
@ -85,6 +88,13 @@ namespace MediaBrowser.Controller.Providers
/// <summary> /// <summary>
/// Saves the image. /// Saves the image.
/// </summary> /// </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> /// <returns>Task.</returns>
Task SaveImage(BaseItem item, string source, string mimeType, ImageType type, int? imageIndex, bool? saveLocallyWithMedia, CancellationToken cancellationToken); 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> /// <summary>
/// Adds the metadata providers. /// Adds the metadata providers.
/// </summary> /// </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( void AddParts(
IEnumerable<IImageProvider> imageProviders, IEnumerable<IImageProvider> imageProviders,
IEnumerable<IMetadataService> metadataServices, IEnumerable<IMetadataService> metadataServices,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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