diff options
| author | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
|---|---|---|
| committer | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
| commit | 48facb797ed912e4ea6b04b17d1ff190ac2daac4 (patch) | |
| tree | 8dae77a31670a888d733484cb17dd4077d5444e8 /MediaBrowser.Controller/Entities/LinkedChild.cs | |
| parent | c32d8656382a0eacb301692e0084377fc433ae9b (diff) | |
Update to 3.5.2 and .net core 2.1
Diffstat (limited to 'MediaBrowser.Controller/Entities/LinkedChild.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/LinkedChild.cs | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/MediaBrowser.Controller/Entities/LinkedChild.cs b/MediaBrowser.Controller/Entities/LinkedChild.cs deleted file mode 100644 index 6031a2448..000000000 --- a/MediaBrowser.Controller/Entities/LinkedChild.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using MediaBrowser.Model.IO; -using MediaBrowser.Model.Serialization; - -namespace MediaBrowser.Controller.Entities -{ - public class LinkedChild - { - public string Path { get; set; } - public LinkedChildType Type { get; set; } - - [IgnoreDataMember] - public string Id { get; set; } - - /// <summary> - /// Serves as a cache - /// </summary> - public Guid? ItemId { get; set; } - - public static LinkedChild Create(BaseItem item) - { - return new LinkedChild - { - Path = item.Path, - Type = LinkedChildType.Manual - }; - } - - public LinkedChild() - { - Id = Guid.NewGuid().ToString("N"); - } - } - - public enum LinkedChildType - { - Manual = 0, - Shortcut = 1 - } - - public class LinkedChildComparer : IEqualityComparer<LinkedChild> - { - private readonly IFileSystem _fileSystem; - - public LinkedChildComparer(IFileSystem fileSystem) - { - _fileSystem = fileSystem; - } - - public bool Equals(LinkedChild x, LinkedChild y) - { - if (x.Type == y.Type) - { - return _fileSystem.AreEqual(x.Path, y.Path); - } - return false; - } - - public int GetHashCode(LinkedChild obj) - { - return (obj.Path + obj.Type).GetHashCode(); - } - } -} |
