From 673746621f7ed792c41dcd888a5b6e47b17ca2cb Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 10 May 2016 12:18:05 -0400 Subject: [PATCH] fix DeviceDiscovery --- MediaBrowser.Controller/Entities/BaseItem.cs | 19 ------------------- .../Entities/IHasUserData.cs | 6 ------ MediaBrowser.Dlna/Ssdp/DeviceDiscovery.cs | 5 ----- .../Library/UserDataManager.cs | 9 +++++---- .../Sync/SyncJobProcessor.cs | 3 ++- .../Native/WindowsApp.cs | 10 +++++----- 6 files changed, 12 insertions(+), 40 deletions(-) diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index cd021d2ab5..1c8817afed 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -1186,23 +1186,6 @@ namespace MediaBrowser.Controller.Entities return false; } - private string _userDataKey; - /// - /// Gets the user data key. - /// - /// System.String. - public string GetUserDataKey() - { - if (string.IsNullOrWhiteSpace(_userDataKey)) - { - var key = GetUserDataKeys().First(); - _userDataKey = key; - return key; - } - - return _userDataKey; - } - public virtual List GetUserDataKeys() { var list = new List(); @@ -1229,7 +1212,6 @@ namespace MediaBrowser.Controller.Entities public void AfterMetadataRefresh() { _sortName = null; - _userDataKey = null; } /// @@ -2074,7 +2056,6 @@ namespace MediaBrowser.Controller.Entities /// public virtual bool BeforeMetadataRefresh() { - _userDataKey = null; _sortName = null; var hasChanges = false; diff --git a/MediaBrowser.Controller/Entities/IHasUserData.cs b/MediaBrowser.Controller/Entities/IHasUserData.cs index 3e0fa3f1dc..244b319bd6 100644 --- a/MediaBrowser.Controller/Entities/IHasUserData.cs +++ b/MediaBrowser.Controller/Entities/IHasUserData.cs @@ -8,12 +8,6 @@ namespace MediaBrowser.Controller.Entities /// public interface IHasUserData : IHasId { - /// - /// Gets the user data key. - /// - /// System.String. - string GetUserDataKey(); - List GetUserDataKeys(); /// diff --git a/MediaBrowser.Dlna/Ssdp/DeviceDiscovery.cs b/MediaBrowser.Dlna/Ssdp/DeviceDiscovery.cs index 5e0baa1f67..1eda79f022 100644 --- a/MediaBrowser.Dlna/Ssdp/DeviceDiscovery.cs +++ b/MediaBrowser.Dlna/Ssdp/DeviceDiscovery.cs @@ -125,11 +125,6 @@ namespace MediaBrowser.Dlna.Ssdp args.EndPoint = endPoint; args.LocalEndPoint = new IPEndPoint(localIp, 0); - if (_ssdpHandler.IgnoreMessage(args, true)) - { - return; - } - _ssdpHandler.LogMessageReceived(args, true); TryCreateDevice(args); diff --git a/MediaBrowser.Server.Implementations/Library/UserDataManager.cs b/MediaBrowser.Server.Implementations/Library/UserDataManager.cs index 0fabbf54aa..f637160be9 100644 --- a/MediaBrowser.Server.Implementations/Library/UserDataManager.cs +++ b/MediaBrowser.Server.Implementations/Library/UserDataManager.cs @@ -10,6 +10,7 @@ using MediaBrowser.Model.Logging; using System; using System.Collections.Concurrent; using System.Collections.Generic; +using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -199,22 +200,22 @@ namespace MediaBrowser.Server.Implementations.Library public UserItemData GetUserData(IHasUserData user, IHasUserData item) { - return GetUserData(user.Id, item.GetUserDataKey()); + return GetUserData(user.Id, item.GetUserDataKeys().First()); } public UserItemData GetUserData(string userId, IHasUserData item) { - return GetUserData(userId, item.GetUserDataKey()); + return GetUserData(userId, item.GetUserDataKeys().First()); } public UserItemData GetUserData(Guid userId, IHasUserData item) { - return GetUserData(userId, item.GetUserDataKey()); + return GetUserData(userId, item.GetUserDataKeys().First()); } public UserItemDataDto GetUserDataDto(IHasUserData item, User user) { - var userData = GetUserData(user.Id, item.GetUserDataKey()); + var userData = GetUserData(user.Id, item.GetUserDataKeys().First()); var dto = GetUserItemDataDto(userData); item.FillUserDataDtoValues(dto, userData, user); diff --git a/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs b/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs index 379e2f0560..bbba06870e 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs +++ b/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs @@ -345,7 +345,8 @@ namespace MediaBrowser.Server.Implementations.Sync if (!folder.IsPreSorted) { - items = items.OrderBy(i => i.SortName).ToArray(); + items = _libraryManager.Sort(items, user, new[] { ItemSortBy.SortName }, SortOrder.Ascending) + .ToArray(); } return items; diff --git a/MediaBrowser.ServerApplication/Native/WindowsApp.cs b/MediaBrowser.ServerApplication/Native/WindowsApp.cs index 271b02d9a7..f5abcf336e 100644 --- a/MediaBrowser.ServerApplication/Native/WindowsApp.cs +++ b/MediaBrowser.ServerApplication/Native/WindowsApp.cs @@ -158,7 +158,7 @@ namespace MediaBrowser.ServerApplication.Native info.FFMpegFilename = "ffmpeg.exe"; info.FFProbeFilename = "ffprobe.exe"; - info.Version = "20160508"; + info.Version = "20160410"; info.ArchiveType = "7z"; info.IsEmbedded = false; info.DownloadUrls = GetDownloadUrls(); @@ -214,14 +214,14 @@ namespace MediaBrowser.ServerApplication.Native case Architecture.X86_X64: return new[] { - "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20160508-win64.7z", - "https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20160508-git-caee88d-win64-static.7z" + "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20160410-win64.7z", + "https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20160409-git-0c90b2e-win64-static.7z" }; case Architecture.X86: return new[] { - "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20160508-win32.7z", - "https://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20160508-git-caee88d-win32-static.7z" + "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20160410-win32.7z", + "https://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20160409-git-0c90b2e-win32-static.7z" }; } return new string[] { };