From 10cfb3c43c06e39b61929fea1d398801e555274b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 14 Feb 2015 14:36:40 -0500 Subject: sync updates --- MediaBrowser.Controller/Library/IUserManager.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'MediaBrowser.Controller/Library') diff --git a/MediaBrowser.Controller/Library/IUserManager.cs b/MediaBrowser.Controller/Library/IUserManager.cs index 97a3cced9..8119e5afb 100644 --- a/MediaBrowser.Controller/Library/IUserManager.cs +++ b/MediaBrowser.Controller/Library/IUserManager.cs @@ -121,9 +121,8 @@ namespace MediaBrowser.Controller.Library /// Gets the offline user dto. /// /// The user. - /// The device identifier. /// UserDto. - UserDto GetOfflineUserDto(User user, string deviceId); + UserDto GetOfflineUserDto(User user); /// /// Resets the easy password. -- cgit v1.2.3 From 18ff8aba74593f4ad47aba5f001c812b2c9393fe Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 14 Feb 2015 22:36:07 -0500 Subject: fix language settings inheritance --- MediaBrowser.Controller/Entities/BaseItem.cs | 26 +++++++++++++++++----- MediaBrowser.Controller/Entities/TV/Series.cs | 7 +++--- MediaBrowser.Controller/Library/ILibraryManager.cs | 7 ++++++ .../Providers/BaseItemXmlParser.cs | 13 +++++++++++ .../Savers/XmlSaverHelpers.cs | 4 ++++ .../Library/LibraryManager.cs | 23 ++++++++++++++++--- MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs | 13 +++++++++++ MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs | 4 ++++ 8 files changed, 84 insertions(+), 13 deletions(-) (limited to 'MediaBrowser.Controller/Library') diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 3ab02ea21..50a6dda30 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -976,14 +976,21 @@ namespace MediaBrowser.Controller.Entities lang = hasLang.PreferredMetadataLanguage; } - if (string.IsNullOrEmpty(lang)) + if (string.IsNullOrWhiteSpace(lang)) { lang = Parents.OfType() .Select(i => i.PreferredMetadataLanguage) - .FirstOrDefault(i => !string.IsNullOrEmpty(i)); + .FirstOrDefault(i => !string.IsNullOrWhiteSpace(i)); } - if (string.IsNullOrEmpty(lang)) + if (string.IsNullOrWhiteSpace(lang)) + { + lang = LibraryManager.GetCollectionFolders(this) + .Select(i => i.PreferredMetadataLanguage) + .FirstOrDefault(i => !string.IsNullOrWhiteSpace(i)); + } + + if (string.IsNullOrWhiteSpace(lang)) { lang = ConfigurationManager.Configuration.PreferredMetadataLanguage; } @@ -1006,14 +1013,21 @@ namespace MediaBrowser.Controller.Entities lang = hasLang.PreferredMetadataCountryCode; } - if (string.IsNullOrEmpty(lang)) + if (string.IsNullOrWhiteSpace(lang)) { lang = Parents.OfType() .Select(i => i.PreferredMetadataCountryCode) - .FirstOrDefault(i => !string.IsNullOrEmpty(i)); + .FirstOrDefault(i => !string.IsNullOrWhiteSpace(i)); + } + + if (string.IsNullOrWhiteSpace(lang)) + { + lang = LibraryManager.GetCollectionFolders(this) + .Select(i => i.PreferredMetadataCountryCode) + .FirstOrDefault(i => !string.IsNullOrWhiteSpace(i)); } - if (string.IsNullOrEmpty(lang)) + if (string.IsNullOrWhiteSpace(lang)) { lang = ConfigurationManager.Configuration.MetadataCountryCode; } diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs index 619617e9f..4c34460d7 100644 --- a/MediaBrowser.Controller/Entities/TV/Series.cs +++ b/MediaBrowser.Controller/Entities/TV/Series.cs @@ -1,7 +1,4 @@ -using System.Threading; -using System.Threading.Tasks; -using MediaBrowser.Controller.Localization; -using MediaBrowser.Controller.Providers; +using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Querying; @@ -10,6 +7,8 @@ using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; +using System.Threading; +using System.Threading.Tasks; namespace MediaBrowser.Controller.Entities.TV { diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs index 9871ef3c5..9c8ed45a5 100644 --- a/MediaBrowser.Controller/Library/ILibraryManager.cs +++ b/MediaBrowser.Controller/Library/ILibraryManager.cs @@ -393,5 +393,12 @@ namespace MediaBrowser.Controller.Library /// IEnumerable<Video>. IEnumerable