remove unused files and fix some future warnings

This commit is contained in:
dkanada 2020-03-09 23:05:03 +09:00
parent bf34105af3
commit 52fde64f10
33 changed files with 73 additions and 125 deletions

View File

@ -64,7 +64,7 @@ namespace MediaBrowser.Controller.Channels
/// </summary> /// </summary>
/// <param name="type">The type.</param> /// <param name="type">The type.</param>
/// <param name="cancellationToken">The cancellation token.</param> /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{DynamicImageInfo}.</returns> /// <returns>Task{DynamicImageResponse}.</returns>
Task<DynamicImageResponse> GetChannelImage(ImageType type, CancellationToken cancellationToken); Task<DynamicImageResponse> GetChannelImage(ImageType type, CancellationToken cancellationToken);
/// <summary> /// <summary>

View File

@ -2190,13 +2190,9 @@ namespace MediaBrowser.Controller.Entities
/// <summary> /// <summary>
/// Do whatever refreshing is necessary when the filesystem pertaining to this item has changed. /// Do whatever refreshing is necessary when the filesystem pertaining to this item has changed.
/// </summary> /// </summary>
/// <returns>Task.</returns>
public virtual void ChangedExternally() public virtual void ChangedExternally()
{ {
ProviderManager.QueueRefresh(Id, new MetadataRefreshOptions(new DirectoryService(FileSystem)) ProviderManager.QueueRefresh(Id, new MetadataRefreshOptions(new DirectoryService(FileSystem)), RefreshPriority.High);
{
}, RefreshPriority.High);
} }
/// <summary> /// <summary>
@ -2227,7 +2223,6 @@ namespace MediaBrowser.Controller.Entities
existingImage.Width = image.Width; existingImage.Width = image.Width;
existingImage.Height = image.Height; existingImage.Height = image.Height;
} }
else else
{ {
var current = ImageInfos; var current = ImageInfos;
@ -2270,7 +2265,6 @@ namespace MediaBrowser.Controller.Entities
/// </summary> /// </summary>
/// <param name="type">The type.</param> /// <param name="type">The type.</param>
/// <param name="index">The index.</param> /// <param name="index">The index.</param>
/// <returns>Task.</returns>
public void DeleteImage(ImageType type, int index) public void DeleteImage(ImageType type, int index)
{ {
var info = GetImageInfo(type, index); var info = GetImageInfo(type, index);
@ -2308,7 +2302,7 @@ namespace MediaBrowser.Controller.Entities
} }
/// <summary> /// <summary>
/// Validates that images within the item are still on the file system /// Validates that images within the item are still on the filesystem.
/// </summary> /// </summary>
public bool ValidateImages(IDirectoryService directoryService) public bool ValidateImages(IDirectoryService directoryService)
{ {
@ -2602,7 +2596,7 @@ namespace MediaBrowser.Controller.Entities
} }
/// <summary> /// <summary>
/// This is called before any metadata refresh and returns true or false indicating if changes were made /// This is called before any metadata refresh and returns true if changes were made.
/// </summary> /// </summary>
public virtual bool BeforeMetadataRefresh(bool replaceAllMetdata) public virtual bool BeforeMetadataRefresh(bool replaceAllMetdata)
{ {
@ -2662,36 +2656,43 @@ namespace MediaBrowser.Controller.Entities
newOptions.ForceSave = true; newOptions.ForceSave = true;
ownedItem.Genres = item.Genres; ownedItem.Genres = item.Genres;
} }
if (!item.Studios.SequenceEqual(ownedItem.Studios, StringComparer.Ordinal)) if (!item.Studios.SequenceEqual(ownedItem.Studios, StringComparer.Ordinal))
{ {
newOptions.ForceSave = true; newOptions.ForceSave = true;
ownedItem.Studios = item.Studios; ownedItem.Studios = item.Studios;
} }
if (!item.ProductionLocations.SequenceEqual(ownedItem.ProductionLocations, StringComparer.Ordinal)) if (!item.ProductionLocations.SequenceEqual(ownedItem.ProductionLocations, StringComparer.Ordinal))
{ {
newOptions.ForceSave = true; newOptions.ForceSave = true;
ownedItem.ProductionLocations = item.ProductionLocations; ownedItem.ProductionLocations = item.ProductionLocations;
} }
if (item.CommunityRating != ownedItem.CommunityRating) if (item.CommunityRating != ownedItem.CommunityRating)
{ {
ownedItem.CommunityRating = item.CommunityRating; ownedItem.CommunityRating = item.CommunityRating;
newOptions.ForceSave = true; newOptions.ForceSave = true;
} }
if (item.CriticRating != ownedItem.CriticRating) if (item.CriticRating != ownedItem.CriticRating)
{ {
ownedItem.CriticRating = item.CriticRating; ownedItem.CriticRating = item.CriticRating;
newOptions.ForceSave = true; newOptions.ForceSave = true;
} }
if (!string.Equals(item.Overview, ownedItem.Overview, StringComparison.Ordinal)) if (!string.Equals(item.Overview, ownedItem.Overview, StringComparison.Ordinal))
{ {
ownedItem.Overview = item.Overview; ownedItem.Overview = item.Overview;
newOptions.ForceSave = true; newOptions.ForceSave = true;
} }
if (!string.Equals(item.OfficialRating, ownedItem.OfficialRating, StringComparison.Ordinal)) if (!string.Equals(item.OfficialRating, ownedItem.OfficialRating, StringComparison.Ordinal))
{ {
ownedItem.OfficialRating = item.OfficialRating; ownedItem.OfficialRating = item.OfficialRating;
newOptions.ForceSave = true; newOptions.ForceSave = true;
} }
if (!string.Equals(item.CustomRating, ownedItem.CustomRating, StringComparison.Ordinal)) if (!string.Equals(item.CustomRating, ownedItem.CustomRating, StringComparison.Ordinal))
{ {
ownedItem.CustomRating = item.CustomRating; ownedItem.CustomRating = item.CustomRating;
@ -2900,11 +2901,17 @@ namespace MediaBrowser.Controller.Entities
} }
public virtual bool IsHD => Height >= 720; public virtual bool IsHD => Height >= 720;
public bool IsShortcut { get; set; } public bool IsShortcut { get; set; }
public string ShortcutPath { get; set; } public string ShortcutPath { get; set; }
public int Width { get; set; } public int Width { get; set; }
public int Height { get; set; } public int Height { get; set; }
public Guid[] ExtraIds { get; set; } public Guid[] ExtraIds { get; set; }
public virtual long GetRunTimeTicksForPlayState() public virtual long GetRunTimeTicksForPlayState()
{ {
return RunTimeTicks ?? 0; return RunTimeTicks ?? 0;

View File

@ -13,8 +13,10 @@ namespace MediaBrowser.Controller.Entities
[JsonIgnore] [JsonIgnore]
public string SeriesPresentationUniqueKey { get; set; } public string SeriesPresentationUniqueKey { get; set; }
[JsonIgnore] [JsonIgnore]
public string SeriesName { get; set; } public string SeriesName { get; set; }
[JsonIgnore] [JsonIgnore]
public Guid SeriesId { get; set; } public Guid SeriesId { get; set; }
@ -22,10 +24,12 @@ namespace MediaBrowser.Controller.Entities
{ {
return SeriesName; return SeriesName;
} }
public string FindSeriesName() public string FindSeriesName()
{ {
return SeriesName; return SeriesName;
} }
public string FindSeriesPresentationUniqueKey() public string FindSeriesPresentationUniqueKey()
{ {
return SeriesPresentationUniqueKey; return SeriesPresentationUniqueKey;

View File

@ -16,6 +16,7 @@ namespace MediaBrowser.Controller.Providers
/// </summary> /// </summary>
/// <value>The artist provider ids.</value> /// <value>The artist provider ids.</value>
public Dictionary<string, string> ArtistProviderIds { get; set; } public Dictionary<string, string> ArtistProviderIds { get; set; }
public List<SongInfo> SongInfos { get; set; } public List<SongInfo> SongInfos { get; set; }
public AlbumInfo() public AlbumInfo()

View File

@ -2,6 +2,5 @@ namespace MediaBrowser.Controller.Providers
{ {
public class BoxSetInfo : ItemLookupInfo public class BoxSetInfo : ItemLookupInfo
{ {
} }
} }

View File

@ -26,7 +26,6 @@ namespace MediaBrowser.Controller.Providers
{ {
entries = _fileSystem.GetFileSystemEntries(path).ToArray(); entries = _fileSystem.GetFileSystemEntries(path).ToArray();
//_cache.TryAdd(path, entries);
_cache[path] = entries; _cache[path] = entries;
} }
@ -56,7 +55,6 @@ namespace MediaBrowser.Controller.Providers
if (file != null && file.Exists) if (file != null && file.Exists)
{ {
//_fileCache.TryAdd(path, file);
_fileCache[path] = file; _fileCache[path] = file;
} }
else else
@ -66,7 +64,6 @@ namespace MediaBrowser.Controller.Providers
} }
return file; return file;
//return _fileSystem.GetFileInfo(path);
} }
public List<string> GetFilePaths(string path) public List<string> GetFilePaths(string path)

View File

@ -1,10 +0,0 @@
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Controller.Providers
{
public class DynamicImageInfo
{
public string ImageId { get; set; }
public ImageType Type { get; set; }
}
}

View File

@ -8,9 +8,13 @@ namespace MediaBrowser.Controller.Providers
public class DynamicImageResponse public class DynamicImageResponse
{ {
public string Path { get; set; } public string Path { get; set; }
public MediaProtocol Protocol { get; set; } public MediaProtocol Protocol { get; set; }
public Stream Stream { get; set; } public Stream Stream { get; set; }
public ImageFormat Format { get; set; } public ImageFormat Format { get; set; }
public bool HasImage { get; set; } public bool HasImage { get; set; }
public void SetFormatFromMimeType(string mimeType) public void SetFormatFromMimeType(string mimeType)

View File

@ -10,6 +10,7 @@ namespace MediaBrowser.Controller.Providers
public int? IndexNumberEnd { get; set; } public int? IndexNumberEnd { get; set; }
public bool IsMissingEpisode { get; set; } public bool IsMissingEpisode { get; set; }
public string SeriesDisplayOrder { get; set; } public string SeriesDisplayOrder { get; set; }
public EpisodeInfo() public EpisodeInfo()

View File

@ -1,15 +0,0 @@
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Controller.Providers
{
public class ExtraInfo
{
public string Path { get; set; }
public LocationType LocationType { get; set; }
public bool IsDownloadable { get; set; }
public ExtraType ExtraType { get; set; }
}
}

View File

@ -1,9 +0,0 @@
namespace MediaBrowser.Controller.Providers
{
public enum ExtraSource
{
Local = 1,
Metadata = 2,
Remote = 3
}
}

View File

@ -13,7 +13,7 @@ namespace MediaBrowser.Controller.Providers
where TItemType : BaseItem where TItemType : BaseItem
{ {
/// <summary> /// <summary>
/// Fetches the asynchronous. /// Fetches the metadata asynchronously.
/// </summary> /// </summary>
/// <param name="item">The item.</param> /// <param name="item">The item.</param>
/// <param name="options">The options.</param> /// <param name="options">The options.</param>

View File

@ -6,10 +6,13 @@ namespace MediaBrowser.Controller.Providers
public interface IDirectoryService public interface IDirectoryService
{ {
FileSystemMetadata[] GetFileSystemEntries(string path); FileSystemMetadata[] GetFileSystemEntries(string path);
List<FileSystemMetadata> GetFiles(string path); List<FileSystemMetadata> GetFiles(string path);
FileSystemMetadata GetFile(string path); FileSystemMetadata GetFile(string path);
List<string> GetFilePaths(string path); List<string> GetFilePaths(string path);
List<string> GetFilePaths(string path, bool clearCache); List<string> GetFilePaths(string path, bool clearCache);
} }
} }

View File

@ -1,20 +0,0 @@
using MediaBrowser.Controller.Entities;
namespace MediaBrowser.Controller.Providers
{
public interface IExtrasProvider
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
string Name { get; }
/// <summary>
/// Supportses the specified item.
/// </summary>
/// <param name="item">The item.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
bool Supports(BaseItem item);
}
}

View File

@ -1,7 +1,7 @@
namespace MediaBrowser.Controller.Providers namespace MediaBrowser.Controller.Providers
{ {
/// <summary> /// <summary>
/// This is a marker interface that will cause a provider to run even if IsLocked=true /// This is a marker interface that will cause a provider to run even if an item is locked from changes.
/// </summary> /// </summary>
public interface IForcedProvider public interface IForcedProvider
{ {

View File

@ -3,7 +3,7 @@ using MediaBrowser.Controller.Entities;
namespace MediaBrowser.Controller.Providers namespace MediaBrowser.Controller.Providers
{ {
/// <summary> /// <summary>
/// Interface IImageProvider /// Interface IImageProvider.
/// </summary> /// </summary>
public interface IImageProvider public interface IImageProvider
{ {
@ -14,10 +14,10 @@ namespace MediaBrowser.Controller.Providers
string Name { get; } string Name { get; }
/// <summary> /// <summary>
/// Supportses the specified item. /// Supports the specified item.
/// </summary> /// </summary>
/// <param name="item">The item.</param> /// <param name="item">The item.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns> /// <returns><c>true</c> if the provider supports the item.</returns>
bool Supports(BaseItem item); bool Supports(BaseItem item);
} }
} }

View File

@ -17,8 +17,9 @@ namespace MediaBrowser.Controller.Providers
/// <param name="info">The information.</param> /// <param name="info">The information.</param>
/// <param name="directoryService">The directory service.</param> /// <param name="directoryService">The directory service.</param>
/// <param name="cancellationToken">The cancellation token.</param> /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{MetadataResult{`0}}.</returns> /// <returns>Task{MetadataResult{0}}.</returns>
Task<MetadataResult<TItemType>> GetMetadata(ItemInfo info, Task<MetadataResult<TItemType>> GetMetadata(
ItemInfo info,
IDirectoryService directoryService, IDirectoryService directoryService,
CancellationToken cancellationToken); CancellationToken cancellationToken);
} }

View File

@ -12,8 +12,9 @@ namespace MediaBrowser.Controller.Providers
/// Determines whether this instance can refresh the specified item. /// Determines whether this instance can refresh the specified item.
/// </summary> /// </summary>
/// <param name="item">The item.</param> /// <param name="item">The item.</param>
/// <returns><c>true</c> if this instance can refresh the specified item; otherwise, <c>false</c>.</returns> /// <returns><c>true</c> if this instance can refresh the specified item.</returns>
bool CanRefresh(BaseItem item); bool CanRefresh(BaseItem item);
bool CanRefreshPrimary(Type type); bool CanRefreshPrimary(Type type);
/// <summary> /// <summary>

View File

@ -2,6 +2,5 @@ namespace MediaBrowser.Controller.Providers
{ {
public interface IPreRefreshProvider : ICustomMetadataProvider public interface IPreRefreshProvider : ICustomMetadataProvider
{ {
} }
} }

View File

@ -14,7 +14,7 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Controller.Providers namespace MediaBrowser.Controller.Providers
{ {
/// <summary> /// <summary>
/// Interface IProviderManager /// Interface IProviderManager.
/// </summary> /// </summary>
public interface IProviderManager public interface IProviderManager
{ {
@ -159,13 +159,17 @@ namespace MediaBrowser.Controller.Providers
Dictionary<Guid, Guid> GetRefreshQueue(); Dictionary<Guid, Guid> GetRefreshQueue();
void OnRefreshStart(BaseItem item); void OnRefreshStart(BaseItem item);
void OnRefreshProgress(BaseItem item, double progress); void OnRefreshProgress(BaseItem item, double progress);
void OnRefreshComplete(BaseItem item); void OnRefreshComplete(BaseItem item);
double? GetRefreshProgress(Guid id); double? GetRefreshProgress(Guid id);
event EventHandler<GenericEventArgs<BaseItem>> RefreshStarted; event EventHandler<GenericEventArgs<BaseItem>> RefreshStarted;
event EventHandler<GenericEventArgs<BaseItem>> RefreshCompleted; event EventHandler<GenericEventArgs<BaseItem>> RefreshCompleted;
event EventHandler<GenericEventArgs<Tuple<BaseItem, double>>> RefreshProgress; event EventHandler<GenericEventArgs<Tuple<BaseItem, double>>> RefreshProgress;
} }

View File

@ -9,7 +9,7 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Controller.Providers namespace MediaBrowser.Controller.Providers
{ {
/// <summary> /// <summary>
/// Interface IImageProvider /// Interface IImageProvider.
/// </summary> /// </summary>
public interface IRemoteImageProvider : IImageProvider public interface IRemoteImageProvider : IImageProvider
{ {

View File

@ -23,10 +23,15 @@ namespace MediaBrowser.Controller.Providers
} }
public Type ItemType { get; set; } public Type ItemType { get; set; }
public string Path { get; set; } public string Path { get; set; }
public string ContainingFolderPath { get; set; } public string ContainingFolderPath { get; set; }
public VideoType VideoType { get; set; } public VideoType VideoType { get; set; }
public bool IsInMixedFolder { get; set; } public bool IsInMixedFolder { get; set; }
public bool IsPlaceHolder { get; set; } public bool IsPlaceHolder { get; set; }
} }
} }

View File

@ -11,29 +11,37 @@ namespace MediaBrowser.Controller.Providers
/// </summary> /// </summary>
/// <value>The name.</value> /// <value>The name.</value>
public string Name { get; set; } public string Name { get; set; }
/// <summary> /// <summary>
/// Gets or sets the metadata language. /// Gets or sets the metadata language.
/// </summary> /// </summary>
/// <value>The metadata language.</value> /// <value>The metadata language.</value>
public string MetadataLanguage { get; set; } public string MetadataLanguage { get; set; }
/// <summary> /// <summary>
/// Gets or sets the metadata country code. /// Gets or sets the metadata country code.
/// </summary> /// </summary>
/// <value>The metadata country code.</value> /// <value>The metadata country code.</value>
public string MetadataCountryCode { get; set; } public string MetadataCountryCode { get; set; }
/// <summary> /// <summary>
/// Gets or sets the provider ids. /// Gets or sets the provider ids.
/// </summary> /// </summary>
/// <value>The provider ids.</value> /// <value>The provider ids.</value>
public Dictionary<string, string> ProviderIds { get; set; } public Dictionary<string, string> ProviderIds { get; set; }
/// <summary> /// <summary>
/// Gets or sets the year. /// Gets or sets the year.
/// </summary> /// </summary>
/// <value>The year.</value> /// <value>The year.</value>
public int? Year { get; set; } public int? Year { get; set; }
public int? IndexNumber { get; set; } public int? IndexNumber { get; set; }
public int? ParentIndexNumber { get; set; } public int? ParentIndexNumber { get; set; }
public DateTime? PremiereDate { get; set; } public DateTime? PremiereDate { get; set; }
public bool IsAutomated { get; set; } public bool IsAutomated { get; set; }
public ItemLookupInfo() public ItemLookupInfo()

View File

@ -6,6 +6,7 @@ namespace MediaBrowser.Controller.Providers
public class LocalImageInfo public class LocalImageInfo
{ {
public FileSystemMetadata FileInfo { get; set; } public FileSystemMetadata FileInfo { get; set; }
public ImageType Type { get; set; } public ImageType Type { get; set; }
} }
} }

View File

@ -1,39 +0,0 @@
namespace MediaBrowser.Controller.Providers
{
/// <summary>
/// Determines when a provider should execute, relative to others
/// </summary>
public enum MetadataProviderPriority
{
// Run this provider at the beginning
/// <summary>
/// The first
/// </summary>
First = 1,
// Run this provider after all first priority providers
/// <summary>
/// The second
/// </summary>
Second = 2,
// Run this provider after all second priority providers
/// <summary>
/// The third
/// </summary>
Third = 3,
/// <summary>
/// The fourth
/// </summary>
Fourth = 4,
Fifth = 5,
// Run this provider last
/// <summary>
/// The last
/// </summary>
Last = 999
}
}

View File

@ -13,11 +13,13 @@ namespace MediaBrowser.Controller.Providers
public bool ReplaceAllMetadata { get; set; } public bool ReplaceAllMetadata { get; set; }
public MetadataRefreshMode MetadataRefreshMode { get; set; } public MetadataRefreshMode MetadataRefreshMode { get; set; }
public RemoteSearchResult SearchResult { get; set; } public RemoteSearchResult SearchResult { get; set; }
public string[] RefreshPaths { get; set; } public string[] RefreshPaths { get; set; }
public bool ForceSave { get; set; } public bool ForceSave { get; set; }
public bool EnableRemoteContentProbe { get; set; } public bool EnableRemoteContentProbe { get; set; }
public MetadataRefreshOptions(IDirectoryService directoryService) public MetadataRefreshOptions(IDirectoryService directoryService)

View File

@ -8,6 +8,7 @@ namespace MediaBrowser.Controller.Providers
public class MetadataResult<T> public class MetadataResult<T>
{ {
public List<LocalImageInfo> Images { get; set; } public List<LocalImageInfo> Images { get; set; }
public List<UserItemData> UserDataList { get; set; } public List<UserItemData> UserDataList { get; set; }
public MetadataResult() public MetadataResult()
@ -19,10 +20,15 @@ namespace MediaBrowser.Controller.Providers
public List<PersonInfo> People { get; set; } public List<PersonInfo> People { get; set; }
public bool HasMetadata { get; set; } public bool HasMetadata { get; set; }
public T Item { get; set; } public T Item { get; set; }
public string ResultLanguage { get; set; } public string ResultLanguage { get; set; }
public string Provider { get; set; } public string Provider { get; set; }
public bool QueriedById { get; set; } public bool QueriedById { get; set; }
public void AddPerson(PersonInfo p) public void AddPerson(PersonInfo p)
{ {
if (People == null) if (People == null)

View File

@ -2,6 +2,5 @@ namespace MediaBrowser.Controller.Providers
{ {
public class MovieInfo : ItemLookupInfo public class MovieInfo : ItemLookupInfo
{ {
} }
} }

View File

@ -2,6 +2,5 @@ namespace MediaBrowser.Controller.Providers
{ {
public class PersonLookupInfo : ItemLookupInfo public class PersonLookupInfo : ItemLookupInfo
{ {
} }
} }

View File

@ -10,14 +10,14 @@ namespace MediaBrowser.Controller.Providers
public Guid ItemId { get; set; } public Guid ItemId { get; set; }
/// <summary> /// <summary>
/// If set will only search within the given provider /// Will only search within the given provider when set.
/// </summary> /// </summary>
public string SearchProviderName { get; set; } public string SearchProviderName { get; set; }
/// <summary> /// <summary>
/// Gets or sets a value indicating whether [include disabled providers]. /// Gets or sets a value indicating whether disabled providers should be included.
/// </summary> /// </summary>
/// <value><c>true</c> if [include disabled providers]; otherwise, <c>false</c>.</value> /// <value><c>true</c> if disabled providers should be included.</value>
public bool IncludeDisabledProviders { get; set; } public bool IncludeDisabledProviders { get; set; }
} }
} }

View File

@ -30,7 +30,7 @@ namespace MediaBrowser.LocalMetadata.Images
{ {
if (item.SupportsLocalMetadata) if (item.SupportsLocalMetadata)
{ {
// Episode has it's own provider // Episode has its own provider
if (item is Episode || item is Audio || item is Photo) if (item is Episode || item is Audio || item is Photo)
{ {
return false; return false;

View File

@ -44,6 +44,7 @@ namespace MediaBrowser.Model.Entities
/// The box. /// The box.
/// </summary> /// </summary>
Box = 7, Box = 7,
/// <summary> /// <summary>
/// The screenshot. /// The screenshot.
/// </summary> /// </summary>

View File

@ -606,7 +606,6 @@ namespace MediaBrowser.Providers.Manager
// Run custom refresh providers if they report a change or any remote providers change // Run custom refresh providers if they report a change or any remote providers change
return anyRemoteProvidersChanged || providersWithChanges.Contains(i); return anyRemoteProvidersChanged || providersWithChanges.Contains(i);
}).ToList(); }).ToList();
} }
} }