diff --git a/Emby.Common.Implementations/Emby.Common.Implementations.csproj b/Emby.Common.Implementations/Emby.Common.Implementations.csproj
index 879e8e82f..cbd077e19 100644
--- a/Emby.Common.Implementations/Emby.Common.Implementations.csproj
+++ b/Emby.Common.Implementations/Emby.Common.Implementations.csproj
@@ -34,8 +34,9 @@
..\packages\NLog.4.4.12\lib\net45\NLog.dll
-
- ..\packages\ServiceStack.Text.4.5.12\lib\net45\ServiceStack.Text.dll
+
+ ..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll
+ True
..\packages\SharpCompress.0.14.0\lib\net45\SharpCompress.dll
diff --git a/Emby.Common.Implementations/packages.config b/Emby.Common.Implementations/packages.config
index a9fc75af6..eb8fd586e 100644
--- a/Emby.Common.Implementations/packages.config
+++ b/Emby.Common.Implementations/packages.config
@@ -1,7 +1,7 @@
-
+
\ No newline at end of file
diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs
index 5e97cd5f5..e41e0ea87 100644
--- a/Emby.Server.Implementations/Channels/ChannelManager.cs
+++ b/Emby.Server.Implementations/Channels/ChannelManager.cs
@@ -1344,7 +1344,7 @@ namespace Emby.Server.Implementations.Channels
var hasAlbumArtists = item as IHasAlbumArtist;
if (hasAlbumArtists != null)
{
- hasAlbumArtists.AlbumArtists = info.AlbumArtists;
+ hasAlbumArtists.AlbumArtists = info.AlbumArtists.ToArray(info.AlbumArtists.Count);
}
var trailer = item as Trailer;
diff --git a/Emby.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.cs
index 4e5d344a3..5b168f6cc 100644
--- a/Emby.Server.Implementations/Collections/CollectionManager.cs
+++ b/Emby.Server.Implementations/Collections/CollectionManager.cs
@@ -12,6 +12,7 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.IO;
+using MediaBrowser.Model.Extensions;
namespace Emby.Server.Implementations.Collections
{
@@ -190,7 +191,9 @@ namespace Emby.Server.Implementations.Collections
if (list.Count > 0)
{
- collection.LinkedChildren.AddRange(list);
+ var newList = collection.LinkedChildren.ToList();
+ newList.AddRange(list);
+ collection.LinkedChildren = newList.ToArray(newList.Count);
collection.UpdateRatingToContent();
@@ -241,9 +244,9 @@ namespace Emby.Server.Implementations.Collections
}
}
- foreach (var child in list)
+ if (list.Count > 0)
{
- collection.LinkedChildren.Remove(child);
+ collection.LinkedChildren = collection.LinkedChildren.Except(list).ToArray();
}
collection.UpdateRatingToContent();
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
index 23d46e821..b7e2687ec 100644
--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
@@ -1037,9 +1037,9 @@ namespace Emby.Server.Implementations.Data
var hasAlbumArtists = item as IHasAlbumArtist;
if (hasAlbumArtists != null)
{
- if (hasAlbumArtists.AlbumArtists.Count > 0)
+ if (hasAlbumArtists.AlbumArtists.Length > 0)
{
- albumArtists = string.Join("|", hasAlbumArtists.AlbumArtists.ToArray());
+ albumArtists = string.Join("|", hasAlbumArtists.AlbumArtists);
}
}
saveItemStatement.TryBind("@AlbumArtists", albumArtists);
@@ -1927,7 +1927,7 @@ namespace Emby.Server.Implementations.Data
var hasAlbumArtists = item as IHasAlbumArtist;
if (hasAlbumArtists != null && !reader.IsDBNull(index))
{
- hasAlbumArtists.AlbumArtists = reader.GetString(index).Split('|').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
+ hasAlbumArtists.AlbumArtists = reader.GetString(index).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
}
index++;
}
@@ -1995,7 +1995,7 @@ namespace Emby.Server.Implementations.Data
/// The id.
/// IEnumerable{ChapterInfo}.
/// id
- public IEnumerable GetChapters(Guid id)
+ public List GetChapters(Guid id)
{
CheckDisposed();
if (id == Guid.Empty)
@@ -2091,18 +2091,7 @@ namespace Emby.Server.Implementations.Data
///
/// Saves the chapters.
///
- /// The id.
- /// The chapters.
- /// The cancellation token.
- /// Task.
- ///
- /// id
- /// or
- /// chapters
- /// or
- /// cancellationToken
- ///
- public async Task SaveChapters(Guid id, List chapters, CancellationToken cancellationToken)
+ public async Task SaveChapters(Guid id, List chapters)
{
CheckDisposed();
@@ -2116,8 +2105,6 @@ namespace Emby.Server.Implementations.Data
throw new ArgumentNullException("chapters");
}
- cancellationToken.ThrowIfCancellationRequested();
-
var index = 0;
using (WriteLock.Write())
@@ -2826,7 +2813,7 @@ namespace Emby.Server.Implementations.Data
var slowThreshold = 1000;
#if DEBUG
- slowThreshold = 2;
+ slowThreshold = 10;
#endif
if (elapsed >= slowThreshold)
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs
index 098e11720..bf70cc19b 100644
--- a/Emby.Server.Implementations/Dto/DtoService.cs
+++ b/Emby.Server.Implementations/Dto/DtoService.cs
@@ -993,7 +993,7 @@ namespace Emby.Server.Implementations.Dto
{
dto.RemoteTrailers = hasTrailers != null ?
hasTrailers.RemoteTrailers :
- new List();
+ new MediaUrl[] {};
}
dto.Name = item.Name;
@@ -1172,8 +1172,7 @@ namespace Emby.Server.Implementations.Dto
// })
// .ToList();
- dto.AlbumArtists = new List();
- dto.AlbumArtists.AddRange(hasAlbumArtist.AlbumArtists
+ dto.AlbumArtists = hasAlbumArtist.AlbumArtists
//.Except(foundArtists, new DistinctNameComparer())
.Select(i =>
{
@@ -1198,7 +1197,7 @@ namespace Emby.Server.Implementations.Dto
return null;
- }).Where(i => i != null));
+ }).Where(i => i != null).ToArray();
}
// Add video info
@@ -1214,9 +1213,9 @@ namespace Emby.Server.Implementations.Dto
dto.HasSubtitles = video.HasSubtitles;
}
- if (video.AdditionalParts.Count != 0)
+ if (video.AdditionalParts.Length != 0)
{
- dto.PartCount = video.AdditionalParts.Count + 1;
+ dto.PartCount = video.AdditionalParts.Length + 1;
}
if (fields.Contains(ItemFields.MediaSourceCount))
diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj
index 8ebd28bf7..d4976196c 100644
--- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj
+++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj
@@ -367,8 +367,9 @@
..\packages\Microsoft.IO.RecyclableMemoryStream.1.2.2\lib\net45\Microsoft.IO.RecyclableMemoryStream.dll
-
- ..\packages\ServiceStack.Text.4.5.12\lib\net45\ServiceStack.Text.dll
+
+ ..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll
+ True
..\packages\SimpleInjector.4.0.8\lib\net45\SimpleInjector.dll
diff --git a/Emby.Server.Implementations/Library/LocalTrailerPostScanTask.cs b/Emby.Server.Implementations/Library/LocalTrailerPostScanTask.cs
index 83bee89e0..757e67eb4 100644
--- a/Emby.Server.Implementations/Library/LocalTrailerPostScanTask.cs
+++ b/Emby.Server.Implementations/Library/LocalTrailerPostScanTask.cs
@@ -91,7 +91,7 @@ namespace Emby.Server.Implementations.Library
});
var trailerIds = trailers.Select(i => i.Id)
- .ToList();
+ .ToArray();
if (!trailerIds.SequenceEqual(item.RemoteTrailerIds))
{
diff --git a/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs
index d88076b99..d7cc1a7f7 100644
--- a/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs
+++ b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs
@@ -159,8 +159,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
IsInMixedFolder = isInMixedFolder,
ProductionYear = video.Year,
Name = video.Name,
- AdditionalParts = video.Files.Skip(1).Select(i => i.Path).ToList(),
- LocalAlternateVersions = video.AlternateVersions.Select(i => i.Path).ToList()
+ AdditionalParts = video.Files.Skip(1).Select(i => i.Path).ToArray(),
+ LocalAlternateVersions = video.AlternateVersions.Select(i => i.Path).ToArray()
};
SetVideoType(videoItem, firstVideo);
@@ -503,7 +503,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
{
Path = folderPaths[0],
- AdditionalParts = folderPaths.Skip(1).ToList(),
+ AdditionalParts = folderPaths.Skip(1).ToArray(),
VideoType = videoTypes[0],
diff --git a/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs
index 884f46f1f..7ee6e9e38 100644
--- a/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs
+++ b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs
@@ -84,13 +84,8 @@ namespace Emby.Server.Implementations.MediaEncoder
///
private static readonly long FirstChapterTicks = TimeSpan.FromSeconds(15).Ticks;
- public async Task RefreshChapterImages(ChapterImageRefreshOptions options, CancellationToken cancellationToken)
+ public async Task RefreshChapterImages(Video video, List chapters, bool extractImages, bool saveChapters, CancellationToken cancellationToken)
{
- var extractImages = options.ExtractImages;
- var video = options.Video;
- var chapters = options.Chapters;
- var saveChapters = options.SaveChapters;
-
if (!IsEligibleForChapterImageExtraction(video))
{
extractImages = false;
@@ -179,7 +174,7 @@ namespace Emby.Server.Implementations.MediaEncoder
if (saveChapters && changesMade)
{
- await _chapterManager.SaveChapters(video.Id.ToString(), chapters, cancellationToken).ConfigureAwait(false);
+ await _chapterManager.SaveChapters(video.Id.ToString(), chapters).ConfigureAwait(false);
}
DeleteDeadImages(currentImages, chapters);
diff --git a/Emby.Server.Implementations/Playlists/PlaylistManager.cs b/Emby.Server.Implementations/Playlists/PlaylistManager.cs
index e0e133e38..578a2321c 100644
--- a/Emby.Server.Implementations/Playlists/PlaylistManager.cs
+++ b/Emby.Server.Implementations/Playlists/PlaylistManager.cs
@@ -12,10 +12,9 @@ using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-
using MediaBrowser.Controller.Dto;
-using MediaBrowser.Controller.IO;
using MediaBrowser.Model.IO;
+using MediaBrowser.Model.Extensions;
namespace Emby.Server.Implementations.Playlists
{
@@ -164,7 +163,7 @@ namespace Emby.Server.Implementations.Playlists
return path;
}
- private IEnumerable GetPlaylistItems(IEnumerable itemIds, string playlistMediaType, User user, DtoOptions options)
+ private List GetPlaylistItems(IEnumerable itemIds, string playlistMediaType, User user, DtoOptions options)
{
var items = itemIds.Select(i => _libraryManager.GetItemById(i)).Where(i => i != null);
@@ -206,7 +205,9 @@ namespace Emby.Server.Implementations.Playlists
list.Add(LinkedChild.Create(item));
}
- playlist.LinkedChildren.AddRange(list);
+ var newList = playlist.LinkedChildren.ToList();
+ newList.AddRange(list);
+ playlist.LinkedChildren = newList.ToArray(newList.Count);
await playlist.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
@@ -234,7 +235,7 @@ namespace Emby.Server.Implementations.Playlists
playlist.LinkedChildren = children.Except(removals)
.Select(i => i.Item1)
- .ToList();
+ .ToArray();
await playlist.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
@@ -265,17 +266,21 @@ namespace Emby.Server.Implementations.Playlists
var item = playlist.LinkedChildren[oldIndex];
- playlist.LinkedChildren.Remove(item);
+ var newList = playlist.LinkedChildren.ToList();
- if (newIndex >= playlist.LinkedChildren.Count)
+ newList.Remove(item);
+
+ if (newIndex >= newList.Count)
{
- playlist.LinkedChildren.Add(item);
+ newList.Add(item);
}
else
{
- playlist.LinkedChildren.Insert(newIndex, item);
+ newList.Insert(newIndex, item);
}
+ playlist.LinkedChildren = newList.ToArray(newList.Count);
+
await playlist.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
}
diff --git a/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs b/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs
index 91ae2afd1..ec371c741 100644
--- a/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs
@@ -124,16 +124,9 @@ namespace Emby.Server.Implementations.ScheduledTasks
try
{
- var chapters = _itemRepo.GetChapters(video.Id).ToList();
+ var chapters = _itemRepo.GetChapters(video.Id);
- var success = await _encodingManager.RefreshChapterImages(new ChapterImageRefreshOptions
- {
- SaveChapters = true,
- ExtractImages = extract,
- Video = video,
- Chapters = chapters
-
- }, CancellationToken.None);
+ var success = await _encodingManager.RefreshChapterImages(video, chapters, extract, true, CancellationToken.None);
if (!success)
{
diff --git a/Emby.Server.Implementations/packages.config b/Emby.Server.Implementations/packages.config
index c86812ee0..3675e1950 100644
--- a/Emby.Server.Implementations/packages.config
+++ b/Emby.Server.Implementations/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/MediaBrowser.Api/ItemUpdateService.cs b/MediaBrowser.Api/ItemUpdateService.cs
index a4b6c3956..68b30ec1e 100644
--- a/MediaBrowser.Api/ItemUpdateService.cs
+++ b/MediaBrowser.Api/ItemUpdateService.cs
@@ -347,7 +347,7 @@ namespace MediaBrowser.Api
hasAlbumArtists.AlbumArtists = request
.AlbumArtists
.Select(i => i.Name)
- .ToList();
+ .ToArray();
}
}
diff --git a/MediaBrowser.Api/Reports/Data/ReportBuilder.cs b/MediaBrowser.Api/Reports/Data/ReportBuilder.cs
index e137ffc46..5339fa64b 100644
--- a/MediaBrowser.Api/Reports/Data/ReportBuilder.cs
+++ b/MediaBrowser.Api/Reports/Data/ReportBuilder.cs
@@ -513,7 +513,7 @@ namespace MediaBrowser.Api.Reports
internalHeader = HeaderMetadata.AlbumArtist;
break;
case HeaderMetadata.AudioAlbumArtist:
- option.Column = (i, r) => this.GetListAsString(this.GetObject
-
- ..\packages\ServiceStack.Text.4.5.12\lib\net45\ServiceStack.Text.dll
+
+ ..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll
True
diff --git a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj b/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj
index 33678d323..48b4fdb4f 100644
--- a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj
+++ b/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj
@@ -54,8 +54,9 @@
..\packages\NLog.4.4.12\lib\net45\NLog.dll
-
- ..\packages\ServiceStack.Text.4.5.12\lib\net45\ServiceStack.Text.dll
+
+ ..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll
+ True
..\packages\SharpCompress.0.14.0\lib\net45\SharpCompress.dll
diff --git a/MediaBrowser.Server.Mono/packages.config b/MediaBrowser.Server.Mono/packages.config
index 0cb6cc916..c77327e22 100644
--- a/MediaBrowser.Server.Mono/packages.config
+++ b/MediaBrowser.Server.Mono/packages.config
@@ -2,7 +2,7 @@
-
+
diff --git a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj
index 624822746..a4138a57d 100644
--- a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj
+++ b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj
@@ -76,8 +76,9 @@
..\packages\NLog.4.4.12\lib\net45\NLog.dll
-
- ..\packages\ServiceStack.Text.4.5.12\lib\net45\ServiceStack.Text.dll
+
+ ..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll
+ True
..\packages\SharpCompress.0.14.0\lib\net45\SharpCompress.dll
diff --git a/MediaBrowser.ServerApplication/packages.config b/MediaBrowser.ServerApplication/packages.config
index e3fea58a6..ed953e299 100644
--- a/MediaBrowser.ServerApplication/packages.config
+++ b/MediaBrowser.ServerApplication/packages.config
@@ -1,7 +1,7 @@
-
+
diff --git a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs
index bc2fcb054..789d840b8 100644
--- a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs
+++ b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs
@@ -599,7 +599,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
{
val = val.Replace("plugin://plugin.video.youtube/?action=play_video&videoid=", "https://www.youtube.com/watch?v=", StringComparison.OrdinalIgnoreCase);
- hasTrailer.AddTrailerUrl(val, false);
+ hasTrailer.AddTrailerUrl(val);
}
}
break;
diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec
deleted file mode 100644
index fdc2b9f7d..000000000
--- a/Nuget/MediaBrowser.Common.Internal.nuspec
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
- MediaBrowser.Common.Internal
- 3.0.681
- Emby.Common.Internal
- Luke
- ebr,Luke,scottisafool
- https://github.com/MediaBrowser/Emby
- http://www.mb3admin.com/images/mb3icons1-1.png
- false
- Contains common components shared by Emby Theater and Emby Server. Not intended for plugin developer consumption.
- Copyright © Emby 2013
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec
index f647797dd..890ecaccd 100644
--- a/Nuget/MediaBrowser.Common.nuspec
+++ b/Nuget/MediaBrowser.Common.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Common
- 3.0.716
+ 3.0.717
Emby.Common
Emby Team
ebr,Luke,scottisafool
diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec
index 27b7513bc..6b7a8729b 100644
--- a/Nuget/MediaBrowser.Server.Core.nuspec
+++ b/Nuget/MediaBrowser.Server.Core.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Server.Core
- 3.0.716
+ 3.0.717
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
-
+
diff --git a/SharedVersion.cs b/SharedVersion.cs
index 988d4c255..b201954e6 100644
--- a/SharedVersion.cs
+++ b/SharedVersion.cs
@@ -1,3 +1,3 @@
using System.Reflection;
-[assembly: AssemblyVersion("3.2.26.19")]
+[assembly: AssemblyVersion("3.2.26.20")]