Merge pull request #3001 from MediaBrowser/dev

Dev
This commit is contained in:
Luke 2017-11-03 14:16:30 -04:00 committed by GitHub
commit 2bffe246eb
43 changed files with 88 additions and 486 deletions

View File

@ -117,7 +117,6 @@
<Compile Include="IO\ManagedFileSystem.cs" /> <Compile Include="IO\ManagedFileSystem.cs" />
<Compile Include="IO\MbLinkShortcutHandler.cs" /> <Compile Include="IO\MbLinkShortcutHandler.cs" />
<Compile Include="IO\MemoryStreamProvider.cs" /> <Compile Include="IO\MemoryStreamProvider.cs" />
<Compile Include="IO\ProgressStream.cs" />
<Compile Include="IO\SharpCifsFileSystem.cs" /> <Compile Include="IO\SharpCifsFileSystem.cs" />
<Compile Include="IO\SharpCifs\Config.cs" /> <Compile Include="IO\SharpCifs\Config.cs" />
<Compile Include="IO\SharpCifs\Dcerpc\DcerpcBind.cs" /> <Compile Include="IO\SharpCifs\Dcerpc\DcerpcBind.cs" />

View File

@ -16,6 +16,7 @@ using MediaBrowser.Common.Net;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using MediaBrowser.Model.Logging; using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Net; using MediaBrowser.Model.Net;
using MediaBrowser.Controller.IO;
namespace Emby.Server.Implementations.HttpClientManager namespace Emby.Server.Implementations.HttpClientManager
{ {
@ -633,12 +634,9 @@ namespace Emby.Server.Implementations.HttpClientManager
} }
else 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 StreamHelper.CopyToAsync(httpResponse.GetResponseStream(), fs, StreamDefaults.DefaultCopyToBufferSize, options.Progress, contentLength.Value, options.CancellationToken).ConfigureAwait(false);
{
await stream.CopyToAsync(fs, StreamDefaults.DefaultCopyToBufferSize, options.CancellationToken).ConfigureAwait(false);
}
} }
} }

View File

@ -1,240 +0,0 @@
using System;
using System.IO;
namespace Emby.Server.Implementations.IO
{
/// <summary>
/// Measures progress when reading from a stream or writing to one
/// </summary>
public class ProgressStream : Stream
{
/// <summary>
/// Gets the base stream.
/// </summary>
/// <value>The base stream.</value>
public Stream BaseStream { get; private set; }
/// <summary>
/// Gets or sets the bytes processed.
/// </summary>
/// <value>The bytes processed.</value>
private long BytesProcessed { get; set; }
/// <summary>
/// Gets or sets the length of the write.
/// </summary>
/// <value>The length of the write.</value>
private long WriteLength { get; set; }
/// <summary>
/// Gets or sets the length of the read.
/// </summary>
/// <value>The length of the read.</value>
private long? ReadLength { get; set; }
/// <summary>
/// Gets or sets the progress action.
/// </summary>
/// <value>The progress action.</value>
private Action<double> ProgressAction { get; set; }
/// <summary>
/// Creates the read progress stream.
/// </summary>
/// <param name="baseStream">The base stream.</param>
/// <param name="progressAction">The progress action.</param>
/// <param name="readLength">Length of the read.</param>
/// <returns>ProgressStream.</returns>
public static ProgressStream CreateReadProgressStream(Stream baseStream, Action<double> progressAction, long? readLength = null)
{
return new ProgressStream
{
BaseStream = baseStream,
ProgressAction = progressAction,
ReadLength = readLength
};
}
/// <summary>
/// Creates the write progress stream.
/// </summary>
/// <param name="baseStream">The base stream.</param>
/// <param name="progressAction">The progress action.</param>
/// <param name="writeLength">Length of the write.</param>
/// <returns>ProgressStream.</returns>
public static ProgressStream CreateWriteProgressStream(Stream baseStream, Action<double> progressAction, long writeLength)
{
return new ProgressStream
{
BaseStream = baseStream,
ProgressAction = progressAction,
WriteLength = writeLength
};
}
/// <summary>
/// When overridden in a derived class, gets a value indicating whether the current stream supports reading.
/// </summary>
/// <value><c>true</c> if this instance can read; otherwise, <c>false</c>.</value>
/// <returns>true if the stream supports reading; otherwise, false.</returns>
public override bool CanRead
{
get { return BaseStream.CanRead; }
}
/// <summary>
/// When overridden in a derived class, gets a value indicating whether the current stream supports seeking.
/// </summary>
/// <value><c>true</c> if this instance can seek; otherwise, <c>false</c>.</value>
/// <returns>true if the stream supports seeking; otherwise, false.</returns>
public override bool CanSeek
{
get { return BaseStream.CanSeek; }
}
/// <summary>
/// When overridden in a derived class, gets a value indicating whether the current stream supports writing.
/// </summary>
/// <value><c>true</c> if this instance can write; otherwise, <c>false</c>.</value>
/// <returns>true if the stream supports writing; otherwise, false.</returns>
public override bool CanWrite
{
get { return BaseStream.CanWrite; }
}
/// <summary>
/// When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.
/// </summary>
public override void Flush()
{
BaseStream.Flush();
}
/// <summary>
/// When overridden in a derived class, gets the length in bytes of the stream.
/// </summary>
/// <value>The length.</value>
/// <returns>A long value representing the length of the stream in bytes.</returns>
public override long Length
{
get { return BaseStream.Length; }
}
/// <summary>
/// When overridden in a derived class, gets or sets the position within the current stream.
/// </summary>
/// <value>The position.</value>
/// <returns>The current position within the stream.</returns>
public override long Position
{
get { return BaseStream.Position; }
set
{
BaseStream.Position = value;
}
}
/// <summary>
/// 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.
/// </summary>
/// <param name="buffer">An array of bytes. When this method returns, the buffer contains the specified byte array with the values between <paramref name="offset" /> and (<paramref name="offset" /> + <paramref name="count" /> - 1) replaced by the bytes read from the current source.</param>
/// <param name="offset">The zero-based byte offset in <paramref name="buffer" /> at which to begin storing the data read from the current stream.</param>
/// <param name="count">The maximum number of bytes to be read from the current stream.</param>
/// <returns>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.</returns>
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;
}
/// <summary>
/// When overridden in a derived class, sets the position within the current stream.
/// </summary>
/// <param name="offset">A byte offset relative to the <paramref name="origin" /> parameter.</param>
/// <param name="origin">A value of type <see cref="T:System.IO.SeekOrigin" /> indicating the reference point used to obtain the new position.</param>
/// <returns>The new position within the current stream.</returns>
public override long Seek(long offset, SeekOrigin origin)
{
return BaseStream.Seek(offset, origin);
}
/// <summary>
/// When overridden in a derived class, sets the length of the current stream.
/// </summary>
/// <param name="value">The desired length of the current stream in bytes.</param>
public override void SetLength(long value)
{
BaseStream.SetLength(value);
}
/// <summary>
/// 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.
/// </summary>
/// <param name="buffer">An array of bytes. This method copies <paramref name="count" /> bytes from <paramref name="buffer" /> to the current stream.</param>
/// <param name="offset">The zero-based byte offset in <paramref name="buffer" /> at which to begin copying bytes to the current stream.</param>
/// <param name="count">The number of bytes to be written to the current stream.</param>
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;
}
/// <summary>
/// Releases the unmanaged resources used by the <see cref="T:System.IO.Stream" /> and optionally releases the managed resources.
/// </summary>
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
protected override void Dispose(bool disposing)
{
if (disposing)
{
BaseStream.Dispose();
}
base.Dispose(disposing);
}
}
}

View File

@ -87,10 +87,5 @@
"User": "\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645", "User": "\u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645",
"System": "\u0627\u0644\u0646\u0638\u0627\u0645", "System": "\u0627\u0644\u0646\u0638\u0627\u0645",
"Application": "\u0627\u0644\u062a\u0637\u0628\u064a\u0642", "Application": "\u0627\u0644\u062a\u0637\u0628\u064a\u0642",
"Plugin": "\u0627\u0644\u0645\u0644\u062d\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"
} }

View File

@ -6,7 +6,7 @@
"Music": "\u041c\u0443\u0437\u0438\u043a\u0430", "Music": "\u041c\u0443\u0437\u0438\u043a\u0430",
"Games": "\u0418\u0433\u0440\u0438", "Games": "\u0418\u0433\u0440\u0438",
"Photos": "\u0421\u043d\u0438\u043c\u043a\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", "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", "HomeVideos": "\u0414\u043e\u043c\u0430\u0448\u043d\u0438 \u043a\u043b\u0438\u043f\u043e\u0432\u0435",
"Playlists": "\u0421\u043f\u0438\u0441\u044a\u0446\u0438", "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", "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", "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", "HeaderFavoriteEpisodes": "\u041b\u044e\u0431\u0438\u043c\u0438 \u0435\u043f\u0438\u0437\u043e\u0434\u0438",
"HeaderFavoriteShows": "Favorite Shows", "HeaderFavoriteShows": "\u041b\u044e\u0431\u0438\u043c\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438",
"HeaderNextUp": "Next Up", "HeaderNextUp": "\u0421\u043b\u0435\u0434\u0432\u0430",
"Favorites": "\u041b\u044e\u0431\u0438\u043c\u0438", "Favorites": "\u041b\u044e\u0431\u0438\u043c\u0438",
"Collections": "\u041a\u043e\u043b\u0435\u043a\u0446\u0438\u0438", "Collections": "\u041a\u043e\u043b\u0435\u043a\u0446\u0438\u0438",
"Channels": "\u041a\u0430\u043d\u0430\u043b\u0438", "Channels": "\u041a\u0430\u043d\u0430\u043b\u0438",
@ -27,28 +27,28 @@
"Artists": "\u0418\u0437\u043f\u044a\u043b\u043d\u0438\u0442\u0435\u043b\u0438", "Artists": "\u0418\u0437\u043f\u044a\u043b\u043d\u0438\u0442\u0435\u043b\u0438",
"Folders": "\u041f\u0430\u043f\u043a\u0438", "Folders": "\u041f\u0430\u043f\u043a\u0438",
"Songs": "\u041f\u0435\u0441\u043d\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", "Shows": "\u0421\u0435\u0440\u0438\u0430\u043b\u0438",
"Genres": "\u0416\u0430\u043d\u0440\u043e\u0432\u0435", "Genres": "\u0416\u0430\u043d\u0440\u043e\u0432\u0435",
"NameSeasonNumber": "\u0421\u0435\u0437\u043e\u043d {0}", "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}", "UserDownloadingItemWithValues": "{0} is downloading {1}",
"HeaderLiveTV": "Live TV", "HeaderLiveTV": "\u0422\u0435\u043b\u0435\u0432\u0438\u0437\u0438\u044f \u043d\u0430 \u0436\u0438\u0432\u043e",
"ChapterNameValue": "Chapter {0}", "ChapterNameValue": "\u0413\u043b\u0430\u0432\u0430 {0}",
"ScheduledTaskFailedWithName": "{0} failed", "ScheduledTaskFailedWithName": "{0} failed",
"LabelRunningTimeValue": "Running time: {0}", "LabelRunningTimeValue": "Running time: {0}",
"ScheduledTaskStartedWithName": "{0} \u0437\u0430\u043f\u043e\u0447\u043d\u0430", "ScheduledTaskStartedWithName": "{0} \u0437\u0430\u043f\u043e\u0447\u043d\u0430",
"VersionNumber": "Version {0}", "VersionNumber": "\u0412\u0435\u0440\u0441\u0438\u044f {0}",
"PluginInstalledWithName": "{0} was installed", "PluginInstalledWithName": "{0} \u0435 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043d\u043e",
"StartupEmbyServerIsLoading": "Emby Server is loading. Please try again shortly.", "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} was updated", "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", "PluginUninstalledWithName": "{0} \u0435 \u0434\u0435\u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043d\u043e",
"ItemAddedWithName": "{0} was added to the library", "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} was removed from the library", "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": "Ip address: {0}", "LabelIpAddressValue": "\u0418\u041f \u0430\u0434\u0440\u0435\u0441: {0}",
"DeviceOnlineWithName": "{0} is connected", "DeviceOnlineWithName": "{0} \u0435 \u0441\u0432\u044a\u0440\u0437\u0430\u043d",
"UserOnlineFromDevice": "{0} is online from {1}", "UserOnlineFromDevice": "{0} \u0435 \u043d\u0430 \u043b\u0438\u043d\u0438\u044f \u043e\u0442 {1}",
"ProviderValue": "Provider: {0}", "ProviderValue": "\u0414\u043e\u0441\u0442\u0430\u0432\u0447\u0438\u043a: {0}",
"SubtitlesDownloadedForItem": "Subtitles downloaded for {0}", "SubtitlesDownloadedForItem": "Subtitles downloaded for {0}",
"UserCreatedWithName": "User {0} has been created", "UserCreatedWithName": "User {0} has been created",
"UserPasswordChangedWithName": "Password has been changed for user {0}", "UserPasswordChangedWithName": "Password has been changed for user {0}",
@ -77,7 +77,7 @@
"NotificationOptionGamePlaybackStopped": "Game playback stopped", "NotificationOptionGamePlaybackStopped": "Game playback stopped",
"NotificationOptionTaskFailed": "Scheduled task failure", "NotificationOptionTaskFailed": "Scheduled task failure",
"NotificationOptionInstallationFailed": "Installation 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", "NotificationOptionCameraImageUploaded": "Camera image uploaded",
"NotificationOptionUserLockedOut": "User locked out", "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", "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", "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", "User": "\u041f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b",
"System": "\u0421\u0438\u0441\u0442\u0435\u043c\u0430", "System": "\u0421\u0438\u0441\u0442\u0435\u043c\u0430",
"Application": "Application", "Application": "\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u0430",
"Plugin": "Plugin", "Plugin": "\u041f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0430"
"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"
} }

View File

@ -87,10 +87,5 @@
"User": "User", "User": "User",
"System": "System", "System": "System",
"Application": "Application", "Application": "Application",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Exit",
"LabelVisitCommunity": "Visit Community",
"LabelBrowseLibrary": "Browse Library",
"LabelConfigureServer": "Configure Emby",
"LabelRestartServer": "Restart Server"
} }

View File

@ -87,10 +87,5 @@
"User": "U\u017eivatel", "User": "U\u017eivatel",
"System": "Syst\u00e9m", "System": "Syst\u00e9m",
"Application": "Aplikace", "Application": "Aplikace",
"Plugin": "Z\u00e1suvn\u00fd modul", "Plugin": "Z\u00e1suvn\u00fd modul"
"LabelExit": "Uko\u010dit",
"LabelVisitCommunity": "Nav\u0161t\u00edvit komunitu",
"LabelBrowseLibrary": "Proch\u00e1zet knihovnu",
"LabelConfigureServer": "Konfigurovat Emby",
"LabelRestartServer": "Restartovat Server"
} }

View File

@ -87,10 +87,5 @@
"User": "Bruger", "User": "Bruger",
"System": "System", "System": "System",
"Application": "Applikation", "Application": "Applikation",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Afslut",
"LabelVisitCommunity": "Bes\u00f8g F\u00e6llesskab",
"LabelBrowseLibrary": "Gennemse Bibliotek",
"LabelConfigureServer": "Konfigurer Emby",
"LabelRestartServer": "Genstart Server"
} }

View File

@ -87,10 +87,5 @@
"User": "Benutzer", "User": "Benutzer",
"System": "System", "System": "System",
"Application": "Anwendung", "Application": "Anwendung",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Beenden",
"LabelVisitCommunity": "Besuche die Community",
"LabelBrowseLibrary": "Bibliothek durchsuchen",
"LabelConfigureServer": "Konfiguriere Emby",
"LabelRestartServer": "Server neustarten"
} }

View File

@ -87,10 +87,5 @@
"User": "User", "User": "User",
"System": "System", "System": "System",
"Application": "Application", "Application": "Application",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Exit",
"LabelVisitCommunity": "Visit Community",
"LabelBrowseLibrary": "Browse Library",
"LabelConfigureServer": "Configure Emby",
"LabelRestartServer": "Restart Server"
} }

View File

@ -87,10 +87,5 @@
"User": "User", "User": "User",
"System": "System", "System": "System",
"Application": "Application", "Application": "Application",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Exit",
"LabelVisitCommunity": "Visit Community",
"LabelBrowseLibrary": "Browse Library",
"LabelConfigureServer": "Configure Emby",
"LabelRestartServer": "Restart Server"
} }

View File

@ -87,10 +87,5 @@
"User": "Usuario", "User": "Usuario",
"System": "Sistema", "System": "Sistema",
"Application": "Aplicaci\u00f3n", "Application": "Aplicaci\u00f3n",
"Plugin": "Complemento", "Plugin": "Complemento"
"LabelExit": "Salir",
"LabelVisitCommunity": "Visitar la Comunidad",
"LabelBrowseLibrary": "Explorar Biblioteca",
"LabelConfigureServer": "Configurar Emby",
"LabelRestartServer": "Reiniciar el Servidor"
} }

View File

@ -27,7 +27,7 @@
"Artists": "Artistas", "Artists": "Artistas",
"Folders": "Carpetas", "Folders": "Carpetas",
"Songs": "Canciones", "Songs": "Canciones",
"TvShows": "TV Shows", "TvShows": "Series TV",
"Shows": "Series", "Shows": "Series",
"Genres": "G\u00e9neros", "Genres": "G\u00e9neros",
"NameSeasonNumber": "Temporada {0}", "NameSeasonNumber": "Temporada {0}",
@ -61,8 +61,8 @@
"AuthenticationSucceededWithUserName": "{0} autenticado correctamente", "AuthenticationSucceededWithUserName": "{0} autenticado correctamente",
"UserOfflineFromDevice": "{0} se ha desconectado de {1}", "UserOfflineFromDevice": "{0} se ha desconectado de {1}",
"DeviceOfflineWithName": "{0} se ha desconectado", "DeviceOfflineWithName": "{0} se ha desconectado",
"UserStartedPlayingItemWithValues": "{0} ha comenzado jugando {1}", "UserStartedPlayingItemWithValues": "{0} ha comenzado reproducir {1}",
"UserStoppedPlayingItemWithValues": "{0} ha dejado de reproducir {1}", "UserStoppedPlayingItemWithValues": "{0} ha parado de reproducir {1}",
"NotificationOptionPluginError": "Error en plugin", "NotificationOptionPluginError": "Error en plugin",
"NotificationOptionApplicationUpdateAvailable": "Actualizaci\u00f3n de la aplicaci\u00f3n disponible", "NotificationOptionApplicationUpdateAvailable": "Actualizaci\u00f3n de la aplicaci\u00f3n disponible",
"NotificationOptionApplicationUpdateInstalled": "Actualizaci\u00f3n de la aplicaci\u00f3n instalada", "NotificationOptionApplicationUpdateInstalled": "Actualizaci\u00f3n de la aplicaci\u00f3n instalada",
@ -87,10 +87,5 @@
"User": "Usuario", "User": "Usuario",
"System": "Sistema", "System": "Sistema",
"Application": "Aplicaci\u00f3n", "Application": "Aplicaci\u00f3n",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Salida",
"LabelVisitCommunity": "Visita la Comunidad",
"LabelBrowseLibrary": "Navegar la biblioteca",
"LabelConfigureServer": "Configurar Emby",
"LabelRestartServer": "Configurar Emby"
} }

View File

@ -87,10 +87,5 @@
"User": "User", "User": "User",
"System": "System", "System": "System",
"Application": "Application", "Application": "Application",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Exit",
"LabelVisitCommunity": "Visit Community",
"LabelBrowseLibrary": "Browse Library",
"LabelConfigureServer": "Configure Emby",
"LabelRestartServer": "Restart Server"
} }

View File

@ -87,10 +87,5 @@
"User": "Utilisateur", "User": "Utilisateur",
"System": "Syst\u00e8me", "System": "Syst\u00e8me",
"Application": "Application", "Application": "Application",
"Plugin": "Extension", "Plugin": "Extension"
"LabelExit": "Quitter",
"LabelVisitCommunity": "Visiter la communaut\u00e9",
"LabelBrowseLibrary": "Parcourir la m\u00e9diath\u00e8que",
"LabelConfigureServer": "Configurer Emby",
"LabelRestartServer": "Red\u00e9marrer le serveur"
} }

View File

@ -87,10 +87,5 @@
"User": "User", "User": "User",
"System": "System", "System": "System",
"Application": "Application", "Application": "Application",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Exit",
"LabelVisitCommunity": "Visit Community",
"LabelBrowseLibrary": "Browse Library",
"LabelConfigureServer": "Configure Emby",
"LabelRestartServer": "Restart Server"
} }

View File

@ -87,10 +87,5 @@
"User": "Korisnik", "User": "Korisnik",
"System": "Sistem", "System": "Sistem",
"Application": "Aplikacija", "Application": "Aplikacija",
"Plugin": "Dodatak", "Plugin": "Dodatak"
"LabelExit": "Izlaz",
"LabelVisitCommunity": "Posjeti zajednicu",
"LabelBrowseLibrary": "Pregledaj biblioteku",
"LabelConfigureServer": "Podesi Emby",
"LabelRestartServer": "Restartiraj Server"
} }

View File

@ -87,10 +87,5 @@
"User": "User", "User": "User",
"System": "System", "System": "System",
"Application": "Application", "Application": "Application",
"Plugin": "Plugin", "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"
} }

View File

@ -87,10 +87,5 @@
"User": "Utente", "User": "Utente",
"System": "Sistema", "System": "Sistema",
"Application": "Applicazione", "Application": "Applicazione",
"Plugin": "Plug-in", "Plugin": "Plug-in"
"LabelExit": "Esci",
"LabelVisitCommunity": "Visita il forum di discussione",
"LabelBrowseLibrary": "Esplora la libreria",
"LabelConfigureServer": "Configura Emby",
"LabelRestartServer": "Riavvia Server"
} }

View File

@ -87,10 +87,5 @@
"User": "\u041f\u0430\u0439\u0434\u0430\u043b\u0430\u043d\u0443\u0448\u044b", "User": "\u041f\u0430\u0439\u0434\u0430\u043b\u0430\u043d\u0443\u0448\u044b",
"System": "\u0416\u04af\u0439\u0435", "System": "\u0416\u04af\u0439\u0435",
"Application": "\u049a\u043e\u043b\u0434\u0430\u043d\u0431\u0430", "Application": "\u049a\u043e\u043b\u0434\u0430\u043d\u0431\u0430",
"Plugin": "\u041f\u043b\u0430\u0433\u0438\u043d", "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"
} }

View File

@ -87,10 +87,5 @@
"User": "User", "User": "User",
"System": "System", "System": "System",
"Application": "Application", "Application": "Application",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Exit",
"LabelVisitCommunity": "Visit Community",
"LabelBrowseLibrary": "Browse Library",
"LabelConfigureServer": "Configure Emby",
"LabelRestartServer": "Restart Server"
} }

View File

@ -87,10 +87,5 @@
"User": "User", "User": "User",
"System": "System", "System": "System",
"Application": "Application", "Application": "Application",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Exit",
"LabelVisitCommunity": "Visit Community",
"LabelBrowseLibrary": "Browse Library",
"LabelConfigureServer": "Configure Emby",
"LabelRestartServer": "Restart Server"
} }

View File

@ -87,10 +87,5 @@
"User": "User", "User": "User",
"System": "System", "System": "System",
"Application": "Application", "Application": "Application",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Exit",
"LabelVisitCommunity": "Visit Community",
"LabelBrowseLibrary": "Browse Library",
"LabelConfigureServer": "Configure Emby",
"LabelRestartServer": "Restart Server"
} }

View File

@ -87,10 +87,5 @@
"User": "Bruker", "User": "Bruker",
"System": "System", "System": "System",
"Application": "Applikasjon", "Application": "Applikasjon",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Avslutt",
"LabelVisitCommunity": "Bes\u00f8k Samfunnet",
"LabelBrowseLibrary": "Bla i biblioteket",
"LabelConfigureServer": "Konfigurere Emby",
"LabelRestartServer": "Start om serveren"
} }

View File

@ -87,10 +87,5 @@
"User": "Gebruiker", "User": "Gebruiker",
"System": "Systeem", "System": "Systeem",
"Application": "Toepassing", "Application": "Toepassing",
"Plugin": "Plug-in", "Plugin": "Plug-in"
"LabelExit": "Afsluiten",
"LabelVisitCommunity": "Bezoek Gemeenschap",
"LabelBrowseLibrary": "Bekijk bibliotheek",
"LabelConfigureServer": "Emby Configureren",
"LabelRestartServer": "Server herstarten"
} }

View File

@ -27,7 +27,7 @@
"Artists": "Wykonawcy", "Artists": "Wykonawcy",
"Folders": "Foldery", "Folders": "Foldery",
"Songs": "Utwory", "Songs": "Utwory",
"TvShows": "TV Shows", "TvShows": "Seriale",
"Shows": "Seriale", "Shows": "Seriale",
"Genres": "Gatunki", "Genres": "Gatunki",
"NameSeasonNumber": "Sezon {0}", "NameSeasonNumber": "Sezon {0}",
@ -87,10 +87,5 @@
"User": "U\u017cytkownik", "User": "U\u017cytkownik",
"System": "System", "System": "System",
"Application": "Aplikacja", "Application": "Aplikacja",
"Plugin": "Wtyczka", "Plugin": "Wtyczka"
"LabelExit": "Wyj\u015bcie",
"LabelVisitCommunity": "Odwied\u017a spo\u0142eczno\u015b\u0107",
"LabelBrowseLibrary": "Przegl\u0105daj bibliotek\u0119",
"LabelConfigureServer": "Konfiguracja Emby",
"LabelRestartServer": "Uruchom serwer ponownie"
} }

View File

@ -87,10 +87,5 @@
"User": "Usu\u00e1rio", "User": "Usu\u00e1rio",
"System": "Sistema", "System": "Sistema",
"Application": "Aplicativo", "Application": "Aplicativo",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Sair",
"LabelVisitCommunity": "Visite a Comunidade",
"LabelBrowseLibrary": "Explorar Biblioteca",
"LabelConfigureServer": "Configurar Emby",
"LabelRestartServer": "Reiniciar Servidor"
} }

View File

@ -87,10 +87,5 @@
"User": "User", "User": "User",
"System": "System", "System": "System",
"Application": "Aplica\u00e7\u00e3o", "Application": "Aplica\u00e7\u00e3o",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Exit",
"LabelVisitCommunity": "Visit Community",
"LabelBrowseLibrary": "Browse Library",
"LabelConfigureServer": "Configure Emby",
"LabelRestartServer": "Restart Server"
} }

View File

@ -87,10 +87,5 @@
"User": "\u041f\u043e\u043b\u044c\u0437-\u043b\u044c", "User": "\u041f\u043e\u043b\u044c\u0437-\u043b\u044c",
"System": "\u0421\u0438\u0441\u0442\u0435\u043c\u0430", "System": "\u0421\u0438\u0441\u0442\u0435\u043c\u0430",
"Application": "\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435", "Application": "\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435",
"Plugin": "\u041f\u043b\u0430\u0433\u0438\u043d", "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"
} }

View File

@ -87,10 +87,5 @@
"User": "User", "User": "User",
"System": "System", "System": "System",
"Application": "Application", "Application": "Application",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Exit",
"LabelVisitCommunity": "Visit Community",
"LabelBrowseLibrary": "Browse Library",
"LabelConfigureServer": "Configure Emby",
"LabelRestartServer": "Restart Server"
} }

View File

@ -87,10 +87,5 @@
"User": "User", "User": "User",
"System": "System", "System": "System",
"Application": "Application", "Application": "Application",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Exit",
"LabelVisitCommunity": "Visit Community",
"LabelBrowseLibrary": "Browse Library",
"LabelConfigureServer": "Configure Emby",
"LabelRestartServer": "Restart Server"
} }

View File

@ -87,10 +87,5 @@
"User": "Anv\u00e4ndare", "User": "Anv\u00e4ndare",
"System": "System", "System": "System",
"Application": "App", "Application": "App",
"Plugin": "Till\u00e4gg", "Plugin": "Till\u00e4gg"
"LabelExit": "Avsluta",
"LabelVisitCommunity": "Bes\u00f6k v\u00e5rt diskussionsforum",
"LabelBrowseLibrary": "Bl\u00e4ddra i biblioteket",
"LabelConfigureServer": "Konfigurera Emby",
"LabelRestartServer": "Starta om servern"
} }

View File

@ -87,10 +87,5 @@
"User": "User", "User": "User",
"System": "System", "System": "System",
"Application": "Application", "Application": "Application",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Exit",
"LabelVisitCommunity": "Visit Community",
"LabelBrowseLibrary": "Browse Library",
"LabelConfigureServer": "Configure Emby",
"LabelRestartServer": "Restart Server"
} }

View File

@ -87,10 +87,5 @@
"User": "\u7528\u6237", "User": "\u7528\u6237",
"System": "\u7cfb\u7edf", "System": "\u7cfb\u7edf",
"Application": "\u5e94\u7528\u7a0b\u5e8f", "Application": "\u5e94\u7528\u7a0b\u5e8f",
"Plugin": "\u63d2\u4ef6", "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"
} }

View File

@ -87,10 +87,5 @@
"User": "User", "User": "User",
"System": "System", "System": "System",
"Application": "Application", "Application": "Application",
"Plugin": "Plugin", "Plugin": "Plugin"
"LabelExit": "Exit",
"LabelVisitCommunity": "\u8a2a\u554f\u8a0e\u8ad6\u5340",
"LabelBrowseLibrary": "Browse Library",
"LabelConfigureServer": "Configure Emby",
"LabelRestartServer": "Restart Server"
} }

View File

@ -106,7 +106,7 @@ namespace Emby.Server.Implementations.Networking
endpoint.StartsWith("127.", StringComparison.OrdinalIgnoreCase) || endpoint.StartsWith("127.", StringComparison.OrdinalIgnoreCase) ||
endpoint.StartsWith("192.168", StringComparison.OrdinalIgnoreCase) || endpoint.StartsWith("192.168", StringComparison.OrdinalIgnoreCase) ||
endpoint.StartsWith("169.", StringComparison.OrdinalIgnoreCase) || endpoint.StartsWith("169.", StringComparison.OrdinalIgnoreCase) ||
endpoint.StartsWith("10.", StringComparison.OrdinalIgnoreCase) || //endpoint.StartsWith("10.", StringComparison.OrdinalIgnoreCase) ||
IsInPrivateAddressSpaceAndLocalSubnet(endpoint); IsInPrivateAddressSpaceAndLocalSubnet(endpoint);
} }

View File

@ -464,6 +464,8 @@ namespace Emby.Server.Implementations.ScheduledTasks
/// <param name="e">The e.</param> /// <param name="e">The e.</param>
void progress_ProgressChanged(object sender, double e) void progress_ProgressChanged(object sender, double e)
{ {
e = Math.Min(e, 100);
CurrentProgress = e; CurrentProgress = e;
EventHelper.FireEventIfNotNull(TaskProgress, this, new GenericEventArgs<double> EventHelper.FireEventIfNotNull(TaskProgress, this, new GenericEventArgs<double>

View File

@ -1376,11 +1376,6 @@ namespace MediaBrowser.Controller.Entities
return list; return list;
} }
internal virtual bool IsValidFromResolver(BaseItem newItem)
{
return true;
}
internal virtual ItemUpdateType UpdateFromResolvedItem(BaseItem newItem) internal virtual ItemUpdateType UpdateFromResolvedItem(BaseItem newItem)
{ {
var updateType = ItemUpdateType.None; var updateType = ItemUpdateType.None;

View File

@ -265,21 +265,6 @@ namespace MediaBrowser.Controller.Entities
return changed; 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) private ItemResolveArgs CreateResolveArgs(IDirectoryService directoryService, bool setPhysicalLocations)
{ {
var path = ContainingFolderPath; var path = ContainingFolderPath;

View File

@ -416,7 +416,7 @@ namespace MediaBrowser.Controller.Entities
{ {
BaseItem currentChild; BaseItem currentChild;
if (currentChildren.TryGetValue(child.Id, out currentChild) && currentChild.IsValidFromResolver(child)) if (currentChildren.TryGetValue(child.Id, out currentChild))
{ {
validChildren.Add(currentChild); validChildren.Add(currentChild);

View File

@ -1,6 +1,7 @@
using System.IO; using System.IO;
using System.Threading; using System.Threading;
using System; using System;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.IO namespace MediaBrowser.Controller.IO
{ {
@ -23,5 +24,27 @@ namespace MediaBrowser.Controller.IO
} }
} }
} }
public static async Task CopyToAsync(Stream source, Stream destination, int bufferSize, IProgress<double> 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);
}
}
} }
} }

View File

@ -243,13 +243,13 @@ namespace MediaBrowser.XbmcMetadata.Parsers
} }
// Support Tmdb // Support Tmdb
// http://www.themoviedb.org/movie/36557 // https://www.themoviedb.org/movie/30287-fallo
var srch = MovieDbParserSearchString; var srch = MovieDbParserSearchString;
var index = xml.IndexOf(srch, StringComparison.OrdinalIgnoreCase); var index = xml.IndexOf(srch, StringComparison.OrdinalIgnoreCase);
if (index != -1) if (index != -1)
{ {
var tmdbId = xml.Substring(index + srch.Length).TrimEnd('/'); var tmdbId = xml.Substring(index + srch.Length).TrimEnd('/').Split('-')[0];
int value; int value;
if (!string.IsNullOrWhiteSpace(tmdbId) && int.TryParse(tmdbId, NumberStyles.Any, CultureInfo.InvariantCulture, out value)) if (!string.IsNullOrWhiteSpace(tmdbId) && int.TryParse(tmdbId, NumberStyles.Any, CultureInfo.InvariantCulture, out value))
{ {

View File

@ -1,3 +1,3 @@
using System.Reflection; using System.Reflection;
[assembly: AssemblyVersion("3.2.35.2")] [assembly: AssemblyVersion("3.2.36.1")]