From e287e3a50d0f83a43905c17434e928fd6d754d9f Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 26 Aug 2017 20:32:33 -0400 Subject: [PATCH 1/2] remove async when there's nothing to await --- .../Activity/ActivityLogEntryPoint.cs | 12 ++-- .../Activity/ActivityManager.cs | 6 +- .../Activity/ActivityRepository.cs | 7 +- .../ApplicationHost.cs | 2 +- .../Channels/ChannelManager.cs | 6 +- .../Collections/CollectionManager.cs | 2 +- .../SqliteDisplayPreferencesRepository.cs | 9 ++- .../Data/SqliteItemRepository.cs | 31 ++++----- .../Data/SqliteUserDataRepository.cs | 15 ++-- .../Data/SqliteUserRepository.cs | 5 +- .../Library/LibraryManager.cs | 39 ++++++----- .../Library/UserDataManager.cs | 12 ++-- .../Library/UserManager.cs | 68 +++++++++---------- .../Library/UserViewManager.cs | 16 ++--- .../LiveTv/LiveTvManager.cs | 6 +- .../MediaEncoder/EncodingManager.cs | 2 +- .../Playlists/PlaylistManager.cs | 2 +- .../Security/AuthenticationRepository.cs | 7 +- .../Session/SessionManager.cs | 42 ++++++------ .../Social/SharingManager.cs | 8 +-- .../Social/SharingRepository.cs | 6 +- MediaBrowser.Api/DisplayPreferencesService.cs | 4 +- MediaBrowser.Api/ItemUpdateService.cs | 2 +- MediaBrowser.Api/Library/LibraryService.cs | 8 +-- MediaBrowser.Api/Session/SessionsService.cs | 7 +- MediaBrowser.Api/Social/SharingService.cs | 5 +- MediaBrowser.Api/StartupWizardService.cs | 2 +- .../UserLibrary/UserLibraryService.cs | 24 +++---- MediaBrowser.Api/UserService.cs | 57 ++++++---------- .../Chapters/IChapterManager.cs | 4 +- MediaBrowser.Controller/Entities/BaseItem.cs | 8 +-- MediaBrowser.Controller/Entities/Folder.cs | 24 ++++--- MediaBrowser.Controller/Entities/User.cs | 15 ++-- .../Library/ILibraryManager.cs | 15 ++-- .../Library/IUserDataManager.cs | 7 +- .../Library/IUserManager.cs | 16 ++--- .../IDisplayPreferencesRepository.cs | 7 +- .../Persistence/IItemRepository.cs | 24 +++---- .../Persistence/IUserDataRepository.cs | 7 +- .../Persistence/IUserRepository.cs | 5 +- .../Security/IAuthenticationRepository.cs | 5 +- .../Session/ISessionManager.cs | 6 +- .../Activity/IActivityManager.cs | 3 +- .../Activity/IActivityRepository.cs | 3 +- MediaBrowser.Model/Social/ISharingManager.cs | 2 +- .../Social/ISharingRepository.cs | 7 +- .../Chapters/ChapterManager.cs | 6 +- .../Manager/MetadataService.cs | 15 ++-- .../MediaInfo/FFProbeAudioInfo.cs | 14 ++-- .../MediaInfo/FFProbeVideoInfo.cs | 12 ++-- .../TV/DummySeasonProvider.cs | 6 +- .../TV/MissingEpisodeProvider.cs | 6 +- Nuget/MediaBrowser.Common.nuspec | 2 +- Nuget/MediaBrowser.Server.Core.nuspec | 4 +- 54 files changed, 287 insertions(+), 348 deletions(-) diff --git a/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs index 702917832b..1b6daca73b 100644 --- a/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs +++ b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs @@ -128,7 +128,7 @@ namespace Emby.Server.Implementations.Activity { // Don't report theme song or local trailer playback return; - } + } if (e.Users.Count == 0) { @@ -160,8 +160,8 @@ namespace Emby.Server.Implementations.Activity { // Don't report theme song or local trailer playback return; - } - + } + if (e.Users.Count == 0) { return; @@ -416,7 +416,7 @@ namespace Emby.Server.Implementations.Activity { return; } - + var time = result.EndTimeUtc - result.StartTimeUtc; var runningTime = string.Format(_localization.GetLocalizedString("LabelRunningTimeValue"), ToUserFriendlyString(time)); @@ -444,11 +444,11 @@ namespace Emby.Server.Implementations.Activity } } - private async void CreateLogEntry(ActivityLogEntry entry) + private void CreateLogEntry(ActivityLogEntry entry) { try { - await _activityManager.Create(entry).ConfigureAwait(false); + _activityManager.Create(entry); } catch { diff --git a/Emby.Server.Implementations/Activity/ActivityManager.cs b/Emby.Server.Implementations/Activity/ActivityManager.cs index b6095f0820..9a3f1ae472 100644 --- a/Emby.Server.Implementations/Activity/ActivityManager.cs +++ b/Emby.Server.Implementations/Activity/ActivityManager.cs @@ -13,7 +13,7 @@ namespace Emby.Server.Implementations.Activity public class ActivityManager : IActivityManager { public event EventHandler> EntryCreated; - + private readonly IActivityRepository _repo; private readonly ILogger _logger; private readonly IUserManager _userManager; @@ -25,12 +25,12 @@ namespace Emby.Server.Implementations.Activity _userManager = userManager; } - public async Task Create(ActivityLogEntry entry) + public void Create(ActivityLogEntry entry) { entry.Id = Guid.NewGuid().ToString("N"); entry.Date = DateTime.UtcNow; - await _repo.Create(entry).ConfigureAwait(false); + _repo.Create(entry); EventHelper.FireEventIfNotNull(EntryCreated, this, new GenericEventArgs(entry), _logger); } diff --git a/Emby.Server.Implementations/Activity/ActivityRepository.cs b/Emby.Server.Implementations/Activity/ActivityRepository.cs index 7720f8f2fd..3dcc50ba38 100644 --- a/Emby.Server.Implementations/Activity/ActivityRepository.cs +++ b/Emby.Server.Implementations/Activity/ActivityRepository.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; -using System.Threading.Tasks; using Emby.Server.Implementations.Data; using MediaBrowser.Controller; using MediaBrowser.Model.Activity; @@ -41,12 +40,12 @@ namespace Emby.Server.Implementations.Activity private const string BaseActivitySelectText = "select Id, Name, Overview, ShortOverview, Type, ItemId, UserId, DateCreated, LogSeverity from ActivityLogEntries"; - public Task Create(ActivityLogEntry entry) + public void Create(ActivityLogEntry entry) { - return Update(entry); + Update(entry); } - public async Task Update(ActivityLogEntry entry) + public void Update(ActivityLogEntry entry) { if (entry == null) { diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 88dd47538a..70ec37a3bc 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1048,7 +1048,7 @@ namespace Emby.Server.Implementations SetStaticProperties(); - await ((UserManager)UserManager).Initialize().ConfigureAwait(false); + ((UserManager)UserManager).Initialize(); } protected virtual string PackageRuntime diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs index d8d69a62ed..fcc637b254 100644 --- a/Emby.Server.Implementations/Channels/ChannelManager.cs +++ b/Emby.Server.Implementations/Channels/ChannelManager.cs @@ -429,7 +429,7 @@ namespace Emby.Server.Implementations.Channels if (isNew) { - await _libraryManager.CreateItem(item, cancellationToken).ConfigureAwait(false); + _libraryManager.CreateItem(item, cancellationToken); } else if (forceUpdate) { @@ -1388,11 +1388,11 @@ namespace Emby.Server.Implementations.Channels if (isNew) { - await _libraryManager.CreateItem(item, cancellationToken).ConfigureAwait(false); + _libraryManager.CreateItem(item, cancellationToken); if (info.People != null && info.People.Count > 0) { - await _libraryManager.UpdatePeople(item, info.People ?? new List()).ConfigureAwait(false); + _libraryManager.UpdatePeople(item, info.People ?? new List()); } } else if (forceUpdate) diff --git a/Emby.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.cs index 0fc8fdc48c..2e884e729c 100644 --- a/Emby.Server.Implementations/Collections/CollectionManager.cs +++ b/Emby.Server.Implementations/Collections/CollectionManager.cs @@ -90,7 +90,7 @@ namespace Emby.Server.Implementations.Collections }).ToList() }; - await parentFolder.AddChild(collection, CancellationToken.None).ConfigureAwait(false); + parentFolder.AddChild(collection, CancellationToken.None); if (options.ItemIdList.Length > 0) { diff --git a/Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs b/Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs index 4118bd1b21..89664d158e 100644 --- a/Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.IO; using System.Threading; -using System.Threading.Tasks; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Persistence; @@ -75,7 +74,7 @@ namespace Emby.Server.Implementations.Data /// The cancellation token. /// Task. /// item - public async Task SaveDisplayPreferences(DisplayPreferences displayPreferences, Guid userId, string client, CancellationToken cancellationToken) + public void SaveDisplayPreferences(DisplayPreferences displayPreferences, Guid userId, string client, CancellationToken cancellationToken) { if (displayPreferences == null) { @@ -123,7 +122,7 @@ namespace Emby.Server.Implementations.Data /// The cancellation token. /// Task. /// item - public async Task SaveAllDisplayPreferences(IEnumerable displayPreferences, Guid userId, CancellationToken cancellationToken) + public void SaveAllDisplayPreferences(IEnumerable displayPreferences, Guid userId, CancellationToken cancellationToken) { if (displayPreferences == null) { @@ -226,9 +225,9 @@ namespace Emby.Server.Implementations.Data } } - public Task SaveDisplayPreferences(DisplayPreferences displayPreferences, string userId, string client, CancellationToken cancellationToken) + public void SaveDisplayPreferences(DisplayPreferences displayPreferences, string userId, string client, CancellationToken cancellationToken) { - return SaveDisplayPreferences(displayPreferences, new Guid(userId), client, cancellationToken); + SaveDisplayPreferences(displayPreferences, new Guid(userId), client, cancellationToken); } public DisplayPreferences GetDisplayPreferences(string displayPreferencesId, string userId, string client) diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index ff1d217e55..74e009bd99 100644 --- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs @@ -132,8 +132,7 @@ namespace Emby.Server.Implementations.Data /// /// Opens the connection to the database /// - /// Task. - public async Task Initialize(SqliteUserDataRepository userDataRepo) + public void Initialize(SqliteUserDataRepository userDataRepo) { using (var connection = CreateConnection()) { @@ -600,16 +599,15 @@ namespace Emby.Server.Implementations.Data /// /// The item. /// The cancellation token. - /// Task. /// item - public Task SaveItem(BaseItem item, CancellationToken cancellationToken) + public void SaveItem(BaseItem item, CancellationToken cancellationToken) { if (item == null) { throw new ArgumentNullException("item"); } - return SaveItems(new List { item }, cancellationToken); + SaveItems(new List { item }, cancellationToken); } /// @@ -617,13 +615,12 @@ namespace Emby.Server.Implementations.Data /// /// The items. /// The cancellation token. - /// Task. /// /// items /// or /// cancellationToken /// - public async Task SaveItems(List items, CancellationToken cancellationToken) + public void SaveItems(List items, CancellationToken cancellationToken) { if (items == null) { @@ -1959,22 +1956,18 @@ namespace Emby.Server.Implementations.Data /// Gets the critic reviews. /// /// The item id. - /// Task{IEnumerable{ItemReview}}. public List GetCriticReviews(Guid itemId) { return new List(); } - private readonly Task _cachedTask = Task.FromResult(true); /// /// Saves the critic reviews. /// /// The item id. /// The critic reviews. - /// Task. - public Task SaveCriticReviews(Guid itemId, IEnumerable criticReviews) + public void SaveCriticReviews(Guid itemId, IEnumerable criticReviews) { - return _cachedTask; } /// @@ -2079,7 +2072,7 @@ namespace Emby.Server.Implementations.Data /// /// Saves the chapters. /// - public async Task SaveChapters(Guid id, List chapters) + public void SaveChapters(Guid id, List chapters) { CheckDisposed(); @@ -4654,12 +4647,12 @@ namespace Emby.Server.Implementations.Data typeof(AggregateFolder) }; - public async Task UpdateInheritedValues(CancellationToken cancellationToken) + public void UpdateInheritedValues(CancellationToken cancellationToken) { - await UpdateInheritedTags(cancellationToken).ConfigureAwait(false); + UpdateInheritedTags(cancellationToken); } - private async Task UpdateInheritedTags(CancellationToken cancellationToken) + private void UpdateInheritedTags(CancellationToken cancellationToken) { var newValues = new List>(); @@ -4754,7 +4747,7 @@ limit 100"; return new[] { value }.Where(IsValidType); } - public async Task DeleteItem(Guid id, CancellationToken cancellationToken) + public void DeleteItem(Guid id, CancellationToken cancellationToken) { if (id == Guid.Empty) { @@ -5485,7 +5478,7 @@ limit 100"; } } - public async Task UpdatePeople(Guid itemId, List people) + public void UpdatePeople(Guid itemId, List people) { if (itemId == Guid.Empty) { @@ -5615,7 +5608,7 @@ limit 100"; } } - public async Task SaveMediaStreams(Guid id, List streams, CancellationToken cancellationToken) + public void SaveMediaStreams(Guid id, List streams, CancellationToken cancellationToken) { CheckDisposed(); diff --git a/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs b/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs index bf6388f5d8..ef1d7ba445 100644 --- a/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading; -using System.Threading.Tasks; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Persistence; @@ -153,7 +152,7 @@ namespace Emby.Server.Implementations.Data /// userId /// or /// userDataId - public Task SaveUserData(Guid userId, string key, UserItemData userData, CancellationToken cancellationToken) + public void SaveUserData(Guid userId, string key, UserItemData userData, CancellationToken cancellationToken) { if (userData == null) { @@ -168,10 +167,10 @@ namespace Emby.Server.Implementations.Data throw new ArgumentNullException("key"); } - return PersistUserData(userId, key, userData, cancellationToken); + PersistUserData(userId, key, userData, cancellationToken); } - public Task SaveAllUserData(Guid userId, IEnumerable userData, CancellationToken cancellationToken) + public void SaveAllUserData(Guid userId, UserItemData[] userData, CancellationToken cancellationToken) { if (userData == null) { @@ -182,7 +181,7 @@ namespace Emby.Server.Implementations.Data throw new ArgumentNullException("userId"); } - return PersistAllUserData(userId, userData.ToList(), cancellationToken); + PersistAllUserData(userId, userData, cancellationToken); } /// @@ -193,7 +192,7 @@ namespace Emby.Server.Implementations.Data /// The user data. /// The cancellation token. /// Task. - public async Task PersistUserData(Guid userId, string key, UserItemData userData, CancellationToken cancellationToken) + public void PersistUserData(Guid userId, string key, UserItemData userData, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); @@ -264,7 +263,7 @@ namespace Emby.Server.Implementations.Data /// /// Persist all user data for the specified user /// - private async Task PersistAllUserData(Guid userId, List userDataList, CancellationToken cancellationToken) + private void PersistAllUserData(Guid userId, UserItemData[] userDataList, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); @@ -349,7 +348,7 @@ namespace Emby.Server.Implementations.Data /// /// /// - public IEnumerable GetAllUserData(Guid userId) + public List GetAllUserData(Guid userId) { if (userId == Guid.Empty) { diff --git a/Emby.Server.Implementations/Data/SqliteUserRepository.cs b/Emby.Server.Implementations/Data/SqliteUserRepository.cs index 29959bcabe..b65996e405 100644 --- a/Emby.Server.Implementations/Data/SqliteUserRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteUserRepository.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.IO; using System.Threading; -using System.Threading.Tasks; using MediaBrowser.Controller; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Persistence; @@ -72,7 +71,7 @@ namespace Emby.Server.Implementations.Data /// The cancellation token. /// Task. /// user - public async Task SaveUser(User user, CancellationToken cancellationToken) + public void SaveUser(User user, CancellationToken cancellationToken) { if (user == null) { @@ -139,7 +138,7 @@ namespace Emby.Server.Implementations.Data /// The cancellation token. /// Task. /// user - public async Task DeleteUser(User user, CancellationToken cancellationToken) + public void DeleteUser(User user, CancellationToken cancellationToken) { if (user == null) { diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 1bfc93e79a..57e42985d3 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -461,10 +461,10 @@ namespace Emby.Server.Implementations.Library parent.RemoveChild(item); } - await ItemRepository.DeleteItem(item.Id, CancellationToken.None).ConfigureAwait(false); + ItemRepository.DeleteItem(item.Id, CancellationToken.None); foreach (var child in children) { - await ItemRepository.DeleteItem(child.Id, CancellationToken.None).ConfigureAwait(false); + ItemRepository.DeleteItem(child.Id, CancellationToken.None); } BaseItem removed; @@ -997,8 +997,7 @@ namespace Emby.Server.Implementations.Library Path = path }; - var task = CreateItem(item, CancellationToken.None); - Task.WaitAll(task); + CreateItem(item, CancellationToken.None); } return item; @@ -1170,7 +1169,7 @@ namespace Emby.Server.Implementations.Library progress.Report(percent * 100); } - await ItemRepository.UpdateInheritedValues(cancellationToken).ConfigureAwait(false); + ItemRepository.UpdateInheritedValues(cancellationToken); progress.Report(100); } @@ -1812,9 +1811,9 @@ namespace Emby.Server.Implementations.Library /// The item. /// The cancellation token. /// Task. - public Task CreateItem(BaseItem item, CancellationToken cancellationToken) + public void CreateItem(BaseItem item, CancellationToken cancellationToken) { - return CreateItems(new[] { item }, cancellationToken); + CreateItems(new[] { item }, cancellationToken); } /// @@ -1823,11 +1822,11 @@ namespace Emby.Server.Implementations.Library /// The items. /// The cancellation token. /// Task. - public async Task CreateItems(IEnumerable items, CancellationToken cancellationToken) + public void CreateItems(IEnumerable items, CancellationToken cancellationToken) { var list = items.ToList(); - await ItemRepository.SaveItems(list, cancellationToken).ConfigureAwait(false); + ItemRepository.SaveItems(list, cancellationToken); foreach (var item in list) { @@ -1870,7 +1869,7 @@ namespace Emby.Server.Implementations.Library var logName = item.LocationType == LocationType.Remote ? item.Name ?? item.Path : item.Path ?? item.Name; _logger.Debug("Saving {0} to database.", logName); - await ItemRepository.SaveItem(item, cancellationToken).ConfigureAwait(false); + ItemRepository.SaveItem(item, cancellationToken); RegisterItem(item); @@ -2067,7 +2066,7 @@ namespace Emby.Server.Implementations.Library private readonly TimeSpan _viewRefreshInterval = TimeSpan.FromHours(24); //private readonly TimeSpan _viewRefreshInterval = TimeSpan.FromMinutes(1); - public Task GetNamedView(User user, + public UserView GetNamedView(User user, string name, string viewType, string sortName, @@ -2105,7 +2104,7 @@ namespace Emby.Server.Implementations.Library ForcedSortName = sortName }; - await CreateItem(item, cancellationToken).ConfigureAwait(false); + CreateItem(item, cancellationToken); refresh = true; } @@ -2136,7 +2135,7 @@ namespace Emby.Server.Implementations.Library return item; } - public async Task GetNamedView(User user, + public UserView GetNamedView(User user, string name, string parentId, string viewType, @@ -2173,7 +2172,7 @@ namespace Emby.Server.Implementations.Library item.DisplayParentId = new Guid(parentId); } - await CreateItem(item, cancellationToken).ConfigureAwait(false); + CreateItem(item, cancellationToken); isNew = true; } @@ -2199,7 +2198,7 @@ namespace Emby.Server.Implementations.Library return item; } - public async Task GetShadowView(BaseItem parent, + public UserView GetShadowView(BaseItem parent, string viewType, string sortName, CancellationToken cancellationToken) @@ -2238,7 +2237,7 @@ namespace Emby.Server.Implementations.Library item.DisplayParentId = parentId; - await CreateItem(item, cancellationToken).ConfigureAwait(false); + CreateItem(item, cancellationToken); isNew = true; } @@ -2309,7 +2308,7 @@ namespace Emby.Server.Implementations.Library item.DisplayParentId = new Guid(parentId); } - await CreateItem(item, cancellationToken).ConfigureAwait(false); + CreateItem(item, cancellationToken); isNew = true; } @@ -2823,14 +2822,14 @@ namespace Emby.Server.Implementations.Library return ItemRepository.GetPeopleNames(query); } - public Task UpdatePeople(BaseItem item, List people) + public void UpdatePeople(BaseItem item, List people) { if (!item.SupportsPeople) { - return Task.FromResult(true); + return; } - return ItemRepository.UpdatePeople(item.Id, people); + ItemRepository.UpdatePeople(item.Id, people); } public async Task ConvertImageToLocal(IHasMetadata item, ItemImageInfo image, int imageIndex) diff --git a/Emby.Server.Implementations/Library/UserDataManager.cs b/Emby.Server.Implementations/Library/UserDataManager.cs index 1f2bf97a39..7ef5ca35e1 100644 --- a/Emby.Server.Implementations/Library/UserDataManager.cs +++ b/Emby.Server.Implementations/Library/UserDataManager.cs @@ -41,7 +41,7 @@ namespace Emby.Server.Implementations.Library /// The repository. public IUserDataRepository Repository { get; set; } - public async Task SaveUserData(Guid userId, IHasUserData item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken) + public void SaveUserData(Guid userId, IHasUserData item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken) { if (userData == null) { @@ -62,7 +62,7 @@ namespace Emby.Server.Implementations.Library foreach (var key in keys) { - await Repository.SaveUserData(userId, key, userData, cancellationToken).ConfigureAwait(false); + Repository.SaveUserData(userId, key, userData, cancellationToken); } var cacheKey = GetCacheKey(userId, item.Id); @@ -86,7 +86,7 @@ namespace Emby.Server.Implementations.Library /// /// /// - public async Task SaveAllUserData(Guid userId, IEnumerable userData, CancellationToken cancellationToken) + public void SaveAllUserData(Guid userId, UserItemData[] userData, CancellationToken cancellationToken) { if (userData == null) { @@ -99,7 +99,7 @@ namespace Emby.Server.Implementations.Library cancellationToken.ThrowIfCancellationRequested(); - await Repository.SaveAllUserData(userId, userData, cancellationToken).ConfigureAwait(false); + Repository.SaveAllUserData(userId, userData, cancellationToken); } /// @@ -107,7 +107,7 @@ namespace Emby.Server.Implementations.Library /// /// /// - public IEnumerable GetAllUserData(Guid userId) + public List GetAllUserData(Guid userId) { if (userId == Guid.Empty) { @@ -187,7 +187,7 @@ namespace Emby.Server.Implementations.Library var userData = GetUserData(user.Id, item); var dto = GetUserItemDataDto(userData); - item.FillUserDataDtoValues(dto, userData, null, user, new ItemFields[]{}); + item.FillUserDataDtoValues(dto, userData, null, user, new ItemFields[] { }); return dto; } diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs index 211c54ceea..e5fe2969f0 100644 --- a/Emby.Server.Implementations/Library/UserManager.cs +++ b/Emby.Server.Implementations/Library/UserManager.cs @@ -160,9 +160,9 @@ namespace Emby.Server.Implementations.Library return Users.FirstOrDefault(u => string.Equals(u.Name, name, StringComparison.OrdinalIgnoreCase)); } - public async Task Initialize() + public void Initialize() { - Users = await LoadUsers().ConfigureAwait(false); + Users = LoadUsers(); var users = Users.ToList(); @@ -174,7 +174,7 @@ namespace Emby.Server.Implementations.Library if (!user.ConnectLinkType.HasValue || user.ConnectLinkType.Value == UserLinkType.LinkedUser) { user.Policy.IsAdministrator = true; - await UpdateUserPolicy(user, user.Policy, false).ConfigureAwait(false); + UpdateUserPolicy(user, user.Policy, false); } } } @@ -294,12 +294,12 @@ namespace Emby.Server.Implementations.Library if (success) { user.LastActivityDate = user.LastLoginDate = DateTime.UtcNow; - await UpdateUser(user).ConfigureAwait(false); - await UpdateInvalidLoginAttemptCount(user, 0).ConfigureAwait(false); + UpdateUser(user); + UpdateInvalidLoginAttemptCount(user, 0); } else { - await UpdateInvalidLoginAttemptCount(user, user.Policy.InvalidLoginAttemptCount + 1).ConfigureAwait(false); + UpdateInvalidLoginAttemptCount(user, user.Policy.InvalidLoginAttemptCount + 1); } _logger.Info("Authentication request for {0} {1}.", user.Name, success ? "has succeeded" : "has been denied"); @@ -307,7 +307,7 @@ namespace Emby.Server.Implementations.Library return success ? user : null; } - private async Task UpdateInvalidLoginAttemptCount(User user, int newValue) + private void UpdateInvalidLoginAttemptCount(User user, int newValue) { if (user.Policy.InvalidLoginAttemptCount != newValue || newValue > 0) { @@ -327,7 +327,7 @@ namespace Emby.Server.Implementations.Library //fireLockout = true; } - await UpdateUserPolicy(user, user.Policy, false).ConfigureAwait(false); + UpdateUserPolicy(user, user.Policy, false); if (fireLockout) { @@ -372,7 +372,7 @@ namespace Emby.Server.Implementations.Library /// Loads the users from the repository /// /// IEnumerable{User}. - private async Task> LoadUsers() + private List LoadUsers() { var users = UserRepository.RetrieveAllUsers().ToList(); @@ -385,14 +385,14 @@ namespace Emby.Server.Implementations.Library user.DateLastSaved = DateTime.UtcNow; - await UserRepository.SaveUser(user, CancellationToken.None).ConfigureAwait(false); + UserRepository.SaveUser(user, CancellationToken.None); users.Add(user); user.Policy.IsAdministrator = true; user.Policy.EnableContentDeletion = true; user.Policy.EnableRemoteControlOfOtherUsers = true; - await UpdateUserPolicy(user, user.Policy, false).ConfigureAwait(false); + UpdateUserPolicy(user, user.Policy, false); } return users; @@ -539,7 +539,7 @@ namespace Emby.Server.Implementations.Library /// The user. /// user /// - public async Task UpdateUser(User user) + public void UpdateUser(User user) { if (user == null) { @@ -554,7 +554,7 @@ namespace Emby.Server.Implementations.Library user.DateModified = DateTime.UtcNow; user.DateLastSaved = DateTime.UtcNow; - await UserRepository.SaveUser(user, CancellationToken.None).ConfigureAwait(false); + UserRepository.SaveUser(user, CancellationToken.None); OnUserUpdated(user); } @@ -599,7 +599,7 @@ namespace Emby.Server.Implementations.Library user.DateLastSaved = DateTime.UtcNow; - await UserRepository.SaveUser(user, CancellationToken.None).ConfigureAwait(false); + UserRepository.SaveUser(user, CancellationToken.None); EventHelper.QueueEventIfNotNull(UserCreated, this, new GenericEventArgs { Argument = user }, _logger); @@ -653,7 +653,7 @@ namespace Emby.Server.Implementations.Library { var configPath = GetConfigurationFilePath(user); - await UserRepository.DeleteUser(user, CancellationToken.None).ConfigureAwait(false); + UserRepository.DeleteUser(user, CancellationToken.None); try { @@ -667,7 +667,7 @@ namespace Emby.Server.Implementations.Library DeleteUserPolicy(user); // Force this to be lazy loaded again - Users = await LoadUsers().ConfigureAwait(false); + Users = LoadUsers(); OnUserDeleted(user); } @@ -681,17 +681,17 @@ namespace Emby.Server.Implementations.Library /// Resets the password by clearing it. /// /// Task. - public Task ResetPassword(User user) + public void ResetPassword(User user) { - return ChangePassword(user, GetSha1String(string.Empty)); + ChangePassword(user, GetSha1String(string.Empty)); } - public Task ResetEasyPassword(User user) + public void ResetEasyPassword(User user) { - return ChangeEasyPassword(user, GetSha1String(string.Empty)); + ChangeEasyPassword(user, GetSha1String(string.Empty)); } - public async Task ChangePassword(User user, string newPasswordSha1) + public void ChangePassword(User user, string newPasswordSha1) { if (user == null) { @@ -709,12 +709,12 @@ namespace Emby.Server.Implementations.Library user.Password = newPasswordSha1; - await UpdateUser(user).ConfigureAwait(false); + UpdateUser(user); EventHelper.FireEventIfNotNull(UserPasswordChanged, this, new GenericEventArgs(user), _logger); } - public async Task ChangeEasyPassword(User user, string newPasswordSha1) + public void ChangeEasyPassword(User user, string newPasswordSha1) { if (user == null) { @@ -727,7 +727,7 @@ namespace Emby.Server.Implementations.Library user.EasyPassword = newPasswordSha1; - await UpdateUser(user).ConfigureAwait(false); + UpdateUser(user); EventHelper.FireEventIfNotNull(UserPasswordChanged, this, new GenericEventArgs(user), _logger); } @@ -842,7 +842,7 @@ namespace Emby.Server.Implementations.Library }; } - public async Task RedeemPasswordResetPin(string pin) + public PinRedeemResult RedeemPasswordResetPin(string pin) { DeletePinFile(); @@ -863,12 +863,12 @@ namespace Emby.Server.Implementations.Library foreach (var user in users) { - await ResetPassword(user).ConfigureAwait(false); + ResetPassword(user); if (user.Policy.IsDisabled) { user.Policy.IsDisabled = false; - await UpdateUserPolicy(user, user.Policy, true).ConfigureAwait(false); + UpdateUserPolicy(user, user.Policy, true); } usersReset.Add(user.Name); } @@ -945,13 +945,13 @@ namespace Emby.Server.Implementations.Library } private readonly object _policySyncLock = new object(); - public Task UpdateUserPolicy(string userId, UserPolicy userPolicy) + public void UpdateUserPolicy(string userId, UserPolicy userPolicy) { var user = GetUserById(userId); - return UpdateUserPolicy(user, userPolicy, true); + UpdateUserPolicy(user, userPolicy, true); } - private async Task UpdateUserPolicy(User user, UserPolicy userPolicy, bool fireEvent) + private void UpdateUserPolicy(User user, UserPolicy userPolicy, bool fireEvent) { // The xml serializer will output differently if the type is not exact if (userPolicy.GetType() != typeof(UserPolicy)) @@ -970,7 +970,7 @@ namespace Emby.Server.Implementations.Library user.Policy = userPolicy; } - await UpdateConfiguration(user, user.Configuration, true).ConfigureAwait(false); + UpdateConfiguration(user, user.Configuration, true); } private void DeleteUserPolicy(User user) @@ -1032,13 +1032,13 @@ namespace Emby.Server.Implementations.Library } private readonly object _configSyncLock = new object(); - public Task UpdateConfiguration(string userId, UserConfiguration config) + public void UpdateConfiguration(string userId, UserConfiguration config) { var user = GetUserById(userId); - return UpdateConfiguration(user, config, true); + UpdateConfiguration(user, config, true); } - private async Task UpdateConfiguration(User user, UserConfiguration config, bool fireEvent) + private void UpdateConfiguration(User user, UserConfiguration config, bool fireEvent) { var path = GetConfigurationFilePath(user); diff --git a/Emby.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.cs index 25c3e10e89..b02c114bb6 100644 --- a/Emby.Server.Implementations/Library/UserViewManager.cs +++ b/Emby.Server.Implementations/Library/UserViewManager.cs @@ -68,7 +68,7 @@ namespace Emby.Server.Implementations.Library if (UserView.IsUserSpecific(folder)) { - list.Add(await _libraryManager.GetNamedView(user, folder.Name, folder.Id.ToString("N"), folderViewType, null, cancellationToken).ConfigureAwait(false)); + list.Add(_libraryManager.GetNamedView(user, folder.Name, folder.Id.ToString("N"), folderViewType, null, cancellationToken)); continue; } @@ -80,7 +80,7 @@ namespace Emby.Server.Implementations.Library if (query.PresetViews.Contains(folderViewType ?? string.Empty, StringComparer.OrdinalIgnoreCase)) { - list.Add(await GetUserView(folder, folderViewType, string.Empty, cancellationToken).ConfigureAwait(false)); + list.Add(GetUserView(folder, folderViewType, string.Empty, cancellationToken)); } else { @@ -95,7 +95,7 @@ namespace Emby.Server.Implementations.Library if (parents.Count > 0) { - list.Add(await GetUserView(parents, viewType, string.Empty, user, query.PresetViews, cancellationToken).ConfigureAwait(false)); + list.Add(GetUserView(parents, viewType, string.Empty, user, query.PresetViews, cancellationToken)); } } @@ -114,7 +114,7 @@ namespace Emby.Server.Implementations.Library }, cancellationToken).ConfigureAwait(false); var channels = channelResult.Items; - + if (_config.Configuration.EnableChannelView && channels.Length > 0) { list.Add(await _channelManager.GetInternalChannelFolder(cancellationToken).ConfigureAwait(false)); @@ -172,7 +172,7 @@ namespace Emby.Server.Implementations.Library return GetUserSubView(name, parentId, type, sortName, cancellationToken); } - private async Task GetUserView(List parents, string viewType, string sortName, User user, string[] presetViews, CancellationToken cancellationToken) + private Folder GetUserView(List parents, string viewType, string sortName, User user, string[] presetViews, CancellationToken cancellationToken) { if (parents.Count == 1 && parents.All(i => string.Equals(i.CollectionType, viewType, StringComparison.OrdinalIgnoreCase))) { @@ -181,14 +181,14 @@ namespace Emby.Server.Implementations.Library return (Folder)parents[0]; } - return await GetUserView((Folder)parents[0], viewType, string.Empty, cancellationToken).ConfigureAwait(false); + return GetUserView((Folder)parents[0], viewType, string.Empty, cancellationToken); } var name = _localizationManager.GetLocalizedString("ViewType" + viewType); - return await _libraryManager.GetNamedView(user, name, viewType, sortName, cancellationToken).ConfigureAwait(false); + return _libraryManager.GetNamedView(user, name, viewType, sortName, cancellationToken); } - public Task GetUserView(Folder parent, string viewType, string sortName, CancellationToken cancellationToken) + public UserView GetUserView(Folder parent, string viewType, string sortName, CancellationToken cancellationToken) { return _libraryManager.GetShadowView(parent, viewType, sortName, cancellationToken); } diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs index bf30546aba..ac98d1043a 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs @@ -558,7 +558,7 @@ namespace Emby.Server.Implementations.LiveTv if (isNew) { - await _libraryManager.CreateItem(item, cancellationToken).ConfigureAwait(false); + _libraryManager.CreateItem(item, cancellationToken); } else if (forceUpdate) { @@ -875,7 +875,7 @@ namespace Emby.Server.Implementations.LiveTv if (isNew) { - await _libraryManager.CreateItem(item, cancellationToken).ConfigureAwait(false); + _libraryManager.CreateItem(item, cancellationToken); } else if (dataChanged || info.DateLastUpdated > recording.DateLastSaved || statusChanged) { @@ -1410,7 +1410,7 @@ namespace Emby.Server.Implementations.LiveTv if (newPrograms.Count > 0) { - await _libraryManager.CreateItems(newPrograms, cancellationToken).ConfigureAwait(false); + _libraryManager.CreateItems(newPrograms, cancellationToken); } // TODO: Do this in bulk diff --git a/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs index d8bf363f26..9a9e619a62 100644 --- a/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs +++ b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs @@ -179,7 +179,7 @@ namespace Emby.Server.Implementations.MediaEncoder if (saveChapters && changesMade) { - await _chapterManager.SaveChapters(video.Id.ToString(), chapters).ConfigureAwait(false); + _chapterManager.SaveChapters(video.Id.ToString(), chapters); } DeleteDeadImages(currentImages, chapters); diff --git a/Emby.Server.Implementations/Playlists/PlaylistManager.cs b/Emby.Server.Implementations/Playlists/PlaylistManager.cs index 9b9596934a..87832e7dda 100644 --- a/Emby.Server.Implementations/Playlists/PlaylistManager.cs +++ b/Emby.Server.Implementations/Playlists/PlaylistManager.cs @@ -128,7 +128,7 @@ namespace Emby.Server.Implementations.Playlists playlist.SetMediaType(options.MediaType); - await parentFolder.AddChild(playlist, CancellationToken.None).ConfigureAwait(false); + parentFolder.AddChild(playlist, CancellationToken.None); await playlist.RefreshMetadata(new MetadataRefreshOptions(_fileSystem) { ForceSave = true }, CancellationToken.None) .ConfigureAwait(false); diff --git a/Emby.Server.Implementations/Security/AuthenticationRepository.cs b/Emby.Server.Implementations/Security/AuthenticationRepository.cs index d512ff4fb9..f5b847ccf9 100644 --- a/Emby.Server.Implementations/Security/AuthenticationRepository.cs +++ b/Emby.Server.Implementations/Security/AuthenticationRepository.cs @@ -4,7 +4,6 @@ using System.Globalization; using System.IO; using System.Linq; using System.Threading; -using System.Threading.Tasks; using Emby.Server.Implementations.Data; using MediaBrowser.Controller; using MediaBrowser.Controller.Security; @@ -51,14 +50,14 @@ namespace Emby.Server.Implementations.Security } } - public Task Create(AuthenticationInfo info, CancellationToken cancellationToken) + public void Create(AuthenticationInfo info, CancellationToken cancellationToken) { info.Id = Guid.NewGuid().ToString("N"); - return Update(info, cancellationToken); + Update(info, cancellationToken); } - public async Task Update(AuthenticationInfo info, CancellationToken cancellationToken) + public void Update(AuthenticationInfo info, CancellationToken cancellationToken) { if (info == null) { diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index ee373139f4..0692a0ba58 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -6,11 +6,8 @@ using MediaBrowser.Controller.Devices; using MediaBrowser.Controller.Drawing; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.LiveTv; -using MediaBrowser.Controller.Persistence; using MediaBrowser.Controller.Security; using MediaBrowser.Controller.Session; using MediaBrowser.Model.Devices; @@ -253,7 +250,7 @@ namespace Emby.Server.Implementations.Session { try { - await _userManager.UpdateUser(user).ConfigureAwait(false); + _userManager.UpdateUser(user); } catch (Exception ex) { @@ -622,7 +619,7 @@ namespace Emby.Server.Implementations.Session { foreach (var user in users) { - await OnPlaybackStart(user.Id, libraryItem).ConfigureAwait(false); + OnPlaybackStart(user.Id, libraryItem); } } @@ -650,8 +647,7 @@ namespace Emby.Server.Implementations.Session /// /// The user identifier. /// The item. - /// Task. - private async Task OnPlaybackStart(Guid userId, IHasUserData item) + private void OnPlaybackStart(Guid userId, IHasUserData item) { var data = _userDataManager.GetUserData(userId, item); @@ -670,7 +666,7 @@ namespace Emby.Server.Implementations.Session data.Played = false; } - await _userDataManager.SaveUserData(userId, item, data, UserDataSaveReason.PlaybackStart, CancellationToken.None).ConfigureAwait(false); + _userDataManager.SaveUserData(userId, item, data, UserDataSaveReason.PlaybackStart, CancellationToken.None); } public Task OnPlaybackProgress(PlaybackProgressInfo info) @@ -702,7 +698,7 @@ namespace Emby.Server.Implementations.Session { foreach (var user in users) { - await OnPlaybackProgress(user, libraryItem, info).ConfigureAwait(false); + OnPlaybackProgress(user, libraryItem, info); } } @@ -730,7 +726,7 @@ namespace Emby.Server.Implementations.Session StartIdleCheckTimer(); } - private async Task OnPlaybackProgress(User user, BaseItem item, PlaybackProgressInfo info) + private void OnPlaybackProgress(User user, BaseItem item, PlaybackProgressInfo info) { var data = _userDataManager.GetUserData(user.Id, item); @@ -742,7 +738,7 @@ namespace Emby.Server.Implementations.Session UpdatePlaybackSettings(user, info, data); - await _userDataManager.SaveUserData(user.Id, item, data, UserDataSaveReason.PlaybackProgress, CancellationToken.None).ConfigureAwait(false); + _userDataManager.SaveUserData(user.Id, item, data, UserDataSaveReason.PlaybackProgress, CancellationToken.None); } } @@ -842,7 +838,7 @@ namespace Emby.Server.Implementations.Session { foreach (var user in users) { - playedToCompletion = await OnPlaybackStopped(user.Id, libraryItem, info.PositionTicks, info.Failed).ConfigureAwait(false); + playedToCompletion = OnPlaybackStopped(user.Id, libraryItem, info.PositionTicks, info.Failed); } } @@ -875,7 +871,7 @@ namespace Emby.Server.Implementations.Session await SendPlaybackStoppedNotification(session, CancellationToken.None).ConfigureAwait(false); } - private async Task OnPlaybackStopped(Guid userId, BaseItem item, long? positionTicks, bool playbackFailed) + private bool OnPlaybackStopped(Guid userId, BaseItem item, long? positionTicks, bool playbackFailed) { bool playedToCompletion = false; @@ -896,7 +892,7 @@ namespace Emby.Server.Implementations.Session playedToCompletion = true; } - await _userDataManager.SaveUserData(userId, item, data, UserDataSaveReason.PlaybackFinished, CancellationToken.None).ConfigureAwait(false); + _userDataManager.SaveUserData(userId, item, data, UserDataSaveReason.PlaybackFinished, CancellationToken.None); } return playedToCompletion; @@ -1432,7 +1428,7 @@ namespace Emby.Server.Implementations.Session user = result; } - var token = await GetAuthorizationToken(user.Id.ToString("N"), request.DeviceId, request.App, request.AppVersion, request.DeviceName).ConfigureAwait(false); + var token = GetAuthorizationToken(user.Id.ToString("N"), request.DeviceId, request.App, request.AppVersion, request.DeviceName); EventHelper.FireEventIfNotNull(AuthenticationSucceeded, this, new GenericEventArgs(request), _logger); @@ -1454,7 +1450,7 @@ namespace Emby.Server.Implementations.Session } - private async Task GetAuthorizationToken(string userId, string deviceId, string app, string appVersion, string deviceName) + private string GetAuthorizationToken(string userId, string deviceId, string app, string appVersion, string deviceName) { var existing = _authRepo.Get(new AuthenticationInfoQuery { @@ -1484,12 +1480,12 @@ namespace Emby.Server.Implementations.Session }; _logger.Info("Creating new access token for user {0}", userId); - await _authRepo.Create(newToken, CancellationToken.None).ConfigureAwait(false); + _authRepo.Create(newToken, CancellationToken.None); return newToken.AccessToken; } - public async Task Logout(string accessToken) + public void Logout(string accessToken) { if (string.IsNullOrWhiteSpace(accessToken)) { @@ -1509,7 +1505,7 @@ namespace Emby.Server.Implementations.Session { existing.IsActive = false; - await _authRepo.Update(existing, CancellationToken.None).ConfigureAwait(false); + _authRepo.Update(existing, CancellationToken.None); var sessions = Sessions .Where(i => string.Equals(i.DeviceId, existing.DeviceId, StringComparison.OrdinalIgnoreCase)) @@ -1529,7 +1525,7 @@ namespace Emby.Server.Implementations.Session } } - public async Task RevokeUserTokens(string userId, string currentAccessToken) + public void RevokeUserTokens(string userId, string currentAccessToken) { var existing = _authRepo.Get(new AuthenticationInfoQuery { @@ -1541,14 +1537,14 @@ namespace Emby.Server.Implementations.Session { if (!string.Equals(currentAccessToken, info.AccessToken, StringComparison.OrdinalIgnoreCase)) { - await Logout(info.AccessToken).ConfigureAwait(false); + Logout(info.AccessToken); } } } - public Task RevokeToken(string token) + public void RevokeToken(string token) { - return Logout(token); + Logout(token); } /// diff --git a/Emby.Server.Implementations/Social/SharingManager.cs b/Emby.Server.Implementations/Social/SharingManager.cs index 54614c8797..57cf93948d 100644 --- a/Emby.Server.Implementations/Social/SharingManager.cs +++ b/Emby.Server.Implementations/Social/SharingManager.cs @@ -58,8 +58,8 @@ namespace Emby.Server.Implementations.Social }; AddShareInfo(info, externalUrl); - - await _repository.CreateShare(info).ConfigureAwait(false); + + _repository.CreateShare(info); return info; } @@ -92,9 +92,9 @@ namespace Emby.Server.Implementations.Social } } - public Task DeleteShare(string id) + public void DeleteShare(string id) { - return _repository.DeleteShare(id); + _repository.DeleteShare(id); } } } diff --git a/Emby.Server.Implementations/Social/SharingRepository.cs b/Emby.Server.Implementations/Social/SharingRepository.cs index a2a1f879a2..f306e76c49 100644 --- a/Emby.Server.Implementations/Social/SharingRepository.cs +++ b/Emby.Server.Implementations/Social/SharingRepository.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; using System.IO; -using System.Threading; -using System.Threading.Tasks; using Emby.Server.Implementations.Data; using MediaBrowser.Common.Configuration; using MediaBrowser.Model.Logging; @@ -42,7 +40,7 @@ namespace Emby.Server.Implementations.Social } } - public async Task CreateShare(SocialShareInfo info) + public void CreateShare(SocialShareInfo info) { if (info == null) { @@ -109,7 +107,7 @@ namespace Emby.Server.Implementations.Social return info; } - public async Task DeleteShare(string id) + public void DeleteShare(string id) { } diff --git a/MediaBrowser.Api/DisplayPreferencesService.cs b/MediaBrowser.Api/DisplayPreferencesService.cs index 5a21fc9f46..4f8cc52558 100644 --- a/MediaBrowser.Api/DisplayPreferencesService.cs +++ b/MediaBrowser.Api/DisplayPreferencesService.cs @@ -88,9 +88,7 @@ namespace MediaBrowser.Api // Serialize to json and then back so that the core doesn't see the request dto type var displayPreferences = _jsonSerializer.DeserializeFromString(_jsonSerializer.SerializeToString(request)); - var task = _displayPreferencesManager.SaveDisplayPreferences(displayPreferences, request.UserId, request.Client, CancellationToken.None); - - Task.WaitAll(task); + _displayPreferencesManager.SaveDisplayPreferences(displayPreferences, request.UserId, request.Client, CancellationToken.None); } } } diff --git a/MediaBrowser.Api/ItemUpdateService.cs b/MediaBrowser.Api/ItemUpdateService.cs index 47bd46ea5d..9e83cf680f 100644 --- a/MediaBrowser.Api/ItemUpdateService.cs +++ b/MediaBrowser.Api/ItemUpdateService.cs @@ -209,7 +209,7 @@ namespace MediaBrowser.Api // Do this first so that metadata savers can pull the updates from the database. if (request.People != null) { - await _libraryManager.UpdatePeople(item, request.People.Select(x => new PersonInfo { Name = x.Name, Role = x.Role, Type = x.Type }).ToList()); + _libraryManager.UpdatePeople(item, request.People.Select(x => new PersonInfo { Name = x.Name, Role = x.Role, Type = x.Type }).ToList()); } UpdateItem(request, item); diff --git a/MediaBrowser.Api/Library/LibraryService.cs b/MediaBrowser.Api/Library/LibraryService.cs index 6c9f5d32bb..44cc60b504 100644 --- a/MediaBrowser.Api/Library/LibraryService.cs +++ b/MediaBrowser.Api/Library/LibraryService.cs @@ -525,18 +525,18 @@ namespace MediaBrowser.Api.Library }); } - private async void LogDownload(BaseItem item, User user, AuthorizationInfo auth) + private void LogDownload(BaseItem item, User user, AuthorizationInfo auth) { try { - await _activityManager.Create(new ActivityLogEntry + _activityManager.Create(new ActivityLogEntry { Name = string.Format(_localization.GetLocalizedString("UserDownloadingItemWithValues"), user.Name, item.Name), Type = "UserDownloadingContent", ShortOverview = string.Format(_localization.GetLocalizedString("AppDeviceValues"), auth.Client, auth.Device), UserId = auth.UserId - }).ConfigureAwait(false); + }); } catch { @@ -915,7 +915,7 @@ namespace MediaBrowser.Api.Library : request.IncludeItemTypes.Split(','); var user = !string.IsNullOrWhiteSpace(request.UserId) ? _userManager.GetUserById(request.UserId) : null; - + var query = new InternalItemsQuery(user) { IncludeItemTypes = includeTypes, diff --git a/MediaBrowser.Api/Session/SessionsService.cs b/MediaBrowser.Api/Session/SessionsService.cs index 18d2611952..8f54b591e7 100644 --- a/MediaBrowser.Api/Session/SessionsService.cs +++ b/MediaBrowser.Api/Session/SessionsService.cs @@ -313,14 +313,13 @@ namespace MediaBrowser.Api.Session public void Delete(RevokeKey request) { - var task = _sessionManager.RevokeToken(request.Key); + _sessionManager.RevokeToken(request.Key); - Task.WaitAll(task); } public void Post(CreateKey request) { - var task = _authRepo.Create(new AuthenticationInfo + _authRepo.Create(new AuthenticationInfo { AppName = request.App, IsActive = true, @@ -328,8 +327,6 @@ namespace MediaBrowser.Api.Session DateCreated = DateTime.UtcNow }, CancellationToken.None); - - Task.WaitAll(task); } public void Post(ReportSessionEnded request) diff --git a/MediaBrowser.Api/Social/SharingService.cs b/MediaBrowser.Api/Social/SharingService.cs index 37941bd4a3..4f10667b72 100644 --- a/MediaBrowser.Api/Social/SharingService.cs +++ b/MediaBrowser.Api/Social/SharingService.cs @@ -121,8 +121,7 @@ namespace MediaBrowser.Api.Social public void Delete(DeleteShare request) { - var task = _sharingManager.DeleteShare(request.Id); - Task.WaitAll(task); + _sharingManager.DeleteShare(request.Id); } public async Task Get(GetShareImage request) @@ -157,7 +156,7 @@ namespace MediaBrowser.Api.Social } catch { - + } } diff --git a/MediaBrowser.Api/StartupWizardService.cs b/MediaBrowser.Api/StartupWizardService.cs index 7d612a796c..7a75aeb4be 100644 --- a/MediaBrowser.Api/StartupWizardService.cs +++ b/MediaBrowser.Api/StartupWizardService.cs @@ -125,7 +125,7 @@ namespace MediaBrowser.Api var user = _userManager.Users.First(); user.Name = request.Name; - await _userManager.UpdateUser(user).ConfigureAwait(false); + _userManager.UpdateUser(user); var result = new UpdateStartupUserResult(); diff --git a/MediaBrowser.Api/UserLibrary/UserLibraryService.cs b/MediaBrowser.Api/UserLibrary/UserLibraryService.cs index 87a06e4d59..1bbc740c01 100644 --- a/MediaBrowser.Api/UserLibrary/UserLibraryService.cs +++ b/MediaBrowser.Api/UserLibrary/UserLibraryService.cs @@ -12,11 +12,9 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Entities.Audio; -using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Services; -using MediaBrowser.Model.Extensions; namespace MediaBrowser.Api.UserLibrary { @@ -507,9 +505,9 @@ namespace MediaBrowser.Api.UserLibrary /// Posts the specified request. /// /// The request. - public async Task Post(MarkFavoriteItem request) + public object Post(MarkFavoriteItem request) { - var dto = await MarkFavorite(request.UserId, request.Id, true).ConfigureAwait(false); + var dto = MarkFavorite(request.UserId, request.Id, true); return ToOptimizedResult(dto); } @@ -520,7 +518,7 @@ namespace MediaBrowser.Api.UserLibrary /// The request. public object Delete(UnmarkFavoriteItem request) { - var dto = MarkFavorite(request.UserId, request.Id, false).Result; + var dto = MarkFavorite(request.UserId, request.Id, false); return ToOptimizedResult(dto); } @@ -531,8 +529,7 @@ namespace MediaBrowser.Api.UserLibrary /// The user id. /// The item id. /// if set to true [is favorite]. - /// Task{UserItemDataDto}. - private async Task MarkFavorite(string userId, string itemId, bool isFavorite) + private UserItemDataDto MarkFavorite(string userId, string itemId, bool isFavorite) { var user = _userManager.GetUserById(userId); @@ -544,7 +541,7 @@ namespace MediaBrowser.Api.UserLibrary // Set favorite status data.IsFavorite = isFavorite; - await _userDataRepository.SaveUserData(user.Id, item, data, UserDataSaveReason.UpdateUserRating, CancellationToken.None).ConfigureAwait(false); + _userDataRepository.SaveUserData(user.Id, item, data, UserDataSaveReason.UpdateUserRating, CancellationToken.None); return _userDataRepository.GetUserDataDto(item, user); } @@ -555,7 +552,7 @@ namespace MediaBrowser.Api.UserLibrary /// The request. public object Delete(DeleteUserItemRating request) { - var dto = UpdateUserItemRating(request.UserId, request.Id, null).Result; + var dto = UpdateUserItemRating(request.UserId, request.Id, null); return ToOptimizedResult(dto); } @@ -564,9 +561,9 @@ namespace MediaBrowser.Api.UserLibrary /// Posts the specified request. /// /// The request. - public async Task Post(UpdateUserItemRating request) + public object Post(UpdateUserItemRating request) { - var dto = await UpdateUserItemRating(request.UserId, request.Id, request.Likes).ConfigureAwait(false); + var dto = UpdateUserItemRating(request.UserId, request.Id, request.Likes); return ToOptimizedResult(dto); } @@ -577,8 +574,7 @@ namespace MediaBrowser.Api.UserLibrary /// The user id. /// The item id. /// if set to true [likes]. - /// Task{UserItemDataDto}. - private async Task UpdateUserItemRating(string userId, string itemId, bool? likes) + private UserItemDataDto UpdateUserItemRating(string userId, string itemId, bool? likes) { var user = _userManager.GetUserById(userId); @@ -589,7 +585,7 @@ namespace MediaBrowser.Api.UserLibrary data.Likes = likes; - await _userDataRepository.SaveUserData(user.Id, item, data, UserDataSaveReason.UpdateUserRating, CancellationToken.None).ConfigureAwait(false); + _userDataRepository.SaveUserData(user.Id, item, data, UserDataSaveReason.UpdateUserRating, CancellationToken.None); return _userDataRepository.GetUserDataDto(item, user); } diff --git a/MediaBrowser.Api/UserService.cs b/MediaBrowser.Api/UserService.cs index acdbf96f42..512356b43a 100644 --- a/MediaBrowser.Api/UserService.cs +++ b/MediaBrowser.Api/UserService.cs @@ -387,7 +387,7 @@ namespace MediaBrowser.Api throw new ResourceNotFoundException("User not found"); } - await _sessionMananger.RevokeUserTokens(user.Id.ToString("N"), null).ConfigureAwait(false); + _sessionMananger.RevokeUserTokens(user.Id.ToString("N"), null); await _userManager.DeleteUser(user).ConfigureAwait(false); } @@ -455,7 +455,7 @@ namespace MediaBrowser.Api if (request.ResetPassword) { - await _userManager.ResetPassword(user).ConfigureAwait(false); + _userManager.ResetPassword(user); } else { @@ -466,24 +466,18 @@ namespace MediaBrowser.Api throw new ArgumentException("Invalid user or password entered."); } - await _userManager.ChangePassword(user, request.NewPassword).ConfigureAwait(false); + _userManager.ChangePassword(user, request.NewPassword); var currentToken = _authContext.GetAuthorizationInfo(Request).Token; - await _sessionMananger.RevokeUserTokens(user.Id.ToString("N"), currentToken).ConfigureAwait(false); + _sessionMananger.RevokeUserTokens(user.Id.ToString("N"), currentToken); } } public void Post(UpdateUserEasyPassword request) - { - var task = PostAsync(request); - Task.WaitAll(task); - } - - public async Task PostAsync(UpdateUserEasyPassword request) { AssertCanUpdateUser(_authContext, _userManager, request.Id, true); - + var user = _userManager.GetUserById(request.Id); if (user == null) @@ -493,11 +487,11 @@ namespace MediaBrowser.Api if (request.ResetPassword) { - await _userManager.ResetEasyPassword(user).ConfigureAwait(false); + _userManager.ResetEasyPassword(user); } else { - await _userManager.ChangeEasyPassword(user, request.NewPassword).ConfigureAwait(false); + _userManager.ChangeEasyPassword(user, request.NewPassword); } } @@ -506,13 +500,6 @@ namespace MediaBrowser.Api /// /// The request. public void Post(UpdateUser request) - { - var task = PostAsync(request); - - Task.WaitAll(task); - } - - public async Task PostAsync(UpdateUser request) { // We need to parse this manually because we told service stack not to with IRequiresRequestStream // https://code.google.com/p/servicestack/source/browse/trunk/Common/ServiceStack.Text/ServiceStack.Text/Controller/PathInfo.cs @@ -524,13 +511,18 @@ namespace MediaBrowser.Api var user = _userManager.GetUserById(id); - var task = string.Equals(user.Name, dtoUser.Name, StringComparison.Ordinal) ? - _userManager.UpdateUser(user) : - _userManager.RenameUser(user, dtoUser.Name); + if (string.Equals(user.Name, dtoUser.Name, StringComparison.Ordinal)) + { + _userManager.UpdateUser(user); + } + else + { + var task = _userManager.RenameUser(user, dtoUser.Name); - await task.ConfigureAwait(false); + Task.WaitAll(task); + } - await _userManager.UpdateConfiguration(dtoUser.Id, dtoUser.Configuration); + _userManager.UpdateConfiguration(dtoUser.Id, dtoUser.Configuration); } /// @@ -570,21 +562,14 @@ namespace MediaBrowser.Api { AssertCanUpdateUser(_authContext, _userManager, request.Id, false); - var task = _userManager.UpdateConfiguration(request.Id, request); + _userManager.UpdateConfiguration(request.Id, request); - Task.WaitAll(task); } public void Post(UpdateUserPolicy request) - { - var task = UpdateUserPolicy(request); - Task.WaitAll(task); - } - - private async Task UpdateUserPolicy(UpdateUserPolicy request) { var user = _userManager.GetUserById(request.Id); - + // If removing admin access if (!request.IsAdministrator && user.Policy.IsAdministrator) { @@ -609,10 +594,10 @@ namespace MediaBrowser.Api } var currentToken = _authContext.GetAuthorizationInfo(Request).Token; - await _sessionMananger.RevokeUserTokens(user.Id.ToString("N"), currentToken).ConfigureAwait(false); + _sessionMananger.RevokeUserTokens(user.Id.ToString("N"), currentToken); } - await _userManager.UpdateUserPolicy(request.Id, request).ConfigureAwait(false); + _userManager.UpdateUserPolicy(request.Id, request); } } } diff --git a/MediaBrowser.Controller/Chapters/IChapterManager.cs b/MediaBrowser.Controller/Chapters/IChapterManager.cs index 85feec40b7..d1c190ab54 100644 --- a/MediaBrowser.Controller/Chapters/IChapterManager.cs +++ b/MediaBrowser.Controller/Chapters/IChapterManager.cs @@ -14,11 +14,11 @@ namespace MediaBrowser.Controller.Chapters /// /// The item identifier. /// List{ChapterInfo}. - IEnumerable GetChapters(string itemId); + List GetChapters(string itemId); /// /// Saves the chapters. /// - Task SaveChapters(string itemId, List chapters); + void SaveChapters(string itemId, List chapters); } } diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 51dc59c19e..513b85d8b1 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -1771,7 +1771,7 @@ namespace MediaBrowser.Controller.Entities /// if set to true [reset position]. /// Task. /// - public virtual async Task MarkPlayed(User user, + public virtual void MarkPlayed(User user, DateTime? datePlayed, bool resetPosition) { @@ -1799,7 +1799,7 @@ namespace MediaBrowser.Controller.Entities data.LastPlayedDate = datePlayed ?? data.LastPlayedDate ?? DateTime.UtcNow; data.Played = true; - await UserDataManager.SaveUserData(user.Id, this, data, UserDataSaveReason.TogglePlayed, CancellationToken.None).ConfigureAwait(false); + UserDataManager.SaveUserData(user.Id, this, data, UserDataSaveReason.TogglePlayed, CancellationToken.None); } /// @@ -1808,7 +1808,7 @@ namespace MediaBrowser.Controller.Entities /// The user. /// Task. /// - public virtual async Task MarkUnplayed(User user) + public virtual void MarkUnplayed(User user) { if (user == null) { @@ -1825,7 +1825,7 @@ namespace MediaBrowser.Controller.Entities data.LastPlayedDate = null; data.Played = false; - await UserDataManager.SaveUserData(user.Id, this, data, UserDataSaveReason.TogglePlayed, CancellationToken.None).ConfigureAwait(false); + UserDataManager.SaveUserData(user.Id, this, data, UserDataSaveReason.TogglePlayed, CancellationToken.None); } /// diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index 11c0a57473..8a87f3c6a5 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -186,7 +186,7 @@ namespace MediaBrowser.Controller.Entities /// The cancellation token. /// Task. /// Unable to add + item.Name - public async Task AddChild(BaseItem item, CancellationToken cancellationToken) + public void AddChild(BaseItem item, CancellationToken cancellationToken) { item.SetParent(this); @@ -209,7 +209,7 @@ namespace MediaBrowser.Controller.Entities item.DateModified = DateTime.UtcNow; } - await LibraryManager.CreateItem(item, cancellationToken).ConfigureAwait(false); + LibraryManager.CreateItem(item, cancellationToken); } /// @@ -469,7 +469,7 @@ namespace MediaBrowser.Controller.Entities } } - await LibraryManager.CreateItems(newItems, cancellationToken).ConfigureAwait(false); + LibraryManager.CreateItems(newItems, cancellationToken); } } else @@ -1370,7 +1370,7 @@ namespace MediaBrowser.Controller.Entities /// The date played. /// if set to true [reset position]. /// Task. - public override async Task MarkPlayed(User user, + public override void MarkPlayed(User user, DateTime? datePlayed, bool resetPosition) { @@ -1390,9 +1390,10 @@ namespace MediaBrowser.Controller.Entities var itemsResult = GetItemList(query); // Sweep through recursively and update status - var tasks = itemsResult.Select(c => c.MarkPlayed(user, datePlayed, resetPosition)); - - await Task.WhenAll(tasks).ConfigureAwait(false); + foreach (var item in itemsResult) + { + item.MarkPlayed(user, datePlayed, resetPosition); + } } /// @@ -1400,7 +1401,7 @@ namespace MediaBrowser.Controller.Entities /// /// The user. /// Task. - public override async Task MarkUnplayed(User user) + public override void MarkUnplayed(User user) { var itemsResult = GetItemList(new InternalItemsQuery { @@ -1412,9 +1413,10 @@ namespace MediaBrowser.Controller.Entities }); // Sweep through recursively and update status - var tasks = itemsResult.Select(c => c.MarkUnplayed(user)); - - await Task.WhenAll(tasks).ConfigureAwait(false); + foreach (var item in itemsResult) + { + item.MarkUnplayed(user); + } } public override bool IsPlayed(User user) diff --git a/MediaBrowser.Controller/Entities/User.cs b/MediaBrowser.Controller/Entities/User.cs index 851686ea8e..3c89037cca 100644 --- a/MediaBrowser.Controller/Entities/User.cs +++ b/MediaBrowser.Controller/Entities/User.cs @@ -165,7 +165,7 @@ namespace MediaBrowser.Controller.Entities } } } - + return _policy; } set { _policy = value; } @@ -194,24 +194,24 @@ namespace MediaBrowser.Controller.Entities var oldConfigurationDirectory = ConfigurationDirectoryPath; // Exceptions will be thrown if these paths already exist - if (FileSystem.DirectoryExists(newConfigDirectory)) + if (FileSystem.DirectoryExists(newConfigDirectory)) { FileSystem.DeleteDirectory(newConfigDirectory, true); } - if (FileSystem.DirectoryExists(oldConfigurationDirectory)) + if (FileSystem.DirectoryExists(oldConfigurationDirectory)) { - FileSystem.MoveDirectory(oldConfigurationDirectory, newConfigDirectory); + FileSystem.MoveDirectory(oldConfigurationDirectory, newConfigDirectory); } else { - FileSystem.CreateDirectory(newConfigDirectory); + FileSystem.CreateDirectory(newConfigDirectory); } } Name = newName; - return RefreshMetadata(new MetadataRefreshOptions(new DirectoryService(Logger, FileSystem)) + return RefreshMetadata(new MetadataRefreshOptions(new DirectoryService(Logger, FileSystem)) { ReplaceAllMetadata = true, ImageRefreshMode = ImageRefreshMode.FullRefresh, @@ -223,7 +223,8 @@ namespace MediaBrowser.Controller.Entities public override Task UpdateToRepository(ItemUpdateType updateReason, CancellationToken cancellationToken) { - return UserManager.UpdateUser(this); + UserManager.UpdateUser(this); + return Task.FromResult(true); } /// diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs index cd1781220e..265d4d7865 100644 --- a/MediaBrowser.Controller/Library/ILibraryManager.cs +++ b/MediaBrowser.Controller/Library/ILibraryManager.cs @@ -195,16 +195,14 @@ namespace MediaBrowser.Controller.Library /// /// The item. /// The cancellation token. - /// Task. - Task CreateItem(BaseItem item, CancellationToken cancellationToken); + void CreateItem(BaseItem item, CancellationToken cancellationToken); /// /// Creates the items. /// /// The items. /// The cancellation token. - /// Task. - Task CreateItems(IEnumerable items, CancellationToken cancellationToken); + void CreateItems(IEnumerable items, CancellationToken cancellationToken); /// /// Updates the item. @@ -303,7 +301,7 @@ namespace MediaBrowser.Controller.Library /// Name of the sort. /// The cancellation token. /// Task<UserView>. - Task GetNamedView(User user, + UserView GetNamedView(User user, string name, string parentId, string viewType, @@ -319,7 +317,7 @@ namespace MediaBrowser.Controller.Library /// Name of the sort. /// The cancellation token. /// Task<UserView>. - Task GetNamedView(User user, + UserView GetNamedView(User user, string name, string viewType, string sortName, @@ -363,7 +361,7 @@ namespace MediaBrowser.Controller.Library /// Name of the sort. /// The cancellation token. /// Task<UserView>. - Task GetShadowView(BaseItem parent, + UserView GetShadowView(BaseItem parent, string viewType, string sortName, CancellationToken cancellationToken); @@ -471,8 +469,7 @@ namespace MediaBrowser.Controller.Library /// /// The item. /// The people. - /// Task. - Task UpdatePeople(BaseItem item, List people); + void UpdatePeople(BaseItem item, List people); /// /// Gets the item ids. diff --git a/MediaBrowser.Controller/Library/IUserDataManager.cs b/MediaBrowser.Controller/Library/IUserDataManager.cs index b364ab9909..cd4bd2e34e 100644 --- a/MediaBrowser.Controller/Library/IUserDataManager.cs +++ b/MediaBrowser.Controller/Library/IUserDataManager.cs @@ -4,7 +4,6 @@ using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using System; using System.Threading; -using System.Threading.Tasks; using MediaBrowser.Model.Querying; namespace MediaBrowser.Controller.Library @@ -28,7 +27,7 @@ namespace MediaBrowser.Controller.Library /// The reason. /// The cancellation token. /// Task. - Task SaveUserData(Guid userId, IHasUserData item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken); + void SaveUserData(Guid userId, IHasUserData item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken); UserItemData GetUserData(IHasUserData user, IHasUserData item); @@ -47,7 +46,7 @@ namespace MediaBrowser.Controller.Library /// /// /// - IEnumerable GetAllUserData(Guid userId); + List GetAllUserData(Guid userId); /// /// Save the all provided user data for the given user @@ -56,7 +55,7 @@ namespace MediaBrowser.Controller.Library /// /// /// - Task SaveAllUserData(Guid userId, IEnumerable userData, CancellationToken cancellationToken); + void SaveAllUserData(Guid userId, UserItemData[] userData, CancellationToken cancellationToken); /// /// Updates playstate for an item and returns true or false indicating if it was played to completion diff --git a/MediaBrowser.Controller/Library/IUserManager.cs b/MediaBrowser.Controller/Library/IUserManager.cs index ef68d2560c..6da3e53aab 100644 --- a/MediaBrowser.Controller/Library/IUserManager.cs +++ b/MediaBrowser.Controller/Library/IUserManager.cs @@ -91,7 +91,7 @@ namespace MediaBrowser.Controller.Library /// The user. /// user /// - Task UpdateUser(User user); + void UpdateUser(User user); /// /// Creates the user. @@ -116,7 +116,7 @@ namespace MediaBrowser.Controller.Library /// /// The user. /// Task. - Task ResetPassword(User user); + void ResetPassword(User user); /// /// Gets the offline user dto. @@ -130,7 +130,7 @@ namespace MediaBrowser.Controller.Library /// /// The user. /// Task. - Task ResetEasyPassword(User user); + void ResetEasyPassword(User user); /// /// Changes the password. @@ -138,7 +138,7 @@ namespace MediaBrowser.Controller.Library /// The user. /// The new password sha1. /// Task. - Task ChangePassword(User user, string newPasswordSha1); + void ChangePassword(User user, string newPasswordSha1); /// /// Changes the easy password. @@ -146,7 +146,7 @@ namespace MediaBrowser.Controller.Library /// The user. /// The new password sha1. /// Task. - Task ChangeEasyPassword(User user, string newPasswordSha1); + void ChangeEasyPassword(User user, string newPasswordSha1); /// /// Gets the user dto. @@ -179,7 +179,7 @@ namespace MediaBrowser.Controller.Library /// /// The pin. /// true if XXXX, false otherwise. - Task RedeemPasswordResetPin(string pin); + PinRedeemResult RedeemPasswordResetPin(string pin); /// /// Gets the user policy. @@ -201,14 +201,14 @@ namespace MediaBrowser.Controller.Library /// The user identifier. /// The new configuration. /// Task. - Task UpdateConfiguration(string userId, UserConfiguration newConfiguration); + void UpdateConfiguration(string userId, UserConfiguration newConfiguration); /// /// Updates the user policy. /// /// The user identifier. /// The user policy. - Task UpdateUserPolicy(string userId, UserPolicy userPolicy); + void UpdateUserPolicy(string userId, UserPolicy userPolicy); /// /// Makes the valid username. diff --git a/MediaBrowser.Controller/Persistence/IDisplayPreferencesRepository.cs b/MediaBrowser.Controller/Persistence/IDisplayPreferencesRepository.cs index abf96994f1..25aba6bd9e 100644 --- a/MediaBrowser.Controller/Persistence/IDisplayPreferencesRepository.cs +++ b/MediaBrowser.Controller/Persistence/IDisplayPreferencesRepository.cs @@ -2,7 +2,6 @@ using MediaBrowser.Model.Entities; using System; using System.Threading; -using System.Threading.Tasks; namespace MediaBrowser.Controller.Persistence { @@ -19,9 +18,9 @@ namespace MediaBrowser.Controller.Persistence /// The client. /// The cancellation token. /// Task. - Task SaveDisplayPreferences(DisplayPreferences displayPreferences, string userId, string client, + void SaveDisplayPreferences(DisplayPreferences displayPreferences, string userId, string client, CancellationToken cancellationToken); - + /// /// Saves all display preferences for a user /// @@ -29,7 +28,7 @@ namespace MediaBrowser.Controller.Persistence /// The user id. /// The cancellation token. /// Task. - Task SaveAllDisplayPreferences(IEnumerable displayPreferences, Guid userId, + void SaveAllDisplayPreferences(IEnumerable displayPreferences, Guid userId, CancellationToken cancellationToken); /// /// Gets the display preferences. diff --git a/MediaBrowser.Controller/Persistence/IItemRepository.cs b/MediaBrowser.Controller/Persistence/IItemRepository.cs index bf54914b1d..3d05d2fcab 100644 --- a/MediaBrowser.Controller/Persistence/IItemRepository.cs +++ b/MediaBrowser.Controller/Persistence/IItemRepository.cs @@ -3,7 +3,6 @@ using MediaBrowser.Model.Entities; using System; using System.Collections.Generic; using System.Threading; -using System.Threading.Tasks; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Querying; @@ -19,16 +18,14 @@ namespace MediaBrowser.Controller.Persistence /// /// The item. /// The cancellation token. - /// Task. - Task SaveItem(BaseItem item, CancellationToken cancellationToken); + void SaveItem(BaseItem item, CancellationToken cancellationToken); /// /// Deletes the item. /// /// The identifier. /// The cancellation token. - /// Task. - Task DeleteItem(Guid id, CancellationToken cancellationToken); + void DeleteItem(Guid id, CancellationToken cancellationToken); /// /// Gets the critic reviews. @@ -42,16 +39,14 @@ namespace MediaBrowser.Controller.Persistence /// /// The item id. /// The critic reviews. - /// Task. - Task SaveCriticReviews(Guid itemId, IEnumerable criticReviews); + void SaveCriticReviews(Guid itemId, IEnumerable criticReviews); /// /// Saves the items. /// /// The items. /// The cancellation token. - /// Task. - Task SaveItems(List items, CancellationToken cancellationToken); + void SaveItems(List items, CancellationToken cancellationToken); /// /// Retrieves the item. @@ -78,7 +73,7 @@ namespace MediaBrowser.Controller.Persistence /// /// Saves the chapters. /// - Task SaveChapters(Guid id, List chapters); + void SaveChapters(Guid id, List chapters); /// /// Gets the media streams. @@ -93,8 +88,7 @@ namespace MediaBrowser.Controller.Persistence /// The identifier. /// The streams. /// The cancellation token. - /// Task. - Task SaveMediaStreams(Guid id, List streams, CancellationToken cancellationToken); + void SaveMediaStreams(Guid id, List streams, CancellationToken cancellationToken); /// /// Gets the item ids. @@ -128,8 +122,7 @@ namespace MediaBrowser.Controller.Persistence /// /// The item identifier. /// The people. - /// Task. - Task UpdatePeople(Guid itemId, List people); + void UpdatePeople(Guid itemId, List people); /// /// Gets the people names. @@ -156,8 +149,7 @@ namespace MediaBrowser.Controller.Persistence /// Updates the inherited values. /// /// The cancellation token. - /// Task. - Task UpdateInheritedValues(CancellationToken cancellationToken); + void UpdateInheritedValues(CancellationToken cancellationToken); int GetCount(InternalItemsQuery query); diff --git a/MediaBrowser.Controller/Persistence/IUserDataRepository.cs b/MediaBrowser.Controller/Persistence/IUserDataRepository.cs index ca4dc97513..f79a3a9fc7 100644 --- a/MediaBrowser.Controller/Persistence/IUserDataRepository.cs +++ b/MediaBrowser.Controller/Persistence/IUserDataRepository.cs @@ -2,7 +2,6 @@ using MediaBrowser.Controller.Entities; using System; using System.Threading; -using System.Threading.Tasks; namespace MediaBrowser.Controller.Persistence { @@ -19,7 +18,7 @@ namespace MediaBrowser.Controller.Persistence /// The user data. /// The cancellation token. /// Task. - Task SaveUserData(Guid userId, string key, UserItemData userData, CancellationToken cancellationToken); + void SaveUserData(Guid userId, string key, UserItemData userData, CancellationToken cancellationToken); /// /// Gets the user data. @@ -36,7 +35,7 @@ namespace MediaBrowser.Controller.Persistence /// /// /// - IEnumerable GetAllUserData(Guid userId); + List GetAllUserData(Guid userId); /// /// Save all user data associated with the given user @@ -45,7 +44,7 @@ namespace MediaBrowser.Controller.Persistence /// /// /// - Task SaveAllUserData(Guid userId, IEnumerable userData, CancellationToken cancellationToken); + void SaveAllUserData(Guid userId, UserItemData[] userData, CancellationToken cancellationToken); } } diff --git a/MediaBrowser.Controller/Persistence/IUserRepository.cs b/MediaBrowser.Controller/Persistence/IUserRepository.cs index 80961a369a..721ddb7e36 100644 --- a/MediaBrowser.Controller/Persistence/IUserRepository.cs +++ b/MediaBrowser.Controller/Persistence/IUserRepository.cs @@ -1,7 +1,6 @@ using MediaBrowser.Controller.Entities; using System.Collections.Generic; using System.Threading; -using System.Threading.Tasks; namespace MediaBrowser.Controller.Persistence { @@ -16,7 +15,7 @@ namespace MediaBrowser.Controller.Persistence /// The user. /// The cancellation token. /// Task. - Task DeleteUser(User user, CancellationToken cancellationToken); + void DeleteUser(User user, CancellationToken cancellationToken); /// /// Saves the user. @@ -24,7 +23,7 @@ namespace MediaBrowser.Controller.Persistence /// The user. /// The cancellation token. /// Task. - Task SaveUser(User user, CancellationToken cancellationToken); + void SaveUser(User user, CancellationToken cancellationToken); /// /// Retrieves all users. diff --git a/MediaBrowser.Controller/Security/IAuthenticationRepository.cs b/MediaBrowser.Controller/Security/IAuthenticationRepository.cs index 219b07028d..f80ee6e7fb 100644 --- a/MediaBrowser.Controller/Security/IAuthenticationRepository.cs +++ b/MediaBrowser.Controller/Security/IAuthenticationRepository.cs @@ -1,6 +1,5 @@ using MediaBrowser.Model.Querying; using System.Threading; -using System.Threading.Tasks; namespace MediaBrowser.Controller.Security { @@ -12,7 +11,7 @@ namespace MediaBrowser.Controller.Security /// The information. /// The cancellation token. /// Task. - Task Create(AuthenticationInfo info, CancellationToken cancellationToken); + void Create(AuthenticationInfo info, CancellationToken cancellationToken); /// /// Updates the specified information. @@ -20,7 +19,7 @@ namespace MediaBrowser.Controller.Security /// The information. /// The cancellation token. /// Task. - Task Update(AuthenticationInfo info, CancellationToken cancellationToken); + void Update(AuthenticationInfo info, CancellationToken cancellationToken); /// /// Gets the specified query. diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs index 8d77e07479..603e5ef762 100644 --- a/MediaBrowser.Controller/Session/ISessionManager.cs +++ b/MediaBrowser.Controller/Session/ISessionManager.cs @@ -318,19 +318,19 @@ namespace MediaBrowser.Controller.Session /// /// The access token. /// Task. - Task Logout(string accessToken); + void Logout(string accessToken); /// /// Revokes the user tokens. /// /// Task. - Task RevokeUserTokens(string userId, string currentAccessToken); + void RevokeUserTokens(string userId, string currentAccessToken); /// /// Revokes the token. /// /// The identifier. /// Task. - Task RevokeToken(string id); + void RevokeToken(string id); } } \ No newline at end of file diff --git a/MediaBrowser.Model/Activity/IActivityManager.cs b/MediaBrowser.Model/Activity/IActivityManager.cs index 7032dff143..396be95737 100644 --- a/MediaBrowser.Model/Activity/IActivityManager.cs +++ b/MediaBrowser.Model/Activity/IActivityManager.cs @@ -1,5 +1,4 @@ using System; -using System.Threading.Tasks; using MediaBrowser.Model.Events; using MediaBrowser.Model.Querying; @@ -9,7 +8,7 @@ namespace MediaBrowser.Model.Activity { event EventHandler> EntryCreated; - Task Create(ActivityLogEntry entry); + void Create(ActivityLogEntry entry); QueryResult GetActivityLogEntries(DateTime? minDate, int? startIndex, int? limit); } diff --git a/MediaBrowser.Model/Activity/IActivityRepository.cs b/MediaBrowser.Model/Activity/IActivityRepository.cs index c1952d436b..8ee87ee2ea 100644 --- a/MediaBrowser.Model/Activity/IActivityRepository.cs +++ b/MediaBrowser.Model/Activity/IActivityRepository.cs @@ -1,12 +1,11 @@ using System; -using System.Threading.Tasks; using MediaBrowser.Model.Querying; namespace MediaBrowser.Model.Activity { public interface IActivityRepository { - Task Create(ActivityLogEntry entry); + void Create(ActivityLogEntry entry); QueryResult GetActivityLogEntries(DateTime? minDate, int? startIndex, int? limit); } diff --git a/MediaBrowser.Model/Social/ISharingManager.cs b/MediaBrowser.Model/Social/ISharingManager.cs index 94c22baba5..28c8c7db22 100644 --- a/MediaBrowser.Model/Social/ISharingManager.cs +++ b/MediaBrowser.Model/Social/ISharingManager.cs @@ -22,6 +22,6 @@ namespace MediaBrowser.Model.Social /// /// The identifier. /// Task. - Task DeleteShare(string id); + void DeleteShare(string id); } } diff --git a/MediaBrowser.Model/Social/ISharingRepository.cs b/MediaBrowser.Model/Social/ISharingRepository.cs index 1dadd7f71a..dd88ddd042 100644 --- a/MediaBrowser.Model/Social/ISharingRepository.cs +++ b/MediaBrowser.Model/Social/ISharingRepository.cs @@ -1,11 +1,10 @@ -using System.Threading.Tasks; - + namespace MediaBrowser.Model.Social { public interface ISharingRepository { - Task CreateShare(SocialShareInfo info); - Task DeleteShare(string id); + void CreateShare(SocialShareInfo info); + void DeleteShare(string id); SocialShareInfo GetShareInfo(string id); } } diff --git a/MediaBrowser.Providers/Chapters/ChapterManager.cs b/MediaBrowser.Providers/Chapters/ChapterManager.cs index d3e9efd820..1bbc6fa4ea 100644 --- a/MediaBrowser.Providers/Chapters/ChapterManager.cs +++ b/MediaBrowser.Providers/Chapters/ChapterManager.cs @@ -33,14 +33,14 @@ namespace MediaBrowser.Providers.Chapters _itemRepo = itemRepo; } - public IEnumerable GetChapters(string itemId) + public List GetChapters(string itemId) { return _itemRepo.GetChapters(new Guid(itemId)); } - public Task SaveChapters(string itemId, List chapters) + public void SaveChapters(string itemId, List chapters) { - return _itemRepo.SaveChapters(new Guid(itemId), chapters); + _itemRepo.SaveChapters(new Guid(itemId), chapters); } } } diff --git a/MediaBrowser.Providers/Manager/MetadataService.cs b/MediaBrowser.Providers/Manager/MetadataService.cs index 5d531c95c6..9a7ced0a5c 100644 --- a/MediaBrowser.Providers/Manager/MetadataService.cs +++ b/MediaBrowser.Providers/Manager/MetadataService.cs @@ -201,7 +201,7 @@ namespace MediaBrowser.Providers.Manager { var baseItem = result.Item as BaseItem; - await LibraryManager.UpdatePeople(baseItem, result.People); + LibraryManager.UpdatePeople(baseItem, result.People); await SavePeopleMetadata(result.People, libraryOptions, cancellationToken).ConfigureAwait(false); } await result.Item.UpdateToRepository(reason, cancellationToken).ConfigureAwait(false); @@ -519,7 +519,7 @@ namespace MediaBrowser.Providers.Manager userDataList.AddRange(localItem.UserDataList); } - MergeData(localItem, temp, new MetadataFields[]{}, !options.ReplaceAllMetadata, true); + MergeData(localItem, temp, new MetadataFields[] { }, !options.ReplaceAllMetadata, true); refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.MetadataImport; // Only one local provider allowed per item @@ -567,7 +567,7 @@ namespace MediaBrowser.Providers.Manager else { // TODO: If the new metadata from above has some blank data, this can cause old data to get filled into those empty fields - MergeData(metadata, temp, new MetadataFields[]{}, false, false); + MergeData(metadata, temp, new MetadataFields[] { }, false, false); MergeData(temp, metadata, item.LockedFields, true, false); } } @@ -580,7 +580,7 @@ namespace MediaBrowser.Providers.Manager await RunCustomProvider(provider, item, logName, options, refreshResult, cancellationToken).ConfigureAwait(false); } - await ImportUserData(item, userDataList, cancellationToken).ConfigureAwait(false); + ImportUserData(item, userDataList, cancellationToken); return refreshResult; } @@ -595,7 +595,7 @@ namespace MediaBrowser.Providers.Manager return true; } - private async Task ImportUserData(TItemType item, List userDataList, CancellationToken cancellationToken) + private void ImportUserData(TItemType item, List userDataList, CancellationToken cancellationToken) { var hasUserData = item as IHasUserData; @@ -603,8 +603,7 @@ namespace MediaBrowser.Providers.Manager { foreach (var userData in userDataList) { - await UserDataManager.SaveUserData(userData.UserId, hasUserData, userData, UserDataSaveReason.Import, cancellationToken) - .ConfigureAwait(false); + UserDataManager.SaveUserData(userData.UserId, hasUserData, userData, UserDataSaveReason.Import, cancellationToken); } } } @@ -704,7 +703,7 @@ namespace MediaBrowser.Providers.Manager foreach (var result in results) { - MergeData(result, temp, new MetadataFields[]{}, false, false); + MergeData(result, temp, new MetadataFields[] { }, false, false); } return refreshResult; diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeAudioInfo.cs b/MediaBrowser.Providers/MediaInfo/FFProbeAudioInfo.cs index b0785298b8..aa6e5ad316 100644 --- a/MediaBrowser.Providers/MediaInfo/FFProbeAudioInfo.cs +++ b/MediaBrowser.Providers/MediaInfo/FFProbeAudioInfo.cs @@ -43,7 +43,7 @@ namespace MediaBrowser.Providers.MediaInfo cancellationToken.ThrowIfCancellationRequested(); - await Fetch(item, cancellationToken, result).ConfigureAwait(false); + Fetch(item, cancellationToken, result); return ItemUpdateType.MetadataImport; } @@ -92,7 +92,7 @@ namespace MediaBrowser.Providers.MediaInfo /// The cancellation token. /// The media information. /// Task. - protected async Task Fetch(Audio audio, CancellationToken cancellationToken, Model.MediaInfo.MediaInfo mediaInfo) + protected void Fetch(Audio audio, CancellationToken cancellationToken, Model.MediaInfo.MediaInfo mediaInfo) { var mediaStreams = mediaInfo.MediaStreams; @@ -102,12 +102,12 @@ namespace MediaBrowser.Providers.MediaInfo audio.RunTimeTicks = mediaInfo.RunTimeTicks; audio.Size = mediaInfo.Size; - var extension = (Path.GetExtension(audio.Path) ?? string.Empty).TrimStart('.'); + //var extension = (Path.GetExtension(audio.Path) ?? string.Empty).TrimStart('.'); //audio.Container = extension; - await FetchDataFromTags(audio, mediaInfo).ConfigureAwait(false); + FetchDataFromTags(audio, mediaInfo); - await _itemRepo.SaveMediaStreams(audio.Id, mediaStreams, cancellationToken).ConfigureAwait(false); + _itemRepo.SaveMediaStreams(audio.Id, mediaStreams, cancellationToken); } /// @@ -115,7 +115,7 @@ namespace MediaBrowser.Providers.MediaInfo /// /// The audio. /// The data. - private async Task FetchDataFromTags(Audio audio, Model.MediaInfo.MediaInfo data) + private void FetchDataFromTags(Audio audio, Model.MediaInfo.MediaInfo data) { // Only set Name if title was found in the dictionary if (!string.IsNullOrEmpty(data.Name)) @@ -137,7 +137,7 @@ namespace MediaBrowser.Providers.MediaInfo }); } - await _libraryManager.UpdatePeople(audio, people).ConfigureAwait(false); + _libraryManager.UpdatePeople(audio, people); } audio.Album = data.Album; diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs index 76cd02cef7..64a485bc20 100644 --- a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs +++ b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs @@ -198,7 +198,7 @@ namespace MediaBrowser.Providers.MediaInfo var libraryOptions = _libraryManager.GetLibraryOptions(video); FetchEmbeddedInfo(video, mediaInfo, options, libraryOptions); - await FetchPeople(video, mediaInfo, options).ConfigureAwait(false); + FetchPeople(video, mediaInfo, options); video.IsHD = mediaStreams.Any(i => i.Type == MediaStreamType.Video && i.Width.HasValue && i.Width.Value >= 1260); @@ -211,7 +211,7 @@ namespace MediaBrowser.Providers.MediaInfo video.Video3DFormat = video.Video3DFormat ?? mediaInfo.Video3DFormat; - await _itemRepo.SaveMediaStreams(video.Id, mediaStreams, cancellationToken).ConfigureAwait(false); + _itemRepo.SaveMediaStreams(video.Id, mediaStreams, cancellationToken); if (options.MetadataRefreshMode == MetadataRefreshMode.FullRefresh || options.MetadataRefreshMode == MetadataRefreshMode.Default) @@ -231,7 +231,7 @@ namespace MediaBrowser.Providers.MediaInfo await _encodingManager.RefreshChapterImages(video, chapters, extractDuringScan, false, cancellationToken).ConfigureAwait(false); - await _chapterManager.SaveChapters(video.Id.ToString(), chapters).ConfigureAwait(false); + _chapterManager.SaveChapters(video.Id.ToString(), chapters); } } @@ -426,7 +426,7 @@ namespace MediaBrowser.Providers.MediaInfo } } - private async Task FetchPeople(Video video, Model.MediaInfo.MediaInfo data, MetadataRefreshOptions options) + private void FetchPeople(Video video, Model.MediaInfo.MediaInfo data, MetadataRefreshOptions options) { var isFullRefresh = options.MetadataRefreshMode == MetadataRefreshMode.FullRefresh; @@ -446,7 +446,7 @@ namespace MediaBrowser.Providers.MediaInfo }); } - await _libraryManager.UpdatePeople(video, people); + _libraryManager.UpdatePeople(video, people); } } } @@ -560,7 +560,7 @@ namespace MediaBrowser.Providers.MediaInfo titleNumber = primaryTitle.VideoTitleSetNumber; item.RunTimeTicks = GetRuntime(primaryTitle); } - + return _mediaEncoder.GetPrimaryPlaylistVobFiles(item.Path, mount, titleNumber) .Select(Path.GetFileName) .ToArray(); diff --git a/MediaBrowser.Providers/TV/DummySeasonProvider.cs b/MediaBrowser.Providers/TV/DummySeasonProvider.cs index aef29abbea..791d14b60c 100644 --- a/MediaBrowser.Providers/TV/DummySeasonProvider.cs +++ b/MediaBrowser.Providers/TV/DummySeasonProvider.cs @@ -37,7 +37,7 @@ namespace MediaBrowser.Providers.TV public async Task Run(Series series, CancellationToken cancellationToken) { await RemoveObsoleteSeasons(series).ConfigureAwait(false); - + var hasNewSeasons = await AddDummySeasonFolders(series, cancellationToken).ConfigureAwait(false); if (hasNewSeasons) @@ -129,8 +129,8 @@ namespace MediaBrowser.Providers.TV }; season.SetParent(series); - - await series.AddChild(season, cancellationToken).ConfigureAwait(false); + + series.AddChild(season, cancellationToken); await season.RefreshMetadata(new MetadataRefreshOptions(_fileSystem), cancellationToken).ConfigureAwait(false); diff --git a/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs b/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs index cfe20c741f..44e3cff6a1 100644 --- a/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs +++ b/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs @@ -206,7 +206,7 @@ namespace MediaBrowser.Providers.TV { var existingEpisodes = (from s in series from c in s.GetRecursiveChildren(i => i is Episode).Cast() - select new Tuple((c.ParentIndexNumber ?? 0) , c)) + select new Tuple((c.ParentIndexNumber ?? 0), c)) .ToList(); var lookup = episodeLookup as IList> ?? episodeLookup.ToList(); @@ -466,7 +466,7 @@ namespace MediaBrowser.Providers.TV episode.SetParent(season); - await season.AddChild(episode, cancellationToken).ConfigureAwait(false); + season.AddChild(episode, cancellationToken); await episode.RefreshMetadata(new MetadataRefreshOptions(_fileSystem), cancellationToken).ConfigureAwait(false); } @@ -534,7 +534,7 @@ namespace MediaBrowser.Providers.TV settings.CheckCharacters = false; settings.IgnoreProcessingInstructions = true; settings.IgnoreComments = true; - + // Use XmlReader for best performance using (var reader = XmlReader.Create(streamReader, settings)) { diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec index 3aa3d54036..87c8a70ae3 100644 --- a/Nuget/MediaBrowser.Common.nuspec +++ b/Nuget/MediaBrowser.Common.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common - 3.0.744 + 3.0.747 Emby.Common Emby Team ebr,Luke,scottisafool diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec index ea30175e63..20c0430070 100644 --- a/Nuget/MediaBrowser.Server.Core.nuspec +++ b/Nuget/MediaBrowser.Server.Core.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Server.Core - 3.0.744 + 3.0.747 Emby.Server.Core Emby Team ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains core components required to build plugins for Emby Server. Copyright © Emby 2013 - + From 28297ee620897ef10daedb6acce2957de83d6238 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 26 Aug 2017 20:33:23 -0400 Subject: [PATCH 2/2] 3.2.28.8 --- SharedVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index a113282588..e8903fbb5c 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.28.7")] +[assembly: AssemblyVersion("3.2.28.8")]