aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/BaseItem.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs')
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs85
1 files changed, 0 insertions, 85 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index f12532204..d9579d79f 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -34,7 +34,6 @@ namespace MediaBrowser.Controller.Entities
Images = new Dictionary<ImageType, string>();
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
LockedFields = new List<MetadataFields>();
- ImageSources = new List<ImageSourceInfo>();
}
/// <summary>
@@ -475,12 +474,6 @@ namespace MediaBrowser.Controller.Entities
public List<string> BackdropImagePaths { get; set; }
/// <summary>
- /// Gets or sets the backdrop image sources.
- /// </summary>
- /// <value>The backdrop image sources.</value>
- public List<ImageSourceInfo> ImageSources { get; set; }
-
- /// <summary>
/// Gets or sets the official rating.
/// </summary>
/// <value>The official rating.</value>
@@ -1458,8 +1451,6 @@ namespace MediaBrowser.Controller.Entities
BackdropImagePaths.Remove(file);
- RemoveImageSourceForPath(file);
-
// Delete the source file
DeleteImagePath(file);
}
@@ -1567,8 +1558,6 @@ namespace MediaBrowser.Controller.Entities
{
BackdropImagePaths.Remove(path);
- RemoveImageSourceForPath(path);
-
changed = true;
}
@@ -1576,80 +1565,6 @@ namespace MediaBrowser.Controller.Entities
}
/// <summary>
- /// Adds the image source.
- /// </summary>
- /// <param name="path">The path.</param>
- /// <param name="url">The URL.</param>
- public void AddImageSource(string path, string url)
- {
- RemoveImageSourceForPath(path);
-
- var pathMd5 = path.ToLower().GetMD5();
-
- ImageSources.Add(new ImageSourceInfo
- {
- ImagePathMD5 = pathMd5,
- ImageUrlMD5 = url.ToLower().GetMD5()
- });
- }
-
- /// <summary>
- /// Gets the image source info.
- /// </summary>
- /// <param name="path">The path.</param>
- /// <returns>ImageSourceInfo.</returns>
- public ImageSourceInfo GetImageSourceInfo(string path)
- {
- if (ImageSources.Count == 0)
- {
- return null;
- }
-
- var pathMd5 = path.ToLower().GetMD5();
-
- return ImageSources.FirstOrDefault(i => i.ImagePathMD5 == pathMd5);
- }
-
- /// <summary>
- /// Removes the image source for path.
- /// </summary>
- /// <param name="path">The path.</param>
- public void RemoveImageSourceForPath(string path)
- {
- if (ImageSources.Count == 0)
- {
- return;
- }
-
- var pathMd5 = path.ToLower().GetMD5();
-
- // Remove existing
- foreach (var entry in ImageSources
- .Where(i => i.ImagePathMD5 == pathMd5)
- .ToList())
- {
- ImageSources.Remove(entry);
- }
- }
-
- /// <summary>
- /// Determines whether [contains image with source URL] [the specified URL].
- /// </summary>
- /// <param name="url">The URL.</param>
- /// <returns><c>true</c> if [contains image with source URL] [the specified URL]; otherwise, <c>false</c>.</returns>
- public bool ContainsImageWithSourceUrl(string url)
- {
- if (ImageSources.Count == 0)
- {
- return false;
- }
-
- var md5 = url.ToLower().GetMD5();
-
- return ImageSources.Any(i => i.ImageUrlMD5 == md5);
- }
-
- /// <summary>
/// Validates the screenshots.
/// </summary>
private bool ValidateScreenshots()