From 0d28929e171992e55ab220b878edaec59e81b0ae Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 3 Nov 2017 14:11:04 -0400 Subject: [PATCH 1/2] update download progress reporting --- .../Emby.Server.Implementations.csproj | 1 - .../HttpClientManager/HttpClientManager.cs | 8 +- .../IO/ProgressStream.cs | 240 ------------------ .../Localization/Core/ar.json | 7 +- .../Localization/Core/bg-BG.json | 45 ++-- .../Localization/Core/ca.json | 7 +- .../Localization/Core/cs.json | 7 +- .../Localization/Core/da.json | 7 +- .../Localization/Core/de.json | 7 +- .../Localization/Core/en-GB.json | 7 +- .../Localization/Core/es-AR.json | 7 +- .../Localization/Core/es-MX.json | 7 +- .../Localization/Core/es.json | 13 +- .../Localization/Core/fr-CA.json | 7 +- .../Localization/Core/fr.json | 7 +- .../Localization/Core/he.json | 7 +- .../Localization/Core/hr.json | 7 +- .../Localization/Core/hu.json | 7 +- .../Localization/Core/it.json | 7 +- .../Localization/Core/kk.json | 7 +- .../Localization/Core/ko.json | 7 +- .../Localization/Core/lt-LT.json | 7 +- .../Localization/Core/ms.json | 7 +- .../Localization/Core/nb.json | 7 +- .../Localization/Core/nl.json | 7 +- .../Localization/Core/pl.json | 9 +- .../Localization/Core/pt-BR.json | 7 +- .../Localization/Core/pt-PT.json | 7 +- .../Localization/Core/ru.json | 7 +- .../Localization/Core/sk.json | 7 +- .../Localization/Core/sl-SI.json | 7 +- .../Localization/Core/sv.json | 7 +- .../Localization/Core/tr.json | 7 +- .../Localization/Core/zh-CN.json | 7 +- .../Localization/Core/zh-HK.json | 7 +- .../ScheduledTasks/ScheduledTaskWorker.cs | 2 + MediaBrowser.Controller/Entities/BaseItem.cs | 5 - .../Entities/CollectionFolder.cs | 15 -- MediaBrowser.Controller/Entities/Folder.cs | 2 +- MediaBrowser.Controller/IO/StreamHelper.cs | 23 ++ 40 files changed, 84 insertions(+), 482 deletions(-) delete mode 100644 Emby.Server.Implementations/IO/ProgressStream.cs diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index 8ff1b63c03..6b2a005f9f 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -117,7 +117,6 @@ - diff --git a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs index cd7c98dc85..4a9e417f2e 100644 --- a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs +++ b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs @@ -16,6 +16,7 @@ using MediaBrowser.Common.Net; using MediaBrowser.Model.IO; using MediaBrowser.Model.Logging; using MediaBrowser.Model.Net; +using MediaBrowser.Controller.IO; namespace Emby.Server.Implementations.HttpClientManager { @@ -633,12 +634,9 @@ namespace Emby.Server.Implementations.HttpClientManager } else { - using (var stream = ProgressStream.CreateReadProgressStream(httpResponse.GetResponseStream(), options.Progress.Report, contentLength.Value)) + using (var fs = _fileSystem.GetFileStream(tempFile, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, true)) { - using (var fs = _fileSystem.GetFileStream(tempFile, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, true)) - { - await stream.CopyToAsync(fs, StreamDefaults.DefaultCopyToBufferSize, options.CancellationToken).ConfigureAwait(false); - } + await StreamHelper.CopyToAsync(httpResponse.GetResponseStream(), fs, StreamDefaults.DefaultCopyToBufferSize, options.Progress, contentLength.Value, options.CancellationToken).ConfigureAwait(false); } } diff --git a/Emby.Server.Implementations/IO/ProgressStream.cs b/Emby.Server.Implementations/IO/ProgressStream.cs deleted file mode 100644 index be1ff72f8e..0000000000 --- a/Emby.Server.Implementations/IO/ProgressStream.cs +++ /dev/null @@ -1,240 +0,0 @@ -using System; -using System.IO; - -namespace Emby.Server.Implementations.IO -{ - /// - /// Measures progress when reading from a stream or writing to one - /// - public class ProgressStream : Stream - { - /// - /// Gets the base stream. - /// - /// The base stream. - public Stream BaseStream { get; private set; } - - /// - /// Gets or sets the bytes processed. - /// - /// The bytes processed. - private long BytesProcessed { get; set; } - /// - /// Gets or sets the length of the write. - /// - /// The length of the write. - private long WriteLength { get; set; } - - /// - /// Gets or sets the length of the read. - /// - /// The length of the read. - private long? ReadLength { get; set; } - - /// - /// Gets or sets the progress action. - /// - /// The progress action. - private Action ProgressAction { get; set; } - - /// - /// Creates the read progress stream. - /// - /// The base stream. - /// The progress action. - /// Length of the read. - /// ProgressStream. - public static ProgressStream CreateReadProgressStream(Stream baseStream, Action progressAction, long? readLength = null) - { - return new ProgressStream - { - BaseStream = baseStream, - ProgressAction = progressAction, - ReadLength = readLength - }; - } - - /// - /// Creates the write progress stream. - /// - /// The base stream. - /// The progress action. - /// Length of the write. - /// ProgressStream. - public static ProgressStream CreateWriteProgressStream(Stream baseStream, Action progressAction, long writeLength) - { - return new ProgressStream - { - BaseStream = baseStream, - ProgressAction = progressAction, - WriteLength = writeLength - }; - } - - /// - /// When overridden in a derived class, gets a value indicating whether the current stream supports reading. - /// - /// true if this instance can read; otherwise, false. - /// true if the stream supports reading; otherwise, false. - public override bool CanRead - { - get { return BaseStream.CanRead; } - } - - /// - /// When overridden in a derived class, gets a value indicating whether the current stream supports seeking. - /// - /// true if this instance can seek; otherwise, false. - /// true if the stream supports seeking; otherwise, false. - public override bool CanSeek - { - get { return BaseStream.CanSeek; } - } - - /// - /// When overridden in a derived class, gets a value indicating whether the current stream supports writing. - /// - /// true if this instance can write; otherwise, false. - /// true if the stream supports writing; otherwise, false. - public override bool CanWrite - { - get { return BaseStream.CanWrite; } - } - - /// - /// When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device. - /// - public override void Flush() - { - BaseStream.Flush(); - } - - /// - /// When overridden in a derived class, gets the length in bytes of the stream. - /// - /// The length. - /// A long value representing the length of the stream in bytes. - public override long Length - { - get { return BaseStream.Length; } - } - - /// - /// When overridden in a derived class, gets or sets the position within the current stream. - /// - /// The position. - /// The current position within the stream. - public override long Position - { - get { return BaseStream.Position; } - set - { - BaseStream.Position = value; - } - } - - /// - /// When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. - /// - /// An array of bytes. When this method returns, the buffer contains the specified byte array with the values between and ( + - 1) replaced by the bytes read from the current source. - /// The zero-based byte offset in at which to begin storing the data read from the current stream. - /// The maximum number of bytes to be read from the current stream. - /// The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. - public override int Read(byte[] buffer, int offset, int count) - { - var read = BaseStream.Read(buffer, offset, count); - - BytesProcessed += read; - - double percent = BytesProcessed; - percent /= ReadLength ?? BaseStream.Length; - percent *= 100; - - ProgressAction(percent); - - return read; - } - - public override int EndRead(IAsyncResult asyncResult) - { - var read = base.EndRead(asyncResult); - - BytesProcessed += read; - - double percent = BytesProcessed; - percent /= ReadLength ?? BaseStream.Length; - percent *= 100; - - ProgressAction(percent); - - return read; - } - - /// - /// When overridden in a derived class, sets the position within the current stream. - /// - /// A byte offset relative to the parameter. - /// A value of type indicating the reference point used to obtain the new position. - /// The new position within the current stream. - public override long Seek(long offset, SeekOrigin origin) - { - return BaseStream.Seek(offset, origin); - } - - /// - /// When overridden in a derived class, sets the length of the current stream. - /// - /// The desired length of the current stream in bytes. - public override void SetLength(long value) - { - BaseStream.SetLength(value); - } - - /// - /// When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. - /// - /// An array of bytes. This method copies bytes from to the current stream. - /// The zero-based byte offset in at which to begin copying bytes to the current stream. - /// The number of bytes to be written to the current stream. - public override void Write(byte[] buffer, int offset, int count) - { - BaseStream.Write(buffer, offset, count); - - BytesProcessed += count; - - double percent = BytesProcessed; - percent /= WriteLength; - percent *= 100; - - ProgressAction(percent); - } - - public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) - { - var result = base.BeginWrite(buffer, offset, count, callback, state); - - BytesProcessed += count; - - double percent = BytesProcessed; - percent /= WriteLength; - percent *= 100; - - ProgressAction(percent); - - return result; - } - - /// - /// Releases the unmanaged resources used by the and optionally releases the managed resources. - /// - /// true to release both managed and unmanaged resources; false to release only unmanaged resources. - protected override void Dispose(bool disposing) - { - if (disposing) - { - BaseStream.Dispose(); - } - base.Dispose(disposing); - } - } -} diff --git a/Emby.Server.Implementations/Localization/Core/ar.json b/Emby.Server.Implementations/Localization/Core/ar.json index 0c2ab1f6d8..54200605dd 100644 --- a/Emby.Server.Implementations/Localization/Core/ar.json +++ b/Emby.Server.Implementations/Localization/Core/ar.json @@ -87,10 +87,5 @@ "User": "\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645", "System": "\u0627\u0644\u0646\u0638\u0627\u0645", "Application": "\u0627\u0644\u062a\u0637\u0628\u064a\u0642", - "Plugin": "\u0627\u0644\u0645\u0644\u062d\u0642", - "LabelExit": "\u062e\u0631\u0648\u062c", - "LabelVisitCommunity": "\u0632\u064a\u0627\u0631\u0629 \u0627\u0644\u0645\u062c\u062a\u0645\u0639", - "LabelBrowseLibrary": "\u062a\u0635\u0641\u062d \u0627\u0644\u0645\u0643\u062a\u0628\u0629", - "LabelConfigureServer": "\u0636\u0628\u0637 \u0625\u0639\u062f\u0627\u062f\u0627\u062a \u0623\u0645\u0628\u064a", - "LabelRestartServer": "\u0625\u0639\u0627\u062f\u0629 \u062a\u0634\u063a\u064a\u0644 \u0627\u0644\u062e\u0627\u062f\u0645" + "Plugin": "\u0627\u0644\u0645\u0644\u062d\u0642" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/bg-BG.json b/Emby.Server.Implementations/Localization/Core/bg-BG.json index 40899caabf..cc7611bf4a 100644 --- a/Emby.Server.Implementations/Localization/Core/bg-BG.json +++ b/Emby.Server.Implementations/Localization/Core/bg-BG.json @@ -6,7 +6,7 @@ "Music": "\u041c\u0443\u0437\u0438\u043a\u0430", "Games": "\u0418\u0433\u0440\u0438", "Photos": "\u0421\u043d\u0438\u043c\u043a\u0438", - "MixedContent": "Mixed content", + "MixedContent": "\u0421\u043c\u0435\u0441\u0435\u043d\u043e \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435", "MusicVideos": "\u041c\u0443\u0437\u0438\u043a\u0430\u043b\u043d\u0438 \u043a\u043b\u0438\u043f\u043e\u0432\u0435", "HomeVideos": "\u0414\u043e\u043c\u0430\u0448\u043d\u0438 \u043a\u043b\u0438\u043f\u043e\u0432\u0435", "Playlists": "\u0421\u043f\u0438\u0441\u044a\u0446\u0438", @@ -17,8 +17,8 @@ "HeaderAlbumArtists": "\u0418\u0437\u043f\u044a\u043b\u043d\u0438\u0442\u0435\u043b\u0438 \u043d\u0430 \u0430\u043b\u0431\u0443\u043c\u0438", "HeaderFavoriteAlbums": "\u041b\u044e\u0431\u0438\u043c\u0438 \u0430\u043b\u0431\u0443\u043c\u0438", "HeaderFavoriteEpisodes": "\u041b\u044e\u0431\u0438\u043c\u0438 \u0435\u043f\u0438\u0437\u043e\u0434\u0438", - "HeaderFavoriteShows": "Favorite Shows", - "HeaderNextUp": "Next Up", + "HeaderFavoriteShows": "\u041b\u044e\u0431\u0438\u043c\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438", + "HeaderNextUp": "\u0421\u043b\u0435\u0434\u0432\u0430", "Favorites": "\u041b\u044e\u0431\u0438\u043c\u0438", "Collections": "\u041a\u043e\u043b\u0435\u043a\u0446\u0438\u0438", "Channels": "\u041a\u0430\u043d\u0430\u043b\u0438", @@ -27,28 +27,28 @@ "Artists": "\u0418\u0437\u043f\u044a\u043b\u043d\u0438\u0442\u0435\u043b\u0438", "Folders": "\u041f\u0430\u043f\u043a\u0438", "Songs": "\u041f\u0435\u0441\u043d\u0438", - "TvShows": "TV Shows", + "TvShows": "\u0422\u0435\u043b\u0435\u0432\u0438\u0437\u0438\u043e\u043d\u043d\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438", "Shows": "\u0421\u0435\u0440\u0438\u0430\u043b\u0438", "Genres": "\u0416\u0430\u043d\u0440\u043e\u0432\u0435", "NameSeasonNumber": "\u0421\u0435\u0437\u043e\u043d {0}", - "AppDeviceValues": "App: {0}, Device: {1}", + "AppDeviceValues": "\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u0430: {0}, \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e: {1}", "UserDownloadingItemWithValues": "{0} is downloading {1}", - "HeaderLiveTV": "Live TV", - "ChapterNameValue": "Chapter {0}", + "HeaderLiveTV": "\u0422\u0435\u043b\u0435\u0432\u0438\u0437\u0438\u044f \u043d\u0430 \u0436\u0438\u0432\u043e", + "ChapterNameValue": "\u0413\u043b\u0430\u0432\u0430 {0}", "ScheduledTaskFailedWithName": "{0} failed", "LabelRunningTimeValue": "Running time: {0}", "ScheduledTaskStartedWithName": "{0} \u0437\u0430\u043f\u043e\u0447\u043d\u0430", - "VersionNumber": "Version {0}", - "PluginInstalledWithName": "{0} was installed", - "StartupEmbyServerIsLoading": "Emby Server is loading. Please try again shortly.", - "PluginUpdatedWithName": "{0} was updated", + "VersionNumber": "\u0412\u0435\u0440\u0441\u0438\u044f {0}", + "PluginInstalledWithName": "{0} \u0435 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043d\u043e", + "StartupEmbyServerIsLoading": "\u0421\u044a\u0440\u0432\u044a\u0440\u044a\u0442 \u0437\u0430\u0440\u0435\u0436\u0434\u0430. \u041c\u043e\u043b\u044f, \u043e\u043f\u0438\u0442\u0430\u0439\u0442\u0435 \u043e\u0442\u043d\u043e\u0432\u043e \u0441\u043b\u0435\u0434 \u043c\u0430\u043b\u043a\u043e.", + "PluginUpdatedWithName": "{0} \u0435 \u043e\u0431\u043d\u043e\u0432\u0435\u043d\u043e", "PluginUninstalledWithName": "{0} \u0435 \u0434\u0435\u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043d\u043e", - "ItemAddedWithName": "{0} was added to the library", - "ItemRemovedWithName": "{0} was removed from the library", - "LabelIpAddressValue": "Ip address: {0}", - "DeviceOnlineWithName": "{0} is connected", - "UserOnlineFromDevice": "{0} is online from {1}", - "ProviderValue": "Provider: {0}", + "ItemAddedWithName": "{0} \u0435 \u0434\u043e\u0431\u0430\u0432\u0435\u043d\u043e \u043a\u044a\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0442\u0430", + "ItemRemovedWithName": "{0} \u0435 \u043f\u0440\u0435\u043c\u0430\u0445\u043d\u0430\u0442\u043e \u043e\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0442\u0430", + "LabelIpAddressValue": "\u0418\u041f \u0430\u0434\u0440\u0435\u0441: {0}", + "DeviceOnlineWithName": "{0} \u0435 \u0441\u0432\u044a\u0440\u0437\u0430\u043d", + "UserOnlineFromDevice": "{0} \u0435 \u043d\u0430 \u043b\u0438\u043d\u0438\u044f \u043e\u0442 {1}", + "ProviderValue": "\u0414\u043e\u0441\u0442\u0430\u0432\u0447\u0438\u043a: {0}", "SubtitlesDownloadedForItem": "Subtitles downloaded for {0}", "UserCreatedWithName": "User {0} has been created", "UserPasswordChangedWithName": "Password has been changed for user {0}", @@ -77,7 +77,7 @@ "NotificationOptionGamePlaybackStopped": "Game playback stopped", "NotificationOptionTaskFailed": "Scheduled task failure", "NotificationOptionInstallationFailed": "Installation failure", - "NotificationOptionNewLibraryContent": "New content added", + "NotificationOptionNewLibraryContent": "\u0414\u043e\u0431\u0430\u0432\u0435\u043d\u043e \u0435 \u043d\u043e\u0432\u043e \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435", "NotificationOptionCameraImageUploaded": "Camera image uploaded", "NotificationOptionUserLockedOut": "User locked out", "NotificationOptionServerRestartRequired": "\u041d\u0443\u0436\u043d\u043e \u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043f\u0443\u0441\u043a\u0430\u043d\u0435 \u043d\u0430 \u0441\u044a\u0440\u0432\u044a\u0440\u0430", @@ -86,11 +86,6 @@ "Sync": "\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0430\u043d\u0435", "User": "\u041f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b", "System": "\u0421\u0438\u0441\u0442\u0435\u043c\u0430", - "Application": "Application", - "Plugin": "Plugin", - "LabelExit": "Exit", - "LabelVisitCommunity": "\u041f\u043e\u0441\u0435\u0442\u0435\u0442\u0435 \u043e\u0431\u0449\u043d\u043e\u0441\u0442\u0442\u0430", - "LabelBrowseLibrary": "\u0420\u0430\u0437\u0433\u043b\u0435\u0436\u0434\u0430\u043d\u0435 \u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0442\u0430", - "LabelConfigureServer": "\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0415\u043c\u0431\u0438", - "LabelRestartServer": "\u041f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043f\u0443\u0441\u043a\u0430\u043d\u0435 \u043d\u0430 \u0441\u044a\u0440\u0432\u044a\u0440\u0430" + "Application": "\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u0430", + "Plugin": "\u041f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0430" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/ca.json b/Emby.Server.Implementations/Localization/Core/ca.json index cc2c00234f..f21a0b2953 100644 --- a/Emby.Server.Implementations/Localization/Core/ca.json +++ b/Emby.Server.Implementations/Localization/Core/ca.json @@ -87,10 +87,5 @@ "User": "User", "System": "System", "Application": "Application", - "Plugin": "Plugin", - "LabelExit": "Exit", - "LabelVisitCommunity": "Visit Community", - "LabelBrowseLibrary": "Browse Library", - "LabelConfigureServer": "Configure Emby", - "LabelRestartServer": "Restart Server" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/cs.json b/Emby.Server.Implementations/Localization/Core/cs.json index abbfde3800..82d8699a7e 100644 --- a/Emby.Server.Implementations/Localization/Core/cs.json +++ b/Emby.Server.Implementations/Localization/Core/cs.json @@ -87,10 +87,5 @@ "User": "U\u017eivatel", "System": "Syst\u00e9m", "Application": "Aplikace", - "Plugin": "Z\u00e1suvn\u00fd modul", - "LabelExit": "Uko\u010dit", - "LabelVisitCommunity": "Nav\u0161t\u00edvit komunitu", - "LabelBrowseLibrary": "Proch\u00e1zet knihovnu", - "LabelConfigureServer": "Konfigurovat Emby", - "LabelRestartServer": "Restartovat Server" + "Plugin": "Z\u00e1suvn\u00fd modul" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/da.json b/Emby.Server.Implementations/Localization/Core/da.json index ed9652c33d..eb05943f94 100644 --- a/Emby.Server.Implementations/Localization/Core/da.json +++ b/Emby.Server.Implementations/Localization/Core/da.json @@ -87,10 +87,5 @@ "User": "Bruger", "System": "System", "Application": "Applikation", - "Plugin": "Plugin", - "LabelExit": "Afslut", - "LabelVisitCommunity": "Bes\u00f8g F\u00e6llesskab", - "LabelBrowseLibrary": "Gennemse Bibliotek", - "LabelConfigureServer": "Konfigurer Emby", - "LabelRestartServer": "Genstart Server" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/de.json b/Emby.Server.Implementations/Localization/Core/de.json index 183b4aaf8a..7bab689ebb 100644 --- a/Emby.Server.Implementations/Localization/Core/de.json +++ b/Emby.Server.Implementations/Localization/Core/de.json @@ -87,10 +87,5 @@ "User": "Benutzer", "System": "System", "Application": "Anwendung", - "Plugin": "Plugin", - "LabelExit": "Beenden", - "LabelVisitCommunity": "Besuche die Community", - "LabelBrowseLibrary": "Bibliothek durchsuchen", - "LabelConfigureServer": "Konfiguriere Emby", - "LabelRestartServer": "Server neustarten" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/en-GB.json b/Emby.Server.Implementations/Localization/Core/en-GB.json index 8dc9abf012..62db5a358a 100644 --- a/Emby.Server.Implementations/Localization/Core/en-GB.json +++ b/Emby.Server.Implementations/Localization/Core/en-GB.json @@ -87,10 +87,5 @@ "User": "User", "System": "System", "Application": "Application", - "Plugin": "Plugin", - "LabelExit": "Exit", - "LabelVisitCommunity": "Visit Community", - "LabelBrowseLibrary": "Browse Library", - "LabelConfigureServer": "Configure Emby", - "LabelRestartServer": "Restart Server" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/es-AR.json b/Emby.Server.Implementations/Localization/Core/es-AR.json index e4a49abf64..c48042d9a3 100644 --- a/Emby.Server.Implementations/Localization/Core/es-AR.json +++ b/Emby.Server.Implementations/Localization/Core/es-AR.json @@ -87,10 +87,5 @@ "User": "User", "System": "System", "Application": "Application", - "Plugin": "Plugin", - "LabelExit": "Exit", - "LabelVisitCommunity": "Visit Community", - "LabelBrowseLibrary": "Browse Library", - "LabelConfigureServer": "Configure Emby", - "LabelRestartServer": "Restart Server" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/es-MX.json b/Emby.Server.Implementations/Localization/Core/es-MX.json index 45cc2c69b2..303df142ae 100644 --- a/Emby.Server.Implementations/Localization/Core/es-MX.json +++ b/Emby.Server.Implementations/Localization/Core/es-MX.json @@ -87,10 +87,5 @@ "User": "Usuario", "System": "Sistema", "Application": "Aplicaci\u00f3n", - "Plugin": "Complemento", - "LabelExit": "Salir", - "LabelVisitCommunity": "Visitar la Comunidad", - "LabelBrowseLibrary": "Explorar Biblioteca", - "LabelConfigureServer": "Configurar Emby", - "LabelRestartServer": "Reiniciar el Servidor" + "Plugin": "Complemento" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/es.json b/Emby.Server.Implementations/Localization/Core/es.json index 68975d6322..c7fa51c03c 100644 --- a/Emby.Server.Implementations/Localization/Core/es.json +++ b/Emby.Server.Implementations/Localization/Core/es.json @@ -27,7 +27,7 @@ "Artists": "Artistas", "Folders": "Carpetas", "Songs": "Canciones", - "TvShows": "TV Shows", + "TvShows": "Series TV", "Shows": "Series", "Genres": "G\u00e9neros", "NameSeasonNumber": "Temporada {0}", @@ -61,8 +61,8 @@ "AuthenticationSucceededWithUserName": "{0} autenticado correctamente", "UserOfflineFromDevice": "{0} se ha desconectado de {1}", "DeviceOfflineWithName": "{0} se ha desconectado", - "UserStartedPlayingItemWithValues": "{0} ha comenzado jugando {1}", - "UserStoppedPlayingItemWithValues": "{0} ha dejado de reproducir {1}", + "UserStartedPlayingItemWithValues": "{0} ha comenzado reproducir {1}", + "UserStoppedPlayingItemWithValues": "{0} ha parado de reproducir {1}", "NotificationOptionPluginError": "Error en plugin", "NotificationOptionApplicationUpdateAvailable": "Actualizaci\u00f3n de la aplicaci\u00f3n disponible", "NotificationOptionApplicationUpdateInstalled": "Actualizaci\u00f3n de la aplicaci\u00f3n instalada", @@ -87,10 +87,5 @@ "User": "Usuario", "System": "Sistema", "Application": "Aplicaci\u00f3n", - "Plugin": "Plugin", - "LabelExit": "Salida", - "LabelVisitCommunity": "Visita la Comunidad", - "LabelBrowseLibrary": "Navegar la biblioteca", - "LabelConfigureServer": "Configurar Emby", - "LabelRestartServer": "Configurar Emby" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/fr-CA.json b/Emby.Server.Implementations/Localization/Core/fr-CA.json index 795bc98cc5..7743905f0e 100644 --- a/Emby.Server.Implementations/Localization/Core/fr-CA.json +++ b/Emby.Server.Implementations/Localization/Core/fr-CA.json @@ -87,10 +87,5 @@ "User": "User", "System": "System", "Application": "Application", - "Plugin": "Plugin", - "LabelExit": "Exit", - "LabelVisitCommunity": "Visit Community", - "LabelBrowseLibrary": "Browse Library", - "LabelConfigureServer": "Configure Emby", - "LabelRestartServer": "Restart Server" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/fr.json b/Emby.Server.Implementations/Localization/Core/fr.json index 5ea01fcdbb..953d7f4347 100644 --- a/Emby.Server.Implementations/Localization/Core/fr.json +++ b/Emby.Server.Implementations/Localization/Core/fr.json @@ -87,10 +87,5 @@ "User": "Utilisateur", "System": "Syst\u00e8me", "Application": "Application", - "Plugin": "Extension", - "LabelExit": "Quitter", - "LabelVisitCommunity": "Visiter la communaut\u00e9", - "LabelBrowseLibrary": "Parcourir la m\u00e9diath\u00e8que", - "LabelConfigureServer": "Configurer Emby", - "LabelRestartServer": "Red\u00e9marrer le serveur" + "Plugin": "Extension" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/he.json b/Emby.Server.Implementations/Localization/Core/he.json index f287dc4222..c679ed289c 100644 --- a/Emby.Server.Implementations/Localization/Core/he.json +++ b/Emby.Server.Implementations/Localization/Core/he.json @@ -87,10 +87,5 @@ "User": "User", "System": "System", "Application": "Application", - "Plugin": "Plugin", - "LabelExit": "Exit", - "LabelVisitCommunity": "Visit Community", - "LabelBrowseLibrary": "Browse Library", - "LabelConfigureServer": "Configure Emby", - "LabelRestartServer": "Restart Server" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/hr.json b/Emby.Server.Implementations/Localization/Core/hr.json index 143e3ab820..c807e53b40 100644 --- a/Emby.Server.Implementations/Localization/Core/hr.json +++ b/Emby.Server.Implementations/Localization/Core/hr.json @@ -87,10 +87,5 @@ "User": "Korisnik", "System": "Sistem", "Application": "Aplikacija", - "Plugin": "Dodatak", - "LabelExit": "Izlaz", - "LabelVisitCommunity": "Posjeti zajednicu", - "LabelBrowseLibrary": "Pregledaj biblioteku", - "LabelConfigureServer": "Podesi Emby", - "LabelRestartServer": "Restartiraj Server" + "Plugin": "Dodatak" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/hu.json b/Emby.Server.Implementations/Localization/Core/hu.json index 39d0f80613..dc8f2b7029 100644 --- a/Emby.Server.Implementations/Localization/Core/hu.json +++ b/Emby.Server.Implementations/Localization/Core/hu.json @@ -87,10 +87,5 @@ "User": "User", "System": "System", "Application": "Application", - "Plugin": "Plugin", - "LabelExit": "Kil\u00e9p\u00e9s", - "LabelVisitCommunity": "K\u00f6z\u00f6ss\u00e9g", - "LabelBrowseLibrary": "M\u00e9diat\u00e1r tall\u00f3z\u00e1sa", - "LabelConfigureServer": "Emby konfigur\u00e1l\u00e1sa", - "LabelRestartServer": "Szerver \u00fajraindit\u00e1sa" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/it.json b/Emby.Server.Implementations/Localization/Core/it.json index 4ff0d98d83..42605acdb2 100644 --- a/Emby.Server.Implementations/Localization/Core/it.json +++ b/Emby.Server.Implementations/Localization/Core/it.json @@ -87,10 +87,5 @@ "User": "Utente", "System": "Sistema", "Application": "Applicazione", - "Plugin": "Plug-in", - "LabelExit": "Esci", - "LabelVisitCommunity": "Visita il forum di discussione", - "LabelBrowseLibrary": "Esplora la libreria", - "LabelConfigureServer": "Configura Emby", - "LabelRestartServer": "Riavvia Server" + "Plugin": "Plug-in" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/kk.json b/Emby.Server.Implementations/Localization/Core/kk.json index c24ee3d13b..a991fe3634 100644 --- a/Emby.Server.Implementations/Localization/Core/kk.json +++ b/Emby.Server.Implementations/Localization/Core/kk.json @@ -87,10 +87,5 @@ "User": "\u041f\u0430\u0439\u0434\u0430\u043b\u0430\u043d\u0443\u0448\u044b", "System": "\u0416\u04af\u0439\u0435", "Application": "\u049a\u043e\u043b\u0434\u0430\u043d\u0431\u0430", - "Plugin": "\u041f\u043b\u0430\u0433\u0438\u043d", - "LabelExit": "\u0428\u044b\u0493\u0443", - "LabelVisitCommunity": "\u049a\u0430\u0443\u044b\u043c\u0434\u0430\u0441\u0442\u044b\u049b\u049b\u0430 \u0431\u0430\u0440\u0443", - "LabelBrowseLibrary": "\u0422\u0430\u0441\u044b\u0493\u044b\u0448\u0445\u0430\u043d\u0430\u043d\u044b \u0448\u043e\u043b\u0443", - "LabelConfigureServer": "Emby \u0442\u0435\u04a3\u0448\u0435\u0443", - "LabelRestartServer": "\u0421\u0435\u0440\u0432\u0435\u0440\u0434\u0456 \u049b\u0430\u0439\u0442\u0430 \u0456\u0441\u043a\u0435 \u049b\u043e\u0441\u0443" + "Plugin": "\u041f\u043b\u0430\u0433\u0438\u043d" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/ko.json b/Emby.Server.Implementations/Localization/Core/ko.json index 6c5ed0260a..0f99c8432a 100644 --- a/Emby.Server.Implementations/Localization/Core/ko.json +++ b/Emby.Server.Implementations/Localization/Core/ko.json @@ -87,10 +87,5 @@ "User": "User", "System": "System", "Application": "Application", - "Plugin": "Plugin", - "LabelExit": "Exit", - "LabelVisitCommunity": "Visit Community", - "LabelBrowseLibrary": "Browse Library", - "LabelConfigureServer": "Configure Emby", - "LabelRestartServer": "Restart Server" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/lt-LT.json b/Emby.Server.Implementations/Localization/Core/lt-LT.json index 21ed36d7c6..9e1fede1d8 100644 --- a/Emby.Server.Implementations/Localization/Core/lt-LT.json +++ b/Emby.Server.Implementations/Localization/Core/lt-LT.json @@ -87,10 +87,5 @@ "User": "User", "System": "System", "Application": "Application", - "Plugin": "Plugin", - "LabelExit": "Exit", - "LabelVisitCommunity": "Visit Community", - "LabelBrowseLibrary": "Browse Library", - "LabelConfigureServer": "Configure Emby", - "LabelRestartServer": "Restart Server" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/ms.json b/Emby.Server.Implementations/Localization/Core/ms.json index e4a49abf64..c48042d9a3 100644 --- a/Emby.Server.Implementations/Localization/Core/ms.json +++ b/Emby.Server.Implementations/Localization/Core/ms.json @@ -87,10 +87,5 @@ "User": "User", "System": "System", "Application": "Application", - "Plugin": "Plugin", - "LabelExit": "Exit", - "LabelVisitCommunity": "Visit Community", - "LabelBrowseLibrary": "Browse Library", - "LabelConfigureServer": "Configure Emby", - "LabelRestartServer": "Restart Server" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/nb.json b/Emby.Server.Implementations/Localization/Core/nb.json index d0482315d8..5cd9894bed 100644 --- a/Emby.Server.Implementations/Localization/Core/nb.json +++ b/Emby.Server.Implementations/Localization/Core/nb.json @@ -87,10 +87,5 @@ "User": "Bruker", "System": "System", "Application": "Applikasjon", - "Plugin": "Plugin", - "LabelExit": "Avslutt", - "LabelVisitCommunity": "Bes\u00f8k Samfunnet", - "LabelBrowseLibrary": "Bla i biblioteket", - "LabelConfigureServer": "Konfigurere Emby", - "LabelRestartServer": "Start om serveren" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/nl.json b/Emby.Server.Implementations/Localization/Core/nl.json index daba9bed5c..d79fcf7474 100644 --- a/Emby.Server.Implementations/Localization/Core/nl.json +++ b/Emby.Server.Implementations/Localization/Core/nl.json @@ -87,10 +87,5 @@ "User": "Gebruiker", "System": "Systeem", "Application": "Toepassing", - "Plugin": "Plug-in", - "LabelExit": "Afsluiten", - "LabelVisitCommunity": "Bezoek Gemeenschap", - "LabelBrowseLibrary": "Bekijk bibliotheek", - "LabelConfigureServer": "Emby Configureren", - "LabelRestartServer": "Server herstarten" + "Plugin": "Plug-in" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/pl.json b/Emby.Server.Implementations/Localization/Core/pl.json index 24ac0d973e..896df24dd2 100644 --- a/Emby.Server.Implementations/Localization/Core/pl.json +++ b/Emby.Server.Implementations/Localization/Core/pl.json @@ -27,7 +27,7 @@ "Artists": "Wykonawcy", "Folders": "Foldery", "Songs": "Utwory", - "TvShows": "TV Shows", + "TvShows": "Seriale", "Shows": "Seriale", "Genres": "Gatunki", "NameSeasonNumber": "Sezon {0}", @@ -87,10 +87,5 @@ "User": "U\u017cytkownik", "System": "System", "Application": "Aplikacja", - "Plugin": "Wtyczka", - "LabelExit": "Wyj\u015bcie", - "LabelVisitCommunity": "Odwied\u017a spo\u0142eczno\u015b\u0107", - "LabelBrowseLibrary": "Przegl\u0105daj bibliotek\u0119", - "LabelConfigureServer": "Konfiguracja Emby", - "LabelRestartServer": "Uruchom serwer ponownie" + "Plugin": "Wtyczka" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/pt-BR.json b/Emby.Server.Implementations/Localization/Core/pt-BR.json index 196a6b78b3..fa4eac1c49 100644 --- a/Emby.Server.Implementations/Localization/Core/pt-BR.json +++ b/Emby.Server.Implementations/Localization/Core/pt-BR.json @@ -87,10 +87,5 @@ "User": "Usu\u00e1rio", "System": "Sistema", "Application": "Aplicativo", - "Plugin": "Plugin", - "LabelExit": "Sair", - "LabelVisitCommunity": "Visite a Comunidade", - "LabelBrowseLibrary": "Explorar Biblioteca", - "LabelConfigureServer": "Configurar Emby", - "LabelRestartServer": "Reiniciar Servidor" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/pt-PT.json b/Emby.Server.Implementations/Localization/Core/pt-PT.json index 7a6b8f4195..ac20fa1e54 100644 --- a/Emby.Server.Implementations/Localization/Core/pt-PT.json +++ b/Emby.Server.Implementations/Localization/Core/pt-PT.json @@ -87,10 +87,5 @@ "User": "User", "System": "System", "Application": "Aplica\u00e7\u00e3o", - "Plugin": "Plugin", - "LabelExit": "Exit", - "LabelVisitCommunity": "Visit Community", - "LabelBrowseLibrary": "Browse Library", - "LabelConfigureServer": "Configure Emby", - "LabelRestartServer": "Restart Server" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/ru.json b/Emby.Server.Implementations/Localization/Core/ru.json index d27b1ca93d..12345ca145 100644 --- a/Emby.Server.Implementations/Localization/Core/ru.json +++ b/Emby.Server.Implementations/Localization/Core/ru.json @@ -87,10 +87,5 @@ "User": "\u041f\u043e\u043b\u044c\u0437-\u043b\u044c", "System": "\u0421\u0438\u0441\u0442\u0435\u043c\u0430", "Application": "\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435", - "Plugin": "\u041f\u043b\u0430\u0433\u0438\u043d", - "LabelExit": "\u0412\u044b\u0445\u043e\u0434", - "LabelVisitCommunity": "\u041f\u043e\u0441\u0435\u0449\u0435\u043d\u0438\u0435 \u0421\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430", - "LabelBrowseLibrary": "\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u043f\u043e \u043c\u0435\u0434\u0438\u0430\u0442\u0435\u043a\u0435", - "LabelConfigureServer": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Emby", - "LabelRestartServer": "\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0430" + "Plugin": "\u041f\u043b\u0430\u0433\u0438\u043d" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/sk.json b/Emby.Server.Implementations/Localization/Core/sk.json index 98f60e5e1d..aa6ada9123 100644 --- a/Emby.Server.Implementations/Localization/Core/sk.json +++ b/Emby.Server.Implementations/Localization/Core/sk.json @@ -87,10 +87,5 @@ "User": "User", "System": "System", "Application": "Application", - "Plugin": "Plugin", - "LabelExit": "Exit", - "LabelVisitCommunity": "Visit Community", - "LabelBrowseLibrary": "Browse Library", - "LabelConfigureServer": "Configure Emby", - "LabelRestartServer": "Restart Server" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/sl-SI.json b/Emby.Server.Implementations/Localization/Core/sl-SI.json index cb8e080e45..27561a890b 100644 --- a/Emby.Server.Implementations/Localization/Core/sl-SI.json +++ b/Emby.Server.Implementations/Localization/Core/sl-SI.json @@ -87,10 +87,5 @@ "User": "User", "System": "System", "Application": "Application", - "Plugin": "Plugin", - "LabelExit": "Exit", - "LabelVisitCommunity": "Visit Community", - "LabelBrowseLibrary": "Browse Library", - "LabelConfigureServer": "Configure Emby", - "LabelRestartServer": "Restart Server" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/sv.json b/Emby.Server.Implementations/Localization/Core/sv.json index a038811837..c43bd79a6d 100644 --- a/Emby.Server.Implementations/Localization/Core/sv.json +++ b/Emby.Server.Implementations/Localization/Core/sv.json @@ -87,10 +87,5 @@ "User": "Anv\u00e4ndare", "System": "System", "Application": "App", - "Plugin": "Till\u00e4gg", - "LabelExit": "Avsluta", - "LabelVisitCommunity": "Bes\u00f6k v\u00e5rt diskussionsforum", - "LabelBrowseLibrary": "Bl\u00e4ddra i biblioteket", - "LabelConfigureServer": "Konfigurera Emby", - "LabelRestartServer": "Starta om servern" + "Plugin": "Till\u00e4gg" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/tr.json b/Emby.Server.Implementations/Localization/Core/tr.json index a0a5151707..71af4110d6 100644 --- a/Emby.Server.Implementations/Localization/Core/tr.json +++ b/Emby.Server.Implementations/Localization/Core/tr.json @@ -87,10 +87,5 @@ "User": "User", "System": "System", "Application": "Application", - "Plugin": "Plugin", - "LabelExit": "Exit", - "LabelVisitCommunity": "Visit Community", - "LabelBrowseLibrary": "Browse Library", - "LabelConfigureServer": "Configure Emby", - "LabelRestartServer": "Restart Server" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/zh-CN.json b/Emby.Server.Implementations/Localization/Core/zh-CN.json index 42126ca1b6..0f248f3cd2 100644 --- a/Emby.Server.Implementations/Localization/Core/zh-CN.json +++ b/Emby.Server.Implementations/Localization/Core/zh-CN.json @@ -87,10 +87,5 @@ "User": "\u7528\u6237", "System": "\u7cfb\u7edf", "Application": "\u5e94\u7528\u7a0b\u5e8f", - "Plugin": "\u63d2\u4ef6", - "LabelExit": "\u9000\u51fa", - "LabelVisitCommunity": "\u8bbf\u95ee\u793e\u533a", - "LabelBrowseLibrary": "\u6d4f\u89c8\u5a92\u4f53\u5e93", - "LabelConfigureServer": "\u914d\u7f6e Emby", - "LabelRestartServer": "\u91cd\u542f\u670d\u52a1\u5668" + "Plugin": "\u63d2\u4ef6" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/zh-HK.json b/Emby.Server.Implementations/Localization/Core/zh-HK.json index 37afc47e61..b60edb176e 100644 --- a/Emby.Server.Implementations/Localization/Core/zh-HK.json +++ b/Emby.Server.Implementations/Localization/Core/zh-HK.json @@ -87,10 +87,5 @@ "User": "User", "System": "System", "Application": "Application", - "Plugin": "Plugin", - "LabelExit": "Exit", - "LabelVisitCommunity": "\u8a2a\u554f\u8a0e\u8ad6\u5340", - "LabelBrowseLibrary": "Browse Library", - "LabelConfigureServer": "Configure Emby", - "LabelRestartServer": "Restart Server" + "Plugin": "Plugin" } \ No newline at end of file diff --git a/Emby.Server.Implementations/ScheduledTasks/ScheduledTaskWorker.cs b/Emby.Server.Implementations/ScheduledTasks/ScheduledTaskWorker.cs index d7d048110e..bdc29c16b7 100644 --- a/Emby.Server.Implementations/ScheduledTasks/ScheduledTaskWorker.cs +++ b/Emby.Server.Implementations/ScheduledTasks/ScheduledTaskWorker.cs @@ -464,6 +464,8 @@ namespace Emby.Server.Implementations.ScheduledTasks /// The e. void progress_ProgressChanged(object sender, double e) { + e = Math.Min(e, 100); + CurrentProgress = e; EventHelper.FireEventIfNotNull(TaskProgress, this, new GenericEventArgs diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 5b4cd59001..7f6949feba 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -1376,11 +1376,6 @@ namespace MediaBrowser.Controller.Entities return list; } - internal virtual bool IsValidFromResolver(BaseItem newItem) - { - return true; - } - internal virtual ItemUpdateType UpdateFromResolvedItem(BaseItem newItem) { var updateType = ItemUpdateType.None; diff --git a/MediaBrowser.Controller/Entities/CollectionFolder.cs b/MediaBrowser.Controller/Entities/CollectionFolder.cs index 5fb9e517c8..03fca60c89 100644 --- a/MediaBrowser.Controller/Entities/CollectionFolder.cs +++ b/MediaBrowser.Controller/Entities/CollectionFolder.cs @@ -265,21 +265,6 @@ namespace MediaBrowser.Controller.Entities return changed; } - internal override bool IsValidFromResolver(BaseItem newItem) - { - var newCollectionFolder = newItem as CollectionFolder; - - if (newCollectionFolder != null) - { - if (!string.Equals(CollectionType, newCollectionFolder.CollectionType, StringComparison.OrdinalIgnoreCase)) - { - return false; - } - } - - return base.IsValidFromResolver(newItem); - } - private ItemResolveArgs CreateResolveArgs(IDirectoryService directoryService, bool setPhysicalLocations) { var path = ContainingFolderPath; diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index 12183aec2f..fb283067f3 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -416,7 +416,7 @@ namespace MediaBrowser.Controller.Entities { BaseItem currentChild; - if (currentChildren.TryGetValue(child.Id, out currentChild) && currentChild.IsValidFromResolver(child)) + if (currentChildren.TryGetValue(child.Id, out currentChild)) { validChildren.Add(currentChild); diff --git a/MediaBrowser.Controller/IO/StreamHelper.cs b/MediaBrowser.Controller/IO/StreamHelper.cs index 106fec41fc..5aec9a1828 100644 --- a/MediaBrowser.Controller/IO/StreamHelper.cs +++ b/MediaBrowser.Controller/IO/StreamHelper.cs @@ -1,6 +1,7 @@ using System.IO; using System.Threading; using System; +using System.Threading.Tasks; namespace MediaBrowser.Controller.IO { @@ -23,5 +24,27 @@ namespace MediaBrowser.Controller.IO } } } + + public static async Task CopyToAsync(Stream source, Stream destination, int bufferSize, IProgress progress, long contentLength, CancellationToken cancellationToken) + { + byte[] buffer = new byte[bufferSize]; + int read; + long totalRead = 0; + + while ((read = source.Read(buffer, 0, buffer.Length)) != 0) + { + cancellationToken.ThrowIfCancellationRequested(); + + destination.Write(buffer, 0, read); + + totalRead += read; + + double pct = totalRead; + pct /= contentLength; + pct *= 100; + + progress.Report(pct); + } + } } } From b9c1f61681de23d95de7c6b392eb3e55670991da Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 3 Nov 2017 14:11:21 -0400 Subject: [PATCH 2/2] update support for moviedb urls in nfo files --- Emby.Server.Implementations/Networking/NetworkManager.cs | 2 +- MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs | 4 ++-- SharedVersion.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Emby.Server.Implementations/Networking/NetworkManager.cs b/Emby.Server.Implementations/Networking/NetworkManager.cs index 72d0154aa5..f8f7da78ae 100644 --- a/Emby.Server.Implementations/Networking/NetworkManager.cs +++ b/Emby.Server.Implementations/Networking/NetworkManager.cs @@ -106,7 +106,7 @@ namespace Emby.Server.Implementations.Networking endpoint.StartsWith("127.", StringComparison.OrdinalIgnoreCase) || endpoint.StartsWith("192.168", StringComparison.OrdinalIgnoreCase) || endpoint.StartsWith("169.", StringComparison.OrdinalIgnoreCase) || - endpoint.StartsWith("10.", StringComparison.OrdinalIgnoreCase) || + //endpoint.StartsWith("10.", StringComparison.OrdinalIgnoreCase) || IsInPrivateAddressSpaceAndLocalSubnet(endpoint); } diff --git a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs index c1c2e7d9dc..689f175f37 100644 --- a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs +++ b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs @@ -243,13 +243,13 @@ namespace MediaBrowser.XbmcMetadata.Parsers } // Support Tmdb - // http://www.themoviedb.org/movie/36557 + // https://www.themoviedb.org/movie/30287-fallo var srch = MovieDbParserSearchString; var index = xml.IndexOf(srch, StringComparison.OrdinalIgnoreCase); if (index != -1) { - var tmdbId = xml.Substring(index + srch.Length).TrimEnd('/'); + var tmdbId = xml.Substring(index + srch.Length).TrimEnd('/').Split('-')[0]; int value; if (!string.IsNullOrWhiteSpace(tmdbId) && int.TryParse(tmdbId, NumberStyles.Any, CultureInfo.InvariantCulture, out value)) { diff --git a/SharedVersion.cs b/SharedVersion.cs index e61a50da28..74a0759e3c 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.35.2")] +[assembly: AssemblyVersion("3.2.36.1")]