diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-06-20 19:23:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-20 19:23:56 +0100 |
| commit | b5586e64f5d815f4449930dc53a61a676d0e2df4 (patch) | |
| tree | c82204256da3850fe6bad1e545135caed04d9cf0 /MediaBrowser.LocalMetadata/Images/EpisodeLocalImageProvider.cs | |
| parent | b2e1d7019130f7bf7e74c8af29927226fb30d46c (diff) | |
| parent | bb947718eaee3a8381d9b9e6ed926676de39d7c9 (diff) | |
Merge pull request #25 from jellyfin/master
Update my master
Diffstat (limited to 'MediaBrowser.LocalMetadata/Images/EpisodeLocalImageProvider.cs')
| -rw-r--r-- | MediaBrowser.LocalMetadata/Images/EpisodeLocalImageProvider.cs | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/MediaBrowser.LocalMetadata/Images/EpisodeLocalImageProvider.cs b/MediaBrowser.LocalMetadata/Images/EpisodeLocalImageProvider.cs index 9d23d80b8..393ad2efb 100644 --- a/MediaBrowser.LocalMetadata/Images/EpisodeLocalImageProvider.cs +++ b/MediaBrowser.LocalMetadata/Images/EpisodeLocalImageProvider.cs @@ -10,24 +10,35 @@ using MediaBrowser.Model.IO; namespace MediaBrowser.LocalMetadata.Images { - public class EpisodeLocalLocalImageProvider : ILocalImageProvider, IHasOrder + /// <summary> + /// Episode local image provider. + /// </summary> + public class EpisodeLocalImageProvider : ILocalImageProvider, IHasOrder { private readonly IFileSystem _fileSystem; - public EpisodeLocalLocalImageProvider(IFileSystem fileSystem) + /// <summary> + /// Initializes a new instance of the <see cref="EpisodeLocalImageProvider"/> class. + /// </summary> + /// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param> + public EpisodeLocalImageProvider(IFileSystem fileSystem) { _fileSystem = fileSystem; } + /// <inheritdoc /> public string Name => "Local Images"; + /// <inheritdoc /> public int Order => 0; + /// <inheritdoc /> public bool Supports(BaseItem item) { return item is Episode && item.SupportsLocalMetadata; } + /// <inheritdoc /> public List<LocalImageInfo> GetImages(BaseItem item, IDirectoryService directoryService) { var parentPath = Path.GetDirectoryName(item.Path); @@ -58,20 +69,11 @@ namespace MediaBrowser.LocalMetadata.Images if (string.Equals(filenameWithoutExtension, currentNameWithoutExtension, StringComparison.OrdinalIgnoreCase)) { - list.Add(new LocalImageInfo - { - FileInfo = i, - Type = ImageType.Primary - }); + list.Add(new LocalImageInfo { FileInfo = i, Type = ImageType.Primary }); } - else if (string.Equals(thumbName, currentNameWithoutExtension, StringComparison.OrdinalIgnoreCase)) { - list.Add(new LocalImageInfo - { - FileInfo = i, - Type = ImageType.Primary - }); + list.Add(new LocalImageInfo { FileInfo = i, Type = ImageType.Primary }); } } } |
