Minor improvements

This commit is contained in:
Bond_009
2020-02-23 10:53:51 +01:00
parent 72c98e41ca
commit a07ee65365
19 changed files with 214 additions and 170 deletions

View File

@@ -1,16 +1,17 @@
using System;
using System.Collections.Generic;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Controller.Chapters
{
/// <summary>
/// Interface IChapterManager
/// Interface IChapterManager.
/// </summary>
public interface IChapterManager
{
/// <summary>
/// Saves the chapters.
/// </summary>
void SaveChapters(string itemId, List<ChapterInfo> chapters);
void SaveChapters(Guid itemId, IReadOnlyList<ChapterInfo> chapters);
}
}

View File

@@ -1,3 +1,6 @@
#pragma warning disable CS1591
#pragma warning disable SA1600
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -28,7 +31,6 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
public class Folder : BaseItem
{
public static IUserManager UserManager { get; set; }
public static IUserViewManager UserViewManager { get; set; }
/// <summary>
@@ -620,7 +622,6 @@ namespace MediaBrowser.Controller.Entities
{
EnableImages = false
}
}).TotalRecordCount;
}
@@ -1672,7 +1673,6 @@ namespace MediaBrowser.Controller.Entities
{
EnableImages = false
}
});
double unplayedCount = unplayedQueryResult.TotalRecordCount;

View File

@@ -3,7 +3,7 @@ using System.Collections.Generic;
namespace MediaBrowser.Controller.Entities
{
/// <summary>
/// Marker interface
/// Marker interface.
/// </summary>
public interface IItemByName
{

View File

@@ -1,3 +1,6 @@
#pragma warning disable CS1591
#pragma warning disable SA1600
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
@@ -12,6 +15,6 @@ namespace MediaBrowser.Controller.MediaEncoding
/// <summary>
/// Refreshes the chapter images.
/// </summary>
Task<bool> RefreshChapterImages(Video video, IDirectoryService directoryService, List<ChapterInfo> chapters, bool extractImages, bool saveChapters, CancellationToken cancellationToken);
Task<bool> RefreshChapterImages(Video video, IDirectoryService directoryService, IReadOnlyList<ChapterInfo> chapters, bool extractImages, bool saveChapters, CancellationToken cancellationToken);
}
}

View File

@@ -61,7 +61,7 @@ namespace MediaBrowser.Controller.Persistence
/// <summary>
/// Saves the chapters.
/// </summary>
void SaveChapters(Guid id, List<ChapterInfo> chapters);
void SaveChapters(Guid id, IReadOnlyList<ChapterInfo> chapters);
/// <summary>
/// Gets the media streams.

View File

@@ -69,12 +69,10 @@ namespace MediaBrowser.Controller.Providers
//return _fileSystem.GetFileInfo(path);
}
public List<string> GetFilePaths(string path)
{
return GetFilePaths(path, false);
}
public IReadOnlyList<string> GetFilePaths(string path)
=> GetFilePaths(path, false);
public List<string> GetFilePaths(string path, bool clearCache)
public IReadOnlyList<string> GetFilePaths(string path, bool clearCache)
{
if (clearCache || !_filePathCache.TryGetValue(path, out List<string> result))
{

View File

@@ -9,7 +9,7 @@ namespace MediaBrowser.Controller.Providers
List<FileSystemMetadata> GetFiles(string path);
FileSystemMetadata GetFile(string path);
List<string> GetFilePaths(string path);
List<string> GetFilePaths(string path, bool clearCache);
IReadOnlyList<string> GetFilePaths(string path);
IReadOnlyList<string> GetFilePaths(string path, bool clearCache);
}
}