mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-02 22:08:27 +01:00
Fix more warnings
This commit is contained in:
@@ -89,7 +89,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
var locations = PhysicalLocations;
|
||||
|
||||
var newLocations = CreateResolveArgs(new DirectoryService(Logger, FileSystem), false).PhysicalLocations;
|
||||
var newLocations = CreateResolveArgs(new DirectoryService(FileSystem), false).PhysicalLocations;
|
||||
|
||||
if (!locations.SequenceEqual(newLocations))
|
||||
{
|
||||
|
||||
@@ -1344,7 +1344,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
public Task RefreshMetadata(CancellationToken cancellationToken)
|
||||
{
|
||||
return RefreshMetadata(new MetadataRefreshOptions(new DirectoryService(Logger, FileSystem)), cancellationToken);
|
||||
return RefreshMetadata(new MetadataRefreshOptions(new DirectoryService(FileSystem)), cancellationToken);
|
||||
}
|
||||
|
||||
protected virtual void TriggerOnRefreshStart()
|
||||
@@ -2197,7 +2197,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <returns>Task.</returns>
|
||||
public virtual void ChangedExternally()
|
||||
{
|
||||
ProviderManager.QueueRefresh(Id, new MetadataRefreshOptions(new DirectoryService(Logger, FileSystem))
|
||||
ProviderManager.QueueRefresh(Id, new MetadataRefreshOptions(new DirectoryService(FileSystem))
|
||||
{
|
||||
|
||||
}, RefreshPriority.High);
|
||||
|
||||
@@ -171,7 +171,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
var locations = PhysicalLocations;
|
||||
|
||||
var newLocations = CreateResolveArgs(new DirectoryService(Logger, FileSystem), false).PhysicalLocations;
|
||||
var newLocations = CreateResolveArgs(new DirectoryService(FileSystem), false).PhysicalLocations;
|
||||
|
||||
if (!locations.SequenceEqual(newLocations))
|
||||
{
|
||||
|
||||
@@ -216,7 +216,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
public Task ValidateChildren(IProgress<double> progress, CancellationToken cancellationToken)
|
||||
{
|
||||
return ValidateChildren(progress, cancellationToken, new MetadataRefreshOptions(new DirectoryService(Logger, FileSystem)));
|
||||
return ValidateChildren(progress, cancellationToken, new MetadataRefreshOptions(new DirectoryService(FileSystem)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
Name = newName;
|
||||
|
||||
return RefreshMetadata(
|
||||
new MetadataRefreshOptions(new DirectoryService(Logger, FileSystem))
|
||||
new MetadataRefreshOptions(new DirectoryService(FileSystem))
|
||||
{
|
||||
ReplaceAllMetadata = true,
|
||||
ImageRefreshMode = MetadataRefreshMode.FullRefresh,
|
||||
|
||||
@@ -2,13 +2,11 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Model.IO;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace MediaBrowser.Controller.Providers
|
||||
{
|
||||
public class DirectoryService : IDirectoryService
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
|
||||
private readonly Dictionary<string, FileSystemMetadata[]> _cache = new Dictionary<string, FileSystemMetadata[]>(StringComparer.OrdinalIgnoreCase);
|
||||
@@ -17,9 +15,8 @@ namespace MediaBrowser.Controller.Providers
|
||||
|
||||
private readonly Dictionary<string, List<string>> _filePathCache = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
public DirectoryService(ILogger logger, IFileSystem fileSystem)
|
||||
public DirectoryService(IFileSystem fileSystem)
|
||||
{
|
||||
_logger = logger;
|
||||
_fileSystem = fileSystem;
|
||||
}
|
||||
|
||||
@@ -27,8 +24,6 @@ namespace MediaBrowser.Controller.Providers
|
||||
{
|
||||
if (!_cache.TryGetValue(path, out FileSystemMetadata[] entries))
|
||||
{
|
||||
//_logger.LogDebug("Getting files for " + path);
|
||||
|
||||
entries = _fileSystem.GetFileSystemEntries(path).ToArray();
|
||||
|
||||
//_cache.TryAdd(path, entries);
|
||||
@@ -49,6 +44,7 @@ namespace MediaBrowser.Controller.Providers
|
||||
list.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -89,6 +85,5 @@ namespace MediaBrowser.Controller.Providers
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@ namespace MediaBrowser.Controller.Subtitles
|
||||
/// <summary>
|
||||
/// Searches the subtitles.
|
||||
/// </summary>
|
||||
Task<RemoteSubtitleInfo[]> SearchSubtitles(Video video,
|
||||
Task<RemoteSubtitleInfo[]> SearchSubtitles(
|
||||
Video video,
|
||||
string language,
|
||||
bool? isPerfectMatch,
|
||||
CancellationToken cancellationToken);
|
||||
@@ -34,8 +35,9 @@ namespace MediaBrowser.Controller.Subtitles
|
||||
/// </summary>
|
||||
/// <param name="request">The request.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{IEnumerable{RemoteSubtitleInfo}}.</returns>
|
||||
Task<RemoteSubtitleInfo[]> SearchSubtitles(SubtitleSearchRequest request,
|
||||
/// <returns>Task{RemoteSubtitleInfo[]}.</returns>
|
||||
Task<RemoteSubtitleInfo[]> SearchSubtitles(
|
||||
SubtitleSearchRequest request,
|
||||
CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
@@ -53,7 +55,7 @@ namespace MediaBrowser.Controller.Subtitles
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{SubtitleResponse}.</returns>
|
||||
/// <returns><see cref="Task{SubtitleResponse}" />.</returns>
|
||||
Task<SubtitleResponse> GetRemoteSubtitles(string id, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user