diff --git a/Dockerfile b/Dockerfile index 1cd864e0b3..0bccd9d646 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,7 +31,7 @@ COPY --from=web-builder /dist /jellyfin/jellyfin-web # mesa-va-drivers: needed for VAAPI RUN apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y \ - libfontconfig1 libgomp1 libva-drm2 mesa-va-drivers openssl \ + libfontconfig1 libgomp1 libva-drm2 mesa-va-drivers openssl ca-certificates \ && apt-get clean autoclean \ && apt-get autoremove \ && rm -rf /var/lib/apt/lists/* \ diff --git a/Dockerfile.arm b/Dockerfile.arm index 551aa177a2..e7cbb09094 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -24,7 +24,7 @@ RUN dotnet publish Jellyfin.Server --configuration Release --output="/jellyfin" FROM debian:buster-slim RUN apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \ - libssl-dev \ + libssl-dev ca-certificates \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /cache /config /media \ && chmod 777 /cache /config /media diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index 4c2ca12a66..a0cd0dacc2 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -24,7 +24,7 @@ RUN dotnet publish Jellyfin.Server --configuration Release --output="/jellyfin" FROM debian:buster-slim RUN apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \ - libssl-dev \ + libssl-dev ca-certificates \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /cache /config /media \ && chmod 777 /cache /config /media diff --git a/DvdLib/DvdLib.csproj b/DvdLib/DvdLib.csproj index 9dbaa9e2f0..f4df6a9f52 100644 --- a/DvdLib/DvdLib.csproj +++ b/DvdLib/DvdLib.csproj @@ -9,7 +9,7 @@ - netstandard2.0 + netstandard2.1 false true diff --git a/DvdLib/Ifo/Dvd.cs b/DvdLib/Ifo/Dvd.cs index 90125fa3e3..157b2e197f 100644 --- a/DvdLib/Ifo/Dvd.cs +++ b/DvdLib/Ifo/Dvd.cs @@ -42,7 +42,7 @@ namespace DvdLib.Ifo } else { - using (var vmgFs = _fileSystem.GetFileStream(vmgPath.FullName, FileOpenMode.Open, FileAccessMode.Read, FileShareMode.Read)) + using (var vmgFs = new FileStream(vmgPath.FullName, FileMode.Open, FileAccess.Read, FileShare.Read)) { using (var vmgRead = new BigEndianBinaryReader(vmgFs)) { @@ -95,7 +95,7 @@ namespace DvdLib.Ifo { VTSPaths[vtsNum] = vtsPath; - using (var vtsFs = _fileSystem.GetFileStream(vtsPath, FileOpenMode.Open, FileAccessMode.Read, FileShareMode.Read)) + using (var vtsFs = new FileStream(vtsPath, FileMode.Open, FileAccess.Read, FileShare.Read)) { using (var vtsRead = new BigEndianBinaryReader(vtsFs)) { diff --git a/Emby.Dlna/Didl/DidlBuilder.cs b/Emby.Dlna/Didl/DidlBuilder.cs index 85ef9d4829..a5e46df78d 100644 --- a/Emby.Dlna/Didl/DidlBuilder.cs +++ b/Emby.Dlna/Didl/DidlBuilder.cs @@ -18,7 +18,6 @@ using MediaBrowser.Controller.Playlists; using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Drawing; using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Globalization; using MediaBrowser.Model.Net; using Microsoft.Extensions.Logging; diff --git a/Emby.Dlna/Didl/Filter.cs b/Emby.Dlna/Didl/Filter.cs index a0e67870e9..e7f9577ee6 100644 --- a/Emby.Dlna/Didl/Filter.cs +++ b/Emby.Dlna/Didl/Filter.cs @@ -16,7 +16,7 @@ namespace Emby.Dlna.Didl public Filter(string filter) { - _all = StringHelper.EqualsIgnoreCase(filter, "*"); + _all = string.Equals(filter, "*", StringComparison.OrdinalIgnoreCase); _fields = (filter ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); } diff --git a/Emby.Dlna/DlnaManager.cs b/Emby.Dlna/DlnaManager.cs index d5d788021d..7e744e0aac 100644 --- a/Emby.Dlna/DlnaManager.cs +++ b/Emby.Dlna/DlnaManager.cs @@ -385,7 +385,7 @@ namespace Emby.Dlna { Directory.CreateDirectory(systemProfilesPath); - using (var fileStream = _fileSystem.GetFileStream(path, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read)) + using (var fileStream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Read)) { await stream.CopyToAsync(fileStream); } diff --git a/Emby.Dlna/PlayTo/PlayToController.cs b/Emby.Dlna/PlayTo/PlayToController.cs index c58f16438b..d378c2c304 100644 --- a/Emby.Dlna/PlayTo/PlayToController.cs +++ b/Emby.Dlna/PlayTo/PlayToController.cs @@ -6,7 +6,6 @@ using System.Threading; using System.Threading.Tasks; using Emby.Dlna.Didl; using MediaBrowser.Common.Configuration; -using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Dlna; using MediaBrowser.Controller.Drawing; using MediaBrowser.Controller.Entities; diff --git a/Emby.Dlna/PlayTo/PlaylistItemFactory.cs b/Emby.Dlna/PlayTo/PlaylistItemFactory.cs index 446d8e1e6e..3b1cbab628 100644 --- a/Emby.Dlna/PlayTo/PlaylistItemFactory.cs +++ b/Emby.Dlna/PlayTo/PlaylistItemFactory.cs @@ -1,4 +1,3 @@ -using System.Globalization; using System.IO; using System.Linq; using MediaBrowser.Controller.Entities; diff --git a/Emby.Dlna/Server/DescriptionXmlBuilder.cs b/Emby.Dlna/Server/DescriptionXmlBuilder.cs index 03d8f80abb..1b53e92424 100644 --- a/Emby.Dlna/Server/DescriptionXmlBuilder.cs +++ b/Emby.Dlna/Server/DescriptionXmlBuilder.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Text; using Emby.Dlna.Common; using MediaBrowser.Model.Dlna; -using MediaBrowser.Model.Extensions; namespace Emby.Dlna.Server { diff --git a/Emby.Dlna/Service/BaseControlHandler.cs b/Emby.Dlna/Service/BaseControlHandler.cs index 49129f6ffd..a8da7aecd2 100644 --- a/Emby.Dlna/Service/BaseControlHandler.cs +++ b/Emby.Dlna/Service/BaseControlHandler.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs index ce8089e59c..4e0f9493a6 100644 --- a/Emby.Drawing/ImageProcessor.cs +++ b/Emby.Drawing/ImageProcessor.cs @@ -14,7 +14,6 @@ using MediaBrowser.Controller.MediaEncoding; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Drawing; using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Extensions; using MediaBrowser.Model.IO; using MediaBrowser.Model.Net; using Microsoft.Extensions.Logging; @@ -129,7 +128,7 @@ namespace Emby.Drawing { var file = await ProcessImage(options).ConfigureAwait(false); - using (var fileStream = _fileSystem.GetFileStream(file.Item1, FileOpenMode.Open, FileAccessMode.Read, FileShareMode.Read, true)) + using (var fileStream = new FileStream(file.Item1, FileMode.Open, FileAccess.Read, FileShare.Read, IODefaults.FileStreamBufferSize, true)) { await fileStream.CopyToAsync(toStream).ConfigureAwait(false); } diff --git a/Emby.Notifications/CoreNotificationTypes.cs b/Emby.Notifications/CoreNotificationTypes.cs index 0f9fc08d99..d11e01e334 100644 --- a/Emby.Notifications/CoreNotificationTypes.cs +++ b/Emby.Notifications/CoreNotificationTypes.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using MediaBrowser.Controller; using MediaBrowser.Controller.Notifications; using MediaBrowser.Model.Globalization; using MediaBrowser.Model.Notifications; diff --git a/Emby.Photos/Emby.Photos.csproj b/Emby.Photos/Emby.Photos.csproj index 29ed3c5f75..ed6918dba6 100644 --- a/Emby.Photos/Emby.Photos.csproj +++ b/Emby.Photos/Emby.Photos.csproj @@ -1,9 +1,4 @@ - - - true - - diff --git a/Emby.Server.Implementations/Activity/ActivityManager.cs b/Emby.Server.Implementations/Activity/ActivityManager.cs index b03c4d1824..6712c47828 100644 --- a/Emby.Server.Implementations/Activity/ActivityManager.cs +++ b/Emby.Server.Implementations/Activity/ActivityManager.cs @@ -2,7 +2,6 @@ #pragma warning disable SA1600 using System; -using System.Linq; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Activity; using MediaBrowser.Model.Events; diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 0bb1d832fb..e2df8877ab 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -599,7 +599,7 @@ namespace Emby.Server.Implementations HttpsPort = ServerConfiguration.DefaultHttpsPort; } - JsonSerializer = new JsonSerializer(FileSystemManager); + JsonSerializer = new JsonSerializer(); if (Plugins != null) { @@ -1007,7 +1007,7 @@ namespace Emby.Server.Implementations { string dir = Path.Combine(ApplicationPaths.PluginsPath, args.Argument.name); var types = Directory.EnumerateFiles(dir, "*.dll", SearchOption.AllDirectories) - .Select(x => Assembly.LoadFrom(x)) + .Select(Assembly.LoadFrom) .SelectMany(x => x.ExportedTypes) .Where(x => x.IsClass && !x.IsAbstract && !x.IsInterface && !x.IsGenericType) .ToArray(); @@ -1707,29 +1707,6 @@ namespace Emby.Server.Implementations _plugins = list.ToArray(); } - /// - /// This returns localhost in the case of no external dns, and the hostname if the - /// dns is prefixed with a valid Uri prefix. - /// - /// The external dns prefix to get the hostname of. - /// The hostname in . - private static string GetHostnameFromExternalDns(string externalDns) - { - if (string.IsNullOrEmpty(externalDns)) - { - return "localhost"; - } - - try - { - return new Uri(externalDns).Host; - } - catch - { - return externalDns; - } - } - public virtual void LaunchUrl(string url) { if (!CanLaunchWebBrowser) diff --git a/Emby.Server.Implementations/Channels/ChannelPostScanTask.cs b/Emby.Server.Implementations/Channels/ChannelPostScanTask.cs index 36e0e5e26d..6cbd04fea9 100644 --- a/Emby.Server.Implementations/Channels/ChannelPostScanTask.cs +++ b/Emby.Server.Implementations/Channels/ChannelPostScanTask.cs @@ -35,14 +35,6 @@ namespace Emby.Server.Implementations.Channels return Task.CompletedTask; } - public static string GetUserDistinctValue(User user) - { - var channels = user.Policy.EnabledChannels - .OrderBy(i => i); - - return string.Join("|", channels); - } - private void CleanDatabase(CancellationToken cancellationToken) { var installedChannelIds = ((ChannelManager)_channelManager).GetInstalledChannelIds(); @@ -75,19 +67,23 @@ namespace Emby.Server.Implementations.Channels { cancellationToken.ThrowIfCancellationRequested(); - _libraryManager.DeleteItem(item, new DeleteOptions - { - DeleteFileLocation = false - - }, false); + _libraryManager.DeleteItem( + item, + new DeleteOptions + { + DeleteFileLocation = false + }, + false); } // Finally, delete the channel itself - _libraryManager.DeleteItem(channel, new DeleteOptions - { - DeleteFileLocation = false - - }, false); + _libraryManager.DeleteItem( + channel, + new DeleteOptions + { + DeleteFileLocation = false + }, + false); } } } diff --git a/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs b/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs index 039e2c1383..03e6abcfba 100644 --- a/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs +++ b/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs @@ -28,18 +28,28 @@ namespace Emby.Server.Implementations.Channels _libraryManager = libraryManager; } + /// public string Name => "Refresh Channels"; + /// public string Description => "Refreshes internet channel information."; + /// public string Category => "Internet Channels"; + /// public bool IsHidden => ((ChannelManager)_channelManager).Channels.Length == 0; + /// public bool IsEnabled => true; + /// public bool IsLogged => true; + /// + public string Key => "RefreshInternetChannels"; + + /// public async Task Execute(CancellationToken cancellationToken, IProgress progress) { var manager = (ChannelManager)_channelManager; @@ -50,18 +60,18 @@ namespace Emby.Server.Implementations.Channels .ConfigureAwait(false); } - /// - /// Creates the triggers that define when the task will run - /// + /// public IEnumerable GetDefaultTriggers() { - return new[] { + return new[] + { // Every so often - new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks} + new TaskTriggerInfo + { + Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks + } }; } - - public string Key => "RefreshInternetChannels"; } } diff --git a/Emby.Server.Implementations/Collections/CollectionImageProvider.cs b/Emby.Server.Implementations/Collections/CollectionImageProvider.cs index 8006b86948..8b14079844 100644 --- a/Emby.Server.Implementations/Collections/CollectionImageProvider.cs +++ b/Emby.Server.Implementations/Collections/CollectionImageProvider.cs @@ -1,7 +1,6 @@ #pragma warning disable CS1591 #pragma warning disable SA1600 -using System; using System.Collections.Generic; using System.Linq; using Emby.Server.Implementations.Images; diff --git a/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs b/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs index 3d8d15d197..30b654886b 100644 --- a/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs +++ b/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Globalization; using System.IO; using Emby.Server.Implementations.AppBase; diff --git a/Emby.Server.Implementations/Devices/DeviceManager.cs b/Emby.Server.Implementations/Devices/DeviceManager.cs index ef73170506..2bd0b840a5 100644 --- a/Emby.Server.Implementations/Devices/DeviceManager.cs +++ b/Emby.Server.Implementations/Devices/DeviceManager.cs @@ -243,7 +243,7 @@ namespace Emby.Server.Implementations.Devices try { - using (var fs = _fileSystem.GetFileStream(path, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read)) + using (var fs = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Read)) { await stream.CopyToAsync(fs).ConfigureAwait(false); } diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index 77333a03d0..f8560ca856 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -29,11 +29,11 @@ - - - + + + - + diff --git a/Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs b/Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs deleted file mode 100644 index a6eb1152fb..0000000000 --- a/Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs +++ /dev/null @@ -1,128 +0,0 @@ -#pragma warning disable CS1591 -#pragma warning disable SA1600 - -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using MediaBrowser.Controller; -using MediaBrowser.Controller.Configuration; -using MediaBrowser.Controller.LiveTv; -using MediaBrowser.Controller.Plugins; -using MediaBrowser.Controller.Session; -using MediaBrowser.Model.LiveTv; -using MediaBrowser.Model.Tasks; -using Microsoft.Extensions.Logging; - -namespace Emby.Server.Implementations.EntryPoints -{ - public class AutomaticRestartEntryPoint : IServerEntryPoint - { - private readonly IServerApplicationHost _appHost; - private readonly ILogger _logger; - private readonly ITaskManager _iTaskManager; - private readonly ISessionManager _sessionManager; - private readonly IServerConfigurationManager _config; - private readonly ILiveTvManager _liveTvManager; - - private Timer _timer; - - public AutomaticRestartEntryPoint(IServerApplicationHost appHost, ILogger logger, ITaskManager iTaskManager, ISessionManager sessionManager, IServerConfigurationManager config, ILiveTvManager liveTvManager) - { - _appHost = appHost; - _logger = logger; - _iTaskManager = iTaskManager; - _sessionManager = sessionManager; - _config = config; - _liveTvManager = liveTvManager; - } - - public Task RunAsync() - { - if (_appHost.CanSelfRestart) - { - _appHost.HasPendingRestartChanged += _appHost_HasPendingRestartChanged; - } - - return Task.CompletedTask; - } - - void _appHost_HasPendingRestartChanged(object sender, EventArgs e) - { - DisposeTimer(); - - if (_appHost.HasPendingRestart) - { - _timer = new Timer(TimerCallback, null, TimeSpan.FromMinutes(15), TimeSpan.FromMinutes(15)); - } - } - - private async void TimerCallback(object state) - { - if (_config.Configuration.EnableAutomaticRestart) - { - var isIdle = await IsIdle().ConfigureAwait(false); - - if (isIdle) - { - DisposeTimer(); - - _logger.LogInformation("Automatically restarting the system because it is idle and a restart is required."); - - try - { - _appHost.Restart(); - } - catch (Exception ex) - { - _logger.LogError(ex, "Error restarting server"); - } - } - } - } - - private async Task IsIdle() - { - if (_iTaskManager.ScheduledTasks.Any(i => i.State != TaskState.Idle)) - { - return false; - } - - if (_liveTvManager.Services.Count == 1) - { - try - { - var timers = await _liveTvManager.GetTimers(new TimerQuery(), CancellationToken.None).ConfigureAwait(false); - if (timers.Items.Any(i => i.Status == RecordingStatus.InProgress)) - { - return false; - } - } - catch (Exception ex) - { - _logger.LogError(ex, "Error getting timers"); - } - } - - var now = DateTime.UtcNow; - - return !_sessionManager.Sessions.Any(i => (now - i.LastActivityDate).TotalMinutes < 30); - } - - public void Dispose() - { - _appHost.HasPendingRestartChanged -= _appHost_HasPendingRestartChanged; - - DisposeTimer(); - } - - private void DisposeTimer() - { - if (_timer != null) - { - _timer.Dispose(); - _timer = null; - } - } - } -} diff --git a/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs b/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs index f85d52dbc1..06458baedc 100644 --- a/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs +++ b/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs @@ -16,7 +16,6 @@ using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Session; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Events; -using MediaBrowser.Model.Extensions; using Microsoft.Extensions.Logging; namespace Emby.Server.Implementations.EntryPoints diff --git a/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs b/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs index a83817cb96..529f835606 100644 --- a/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs +++ b/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs @@ -1,4 +1,3 @@ -using System; using System.Threading; using System.Threading.Tasks; using Emby.Server.Implementations.Udp; diff --git a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs index 50233ea485..8a2bc83fb0 100644 --- a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs +++ b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs @@ -197,7 +197,7 @@ namespace Emby.Server.Implementations.HttpClientManager if (File.Exists(responseCachePath) && _fileSystem.GetLastWriteTimeUtc(responseCachePath).Add(cacheLength) > DateTime.UtcNow) { - var stream = _fileSystem.GetFileStream(responseCachePath, FileOpenMode.Open, FileAccessMode.Read, FileShareMode.Read, true); + var stream = new FileStream(responseCachePath, FileMode.Open, FileAccess.Read, FileShare.Read, IODefaults.FileStreamBufferSize, true); return new HttpResponseInfo { @@ -220,7 +220,7 @@ namespace Emby.Server.Implementations.HttpClientManager FileMode.Create, FileAccess.Write, FileShare.None, - StreamDefaults.DefaultFileStreamBufferSize, + IODefaults.FileStreamBufferSize, true)) { await response.Content.CopyToAsync(fileStream).ConfigureAwait(false); diff --git a/Emby.Server.Implementations/HttpServer/FileWriter.cs b/Emby.Server.Implementations/HttpServer/FileWriter.cs index 1795651fd7..d36f230d64 100644 --- a/Emby.Server.Implementations/HttpServer/FileWriter.cs +++ b/Emby.Server.Implementations/HttpServer/FileWriter.cs @@ -72,7 +72,7 @@ namespace Emby.Server.Implementations.HttpServer SetRangeValues(); } - FileShare = FileShareMode.Read; + FileShare = FileShare.Read; Cookies = new List(); } @@ -94,7 +94,7 @@ namespace Emby.Server.Implementations.HttpServer public List Cookies { get; private set; } - public FileShareMode FileShare { get; set; } + public FileShare FileShare { get; set; } /// /// Gets the options. @@ -222,17 +222,17 @@ namespace Emby.Server.Implementations.HttpServer } } - public async Task TransmitFile(Stream stream, string path, long offset, long count, FileShareMode fileShareMode, CancellationToken cancellationToken) + public async Task TransmitFile(Stream stream, string path, long offset, long count, FileShare fileShare, CancellationToken cancellationToken) { - var fileOpenOptions = FileOpenOptions.SequentialScan; + var fileOptions = FileOptions.SequentialScan; // use non-async filestream along with read due to https://github.com/dotnet/corefx/issues/6039 if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - fileOpenOptions |= FileOpenOptions.Asynchronous; + fileOptions |= FileOptions.Asynchronous; } - using (var fs = _fileSystem.GetFileStream(path, FileOpenMode.Open, FileAccessMode.Read, fileShareMode, fileOpenOptions)) + using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read, fileShare, IODefaults.FileStreamBufferSize, fileOptions)) { if (offset > 0) { @@ -245,7 +245,7 @@ namespace Emby.Server.Implementations.HttpServer } else { - await fs.CopyToAsync(stream, StreamDefaults.DefaultCopyToBufferSize, cancellationToken).ConfigureAwait(false); + await fs.CopyToAsync(stream, IODefaults.CopyToBufferSize, cancellationToken).ConfigureAwait(false); } } } diff --git a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs index cefcaa835f..98a4f140e3 100644 --- a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs +++ b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs @@ -440,7 +440,7 @@ namespace Emby.Server.Implementations.HttpServer public Task GetStaticFileResult(IRequest requestContext, string path, - FileShareMode fileShare = FileShareMode.Read) + FileShare fileShare = FileShare.Read) { if (string.IsNullOrEmpty(path)) { @@ -464,7 +464,7 @@ namespace Emby.Server.Implementations.HttpServer throw new ArgumentException("Path can't be empty.", nameof(options)); } - if (fileShare != FileShareMode.Read && fileShare != FileShareMode.ReadWrite) + if (fileShare != FileShare.Read && fileShare != FileShare.ReadWrite) { throw new ArgumentException("FileShare must be either Read or ReadWrite"); } @@ -492,9 +492,9 @@ namespace Emby.Server.Implementations.HttpServer /// The path. /// The file share. /// Stream. - private Stream GetFileStream(string path, FileShareMode fileShare) + private Stream GetFileStream(string path, FileShare fileShare) { - return _fileSystem.GetFileStream(path, FileOpenMode.Open, FileAccessMode.Read, fileShare); + return new FileStream(path, FileMode.Open, FileAccess.Read, fileShare); } public Task GetStaticResult(IRequest requestContext, diff --git a/Emby.Server.Implementations/IO/ManagedFileSystem.cs b/Emby.Server.Implementations/IO/ManagedFileSystem.cs index 68417876cf..da5a4d50ed 100644 --- a/Emby.Server.Implementations/IO/ManagedFileSystem.cs +++ b/Emby.Server.Implementations/IO/ManagedFileSystem.cs @@ -365,87 +365,6 @@ namespace Emby.Server.Implementations.IO return GetLastWriteTimeUtc(GetFileSystemInfo(path)); } - /// - /// Gets the file stream. - /// - /// The path. - /// The mode. - /// The access. - /// The share. - /// if set to true [is asynchronous]. - /// FileStream. - public virtual Stream GetFileStream(string path, FileOpenMode mode, FileAccessMode access, FileShareMode share, bool isAsync = false) - { - if (isAsync) - { - return GetFileStream(path, mode, access, share, FileOpenOptions.Asynchronous); - } - - return GetFileStream(path, mode, access, share, FileOpenOptions.None); - } - - public virtual Stream GetFileStream(string path, FileOpenMode mode, FileAccessMode access, FileShareMode share, FileOpenOptions fileOpenOptions) - => new FileStream(path, GetFileMode(mode), GetFileAccess(access), GetFileShare(share), 4096, GetFileOptions(fileOpenOptions)); - - private static FileOptions GetFileOptions(FileOpenOptions mode) - { - var val = (int)mode; - return (FileOptions)val; - } - - private static FileMode GetFileMode(FileOpenMode mode) - { - switch (mode) - { - //case FileOpenMode.Append: - // return FileMode.Append; - case FileOpenMode.Create: - return FileMode.Create; - case FileOpenMode.CreateNew: - return FileMode.CreateNew; - case FileOpenMode.Open: - return FileMode.Open; - case FileOpenMode.OpenOrCreate: - return FileMode.OpenOrCreate; - //case FileOpenMode.Truncate: - // return FileMode.Truncate; - default: - throw new Exception("Unrecognized FileOpenMode"); - } - } - - private static FileAccess GetFileAccess(FileAccessMode mode) - { - switch (mode) - { - //case FileAccessMode.ReadWrite: - // return FileAccess.ReadWrite; - case FileAccessMode.Write: - return FileAccess.Write; - case FileAccessMode.Read: - return FileAccess.Read; - default: - throw new Exception("Unrecognized FileAccessMode"); - } - } - - private static FileShare GetFileShare(FileShareMode mode) - { - switch (mode) - { - case FileShareMode.ReadWrite: - return FileShare.ReadWrite; - case FileShareMode.Write: - return FileShare.Write; - case FileShareMode.Read: - return FileShare.Read; - case FileShareMode.None: - return FileShare.None; - default: - throw new Exception("Unrecognized FileShareMode"); - } - } - public virtual void SetHidden(string path, bool isHidden) { if (OperatingSystem.Id != OperatingSystemId.Windows) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 5c04631da9..d983c1dc63 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -710,10 +710,10 @@ namespace Emby.Server.Implementations.Library } /// - /// Creates the root media folder + /// Creates the root media folder. /// /// AggregateFolder. - /// Cannot create the root folder until plugins have loaded + /// Cannot create the root folder until plugins have loaded. public AggregateFolder CreateRootFolder() { var rootFolderPath = ConfigurationManager.ApplicationPaths.RootFolderPath; @@ -824,7 +824,6 @@ namespace Emby.Server.Implementations.Library { // If this returns multiple items it could be tricky figuring out which one is correct. // In most cases, the newest one will be and the others obsolete but not yet cleaned up - if (string.IsNullOrEmpty(path)) { throw new ArgumentNullException(nameof(path)); @@ -844,7 +843,7 @@ namespace Emby.Server.Implementations.Library } /// - /// Gets a Person + /// Gets the person. /// /// The name. /// Task{Person}. @@ -854,7 +853,7 @@ namespace Emby.Server.Implementations.Library } /// - /// Gets a Studio + /// Gets the studio. /// /// The name. /// Task{Studio}. @@ -879,7 +878,7 @@ namespace Emby.Server.Implementations.Library } /// - /// Gets a Genre + /// Gets the genre. /// /// The name. /// Task{Genre}. @@ -889,7 +888,7 @@ namespace Emby.Server.Implementations.Library } /// - /// Gets the genre. + /// Gets the music genre. /// /// The name. /// Task{MusicGenre}. @@ -899,7 +898,7 @@ namespace Emby.Server.Implementations.Library } /// - /// Gets a Year + /// Gets the year. /// /// The value. /// Task{Year}. @@ -1076,9 +1075,9 @@ namespace Emby.Server.Implementations.Library var innerProgress = new ActionableProgress(); - innerProgress.RegisterAction(pct => progress.Report(pct * .96)); + innerProgress.RegisterAction(pct => progress.Report(pct * pct * 0.96)); - // Now validate the entire media library + // Validate the entire media library await RootFolder.ValidateChildren(innerProgress, cancellationToken, new MetadataRefreshOptions(new DirectoryService(_fileSystem)), recursive: true).ConfigureAwait(false); progress.Report(96); @@ -1087,7 +1086,6 @@ namespace Emby.Server.Implementations.Library innerProgress.RegisterAction(pct => progress.Report(96 + (pct * .04))); - // Run post-scan tasks await RunPostScanTasks(innerProgress, cancellationToken).ConfigureAwait(false); progress.Report(100); @@ -1138,7 +1136,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError(ex, "Error running postscan task"); + _logger.LogError(ex, "Error running post-scan task"); } numComplete++; diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs index 656eeb1459..6e203f894f 100644 --- a/Emby.Server.Implementations/Library/UserManager.cs +++ b/Emby.Server.Implementations/Library/UserManager.cs @@ -291,10 +291,11 @@ namespace Emby.Server.Implementations.Library && authenticationProvider != null && !(authenticationProvider is DefaultAuthenticationProvider)) { - // We should trust the user that the authprovider says, not what was typed + // Trust the username returned by the authentication provider username = updatedUsername; - // Search the database for the user again; the authprovider might have created it + // Search the database for the user again + // the authentication provider might have created it user = Users .FirstOrDefault(i => string.Equals(username, i.Name, StringComparison.OrdinalIgnoreCase)); @@ -667,7 +668,7 @@ namespace Emby.Server.Implementations.Library throw new ArgumentException("Invalid username", nameof(newName)); } - if (user.Name.Equals(newName, StringComparison.OrdinalIgnoreCase)) + if (user.Name.Equals(newName, StringComparison.Ordinal)) { throw new ArgumentException("The new and old names must be different."); } diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs index 84e8c31f95..161cf60516 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs @@ -15,14 +15,12 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV { private readonly ILogger _logger; private readonly IHttpClient _httpClient; - private readonly IFileSystem _fileSystem; private readonly IStreamHelper _streamHelper; - public DirectRecorder(ILogger logger, IHttpClient httpClient, IFileSystem fileSystem, IStreamHelper streamHelper) + public DirectRecorder(ILogger logger, IHttpClient httpClient, IStreamHelper streamHelper) { _logger = logger; _httpClient = httpClient; - _fileSystem = fileSystem; _streamHelper = streamHelper; } @@ -45,7 +43,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV { Directory.CreateDirectory(Path.GetDirectoryName(targetFile)); - using (var output = _fileSystem.GetFileStream(targetFile, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read)) + using (var output = new FileStream(targetFile, FileMode.Create, FileAccess.Write, FileShare.Read)) { onStarted(); @@ -81,7 +79,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV Directory.CreateDirectory(Path.GetDirectoryName(targetFile)); - using (var output = _fileSystem.GetFileStream(targetFile, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read)) + using (var output = new FileStream(targetFile, FileMode.Create, FileAccess.Write, FileShare.Read)) { onStarted(); diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index f4d6cd4d3a..4ac48e5378 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -427,7 +427,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV { foreach (NameValuePair mapping in mappings) { - if (StringHelper.EqualsIgnoreCase(mapping.Name, channelId)) + if (string.Equals(mapping.Name, channelId, StringComparison.OrdinalIgnoreCase)) { return mapping.Value; } @@ -1664,10 +1664,10 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV { if (mediaSource.RequiresLooping || !(mediaSource.Container ?? string.Empty).EndsWith("ts", StringComparison.OrdinalIgnoreCase) || (mediaSource.Protocol != MediaProtocol.File && mediaSource.Protocol != MediaProtocol.Http)) { - return new EncodedRecorder(_logger, _fileSystem, _mediaEncoder, _config.ApplicationPaths, _jsonSerializer, _processFactory, _config); + return new EncodedRecorder(_logger, _mediaEncoder, _config.ApplicationPaths, _jsonSerializer, _processFactory, _config); } - return new DirectRecorder(_logger, _httpClient, _fileSystem, _streamHelper); + return new DirectRecorder(_logger, _httpClient, _streamHelper); } private void OnSuccessfulRecording(TimerInfo timer, string path) @@ -1888,7 +1888,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV return; } - using (var stream = _fileSystem.GetFileStream(nfoPath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read)) + using (var stream = new FileStream(nfoPath, FileMode.Create, FileAccess.Write, FileShare.Read)) { var settings = new XmlWriterSettings { @@ -1952,7 +1952,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV return; } - using (var stream = _fileSystem.GetFileStream(nfoPath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read)) + using (var stream = new FileStream(nfoPath, FileMode.Create, FileAccess.Write, FileShare.Read)) { var settings = new XmlWriterSettings { diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs index cc9c8e5d29..6e4ac2fecc 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Globalization; using System.IO; -using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -14,7 +13,6 @@ using MediaBrowser.Controller.MediaEncoding; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Diagnostics; using MediaBrowser.Model.Dto; -using MediaBrowser.Model.Entities; using MediaBrowser.Model.IO; using MediaBrowser.Model.Serialization; using Microsoft.Extensions.Logging; @@ -24,7 +22,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV public class EncodedRecorder : IRecorder { private readonly ILogger _logger; - private readonly IFileSystem _fileSystem; private readonly IMediaEncoder _mediaEncoder; private readonly IServerApplicationPaths _appPaths; private bool _hasExited; @@ -38,7 +35,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV public EncodedRecorder( ILogger logger, - IFileSystem fileSystem, IMediaEncoder mediaEncoder, IServerApplicationPaths appPaths, IJsonSerializer json, @@ -46,7 +42,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV IServerConfigurationManager config) { _logger = logger; - _fileSystem = fileSystem; _mediaEncoder = mediaEncoder; _appPaths = appPaths; _json = json; @@ -107,7 +102,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV Directory.CreateDirectory(Path.GetDirectoryName(logFilePath)); // FFMpeg writes debug/error info to stderr. This is useful when debugging so let's put it in the log directory. - _logFileStream = _fileSystem.GetFileStream(logFilePath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, true); + _logFileStream = new FileStream(logFilePath, FileMode.Create, FileAccess.Write, FileShare.Read, IODefaults.FileStreamBufferSize, true); var commandLineLogMessageBytes = Encoding.UTF8.GetBytes(_json.SerializeToString(mediaSource) + Environment.NewLine + Environment.NewLine + commandLineLogMessage + Environment.NewLine + Environment.NewLine); _logFileStream.Write(commandLineLogMessageBytes, 0, commandLineLogMessageBytes.Length); diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs index 1d55e7992e..862b9fdfed 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs @@ -96,7 +96,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts FileMode.Open, FileAccess.Read, FileShare.ReadWrite, - StreamDefaults.DefaultFileStreamBufferSize, + IODefaults.FileStreamBufferSize, allowAsyncFileRead ? FileOptions.SequentialScan | FileOptions.Asynchronous : FileOptions.SequentialScan); public Task DeleteTempFiles() @@ -199,7 +199,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts await StreamHelper.CopyToAsync( inputStream, stream, - StreamDefaults.DefaultCopyToBufferSize, + IODefaults.CopyToBufferSize, emptyReadLimit, cancellationToken).ConfigureAwait(false); } diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs index 3d2267e755..51f61bac76 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs @@ -10,7 +10,6 @@ using MediaBrowser.Common.Extensions; using MediaBrowser.Common.Net; using MediaBrowser.Controller; using MediaBrowser.Controller.LiveTv; -using MediaBrowser.Model.Extensions; using Microsoft.Extensions.Logging; namespace Emby.Server.Implementations.LiveTv.TunerHosts diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/SharedHttpStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/SharedHttpStream.cs index 0d94f4b329..99244eb625 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/SharedHttpStream.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/SharedHttpStream.cs @@ -127,12 +127,12 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts Logger.LogInformation("Beginning {0} stream to {1}", GetType().Name, TempFilePath); using (response) using (var stream = response.Content) - using (var fileStream = FileSystem.GetFileStream(TempFilePath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, FileOpenOptions.None)) + using (var fileStream = new FileStream(TempFilePath, FileMode.Create, FileAccess.Write, FileShare.Read)) { await StreamHelper.CopyToAsync( stream, fileStream, - StreamDefaults.DefaultCopyToBufferSize, + IODefaults.CopyToBufferSize, () => Resolve(openTaskCompletionSource), cancellationToken).ConfigureAwait(false); } diff --git a/Emby.Server.Implementations/Localization/Core/ar.json b/Emby.Server.Implementations/Localization/Core/ar.json index 4da3cdd3b7..f0f165b22a 100644 --- a/Emby.Server.Implementations/Localization/Core/ar.json +++ b/Emby.Server.Implementations/Localization/Core/ar.json @@ -9,7 +9,7 @@ "Channels": "القنوات", "ChapterNameValue": "الباب {0}", "Collections": "مجموعات", - "DeviceOfflineWithName": "تم قطع الاتصال بـ{0}", + "DeviceOfflineWithName": "تم قطع اتصال {0}", "DeviceOnlineWithName": "{0} متصل", "FailedLoginAttemptWithUserName": "عملية تسجيل الدخول فشلت من {0}", "Favorites": "التفضيلات", @@ -75,8 +75,8 @@ "Songs": "الأغاني", "StartupEmbyServerIsLoading": "سيرفر Jellyfin قيد التشغيل . الرجاء المحاولة بعد قليل.", "SubtitleDownloadFailureForItem": "عملية إنزال الترجمة فشلت لـ{0}", - "SubtitleDownloadFailureFromForItem": "الترجمات فشلت في التحميل من {0} لـ {1}", - "SubtitlesDownloadedForItem": "تم تحميل الترجمات لـ {0}", + "SubtitleDownloadFailureFromForItem": "الترجمات فشلت في التحميل من {0} الى {1}", + "SubtitlesDownloadedForItem": "تم تحميل الترجمات الى {0}", "Sync": "مزامنة", "System": "النظام", "TvShows": "البرامج التلفزيونية", @@ -88,7 +88,7 @@ "UserOfflineFromDevice": "تم قطع اتصال {0} من {1}", "UserOnlineFromDevice": "{0} متصل عبر {1}", "UserPasswordChangedWithName": "تم تغيير كلمة السر للمستخدم {0}", - "UserPolicyUpdatedWithName": "سياسة المستخدمين تم تحديثها لـ {0}", + "UserPolicyUpdatedWithName": "تم تحديث سياسة المستخدم {0}", "UserStartedPlayingItemWithValues": "قام {0} ببدء تشغيل {1} على {2}", "UserStoppedPlayingItemWithValues": "قام {0} بإيقاف تشغيل {1} على {2}", "ValueHasBeenAddedToLibrary": "{0} تم اضافتها الى مكتبة الوسائط", diff --git a/Emby.Server.Implementations/Localization/Core/ca.json b/Emby.Server.Implementations/Localization/Core/ca.json index 9961b09841..44e7cf0ce6 100644 --- a/Emby.Server.Implementations/Localization/Core/ca.json +++ b/Emby.Server.Implementations/Localization/Core/ca.json @@ -3,9 +3,9 @@ "AppDeviceValues": "Aplicació: {0}, Dispositiu: {1}", "Application": "Aplicació", "Artists": "Artistes", - "AuthenticationSucceededWithUserName": "{0} s'ha autenticat correctament", + "AuthenticationSucceededWithUserName": "{0} s'ha autentificat correctament", "Books": "Llibres", - "CameraImageUploadedFrom": "Una nova imatge de càmera ha sigut pujada des de {0}", + "CameraImageUploadedFrom": "Una nova imatge de la càmera ha sigut pujada des de {0}", "Channels": "Canals", "ChapterNameValue": "Episodi {0}", "Collections": "Col·leccions", diff --git a/Emby.Server.Implementations/Localization/Core/fil.json b/Emby.Server.Implementations/Localization/Core/fil.json new file mode 100644 index 0000000000..66db059d97 --- /dev/null +++ b/Emby.Server.Implementations/Localization/Core/fil.json @@ -0,0 +1,95 @@ +{ + "VersionNumber": "Bersyon {0}", + "ValueSpecialEpisodeName": "Espesyal - {0}", + "ValueHasBeenAddedToLibrary": "Naidagdag na ang {0} sa iyong media library", + "UserStoppedPlayingItemWithValues": "Natapos ni {0} ang {1} sa {2}", + "UserStartedPlayingItemWithValues": "Si {0} ay nagplaplay ng {1} sa {2}", + "UserPolicyUpdatedWithName": "Ang user policy ay naiupdate para kay {0}", + "UserPasswordChangedWithName": "Napalitan na ang password ni {0}", + "UserOnlineFromDevice": "Si {0} ay nakakonekta galing sa {1}", + "UserOfflineFromDevice": "Si {0} ay nadiskonekta galing sa {1}", + "UserLockedOutWithName": "Si {0} ay nalock out", + "UserDownloadingItemWithValues": "Nagdadownload si {0} ng {1}", + "UserDeletedWithName": "Natanggal na is user {0}", + "UserCreatedWithName": "Nagawa na si user {0}", + "User": "User", + "TvShows": "Pelikula", + "System": "Sistema", + "Sync": "Pag-sync", + "SubtitlesDownloadedForItem": "Naidownload na ang subtitles {0}", + "SubtitleDownloadFailureFromForItem": "Hindi naidownload ang subtitles {0} para sa {1}", + "StartupEmbyServerIsLoading": "Nagloload ang Jellyfin Server. Sandaling maghintay.", + "Songs": "Kanta", + "Shows": "Pelikula", + "ServerNameNeedsToBeRestarted": "Kailangan irestart ang {0}", + "ScheduledTaskStartedWithName": "Nagsimula na ang {0}", + "ScheduledTaskFailedWithName": "Hindi gumana and {0}", + "ProviderValue": "Ang provider ay {0}", + "PluginUpdatedWithName": "Naiupdate na ang {0}", + "PluginUninstalledWithName": "Naiuninstall na ang {0}", + "PluginInstalledWithName": "Nainstall na ang {0}", + "Plugin": "Plugin", + "Playlists": "Playlists", + "Photos": "Larawan", + "NotificationOptionVideoPlaybackStopped": "Huminto na ang pelikula", + "NotificationOptionVideoPlayback": "Nagsimula na ang pelikula", + "NotificationOptionUserLockedOut": "Nakalock out ang user", + "NotificationOptionTaskFailed": "Hindi gumana ang scheduled task", + "NotificationOptionServerRestartRequired": "Kailangan irestart ang server", + "NotificationOptionPluginUpdateInstalled": "Naiupdate na ang plugin", + "NotificationOptionPluginUninstalled": "Naiuninstall na ang plugin", + "NotificationOptionPluginInstalled": "Nainstall na ang plugin", + "NotificationOptionPluginError": "Hindi gumagana ang plugin", + "NotificationOptionNewLibraryContent": "May bagong content na naidagdag", + "NotificationOptionInstallationFailed": "Hindi nainstall ng mabuti", + "NotificationOptionCameraImageUploaded": "Naiupload na ang picture", + "NotificationOptionAudioPlaybackStopped": "Huminto na ang patugtog", + "NotificationOptionAudioPlayback": "Nagsimula na ang patugtog", + "NotificationOptionApplicationUpdateInstalled": "Naiupdate na ang aplikasyon", + "NotificationOptionApplicationUpdateAvailable": "May bagong update ang aplikasyon", + "NewVersionIsAvailable": "May bagong version ng Jellyfin Server na pwede idownload.", + "NameSeasonUnknown": "Hindi alam ang season", + "NameSeasonNumber": "Season {0}", + "NameInstallFailed": "Hindi nainstall ang {0}", + "MusicVideos": "Music video", + "Music": "Kanta", + "Movies": "Pelikula", + "MixedContent": "Halo-halong content", + "MessageServerConfigurationUpdated": "Naiupdate na ang server configuration", + "MessageNamedServerConfigurationUpdatedWithValue": "Naiupdate na ang server configuration section {0}", + "MessageApplicationUpdatedTo": "Ang Jellyfin Server ay naiupdate to {0}", + "MessageApplicationUpdated": "Naiupdate na ang Jellyfin Server", + "Latest": "Pinakabago", + "LabelRunningTimeValue": "Oras: {0}", + "LabelIpAddressValue": "Ang IP Address ay {0}", + "ItemRemovedWithName": "Naitanggal ang {0} sa library", + "ItemAddedWithName": "Naidagdag ang {0} sa library", + "Inherit": "Manahin", + "HeaderRecordingGroups": "Pagtatalang Grupo", + "HeaderNextUp": "Susunod", + "HeaderLiveTV": "Live TV", + "HeaderFavoriteSongs": "Paboritong Kanta", + "HeaderFavoriteShows": "Paboritong Pelikula", + "HeaderFavoriteEpisodes": "Paboritong Episodes", + "HeaderFavoriteArtists": "Paboritong Artista", + "HeaderFavoriteAlbums": "Paboritong Albums", + "HeaderContinueWatching": "Ituloy Manood", + "HeaderCameraUploads": "Camera Uploads", + "HeaderAlbumArtists": "Artista ng Album", + "Genres": "Kategorya", + "Folders": "Folders", + "Favorites": "Paborito", + "FailedLoginAttemptWithUserName": "maling login galing {0}", + "DeviceOnlineWithName": "nakakonekta si {0}", + "DeviceOfflineWithName": "nadiskonekta si {0}", + "Collections": "Koleksyon", + "ChapterNameValue": "Kabanata {0}", + "Channels": "Channel", + "CameraImageUploadedFrom": "May bagong larawan na naupload galing {0}", + "Books": "Libro", + "AuthenticationSucceededWithUserName": "{0} na patunayan", + "Artists": "Artista", + "Application": "Aplikasyon", + "AppDeviceValues": "Aplikasyon: {0}, Aparato: {1}", + "Albums": "Albums" +} diff --git a/Emby.Server.Implementations/Localization/Core/gl.json b/Emby.Server.Implementations/Localization/Core/gl.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/Emby.Server.Implementations/Localization/Core/gl.json @@ -0,0 +1 @@ +{} diff --git a/Emby.Server.Implementations/Localization/Core/id.json b/Emby.Server.Implementations/Localization/Core/id.json index 8d17ad38e1..13415eda50 100644 --- a/Emby.Server.Implementations/Localization/Core/id.json +++ b/Emby.Server.Implementations/Localization/Core/id.json @@ -6,7 +6,7 @@ "MessageApplicationUpdatedTo": "Jellyfin Server sudah diperbarui ke {0}", "MessageApplicationUpdated": "Jellyfin Server sudah diperbarui", "Latest": "Terbaru", - "LabelIpAddressValue": "IP address: {0}", + "LabelIpAddressValue": "Alamat IP: {0}", "ItemRemovedWithName": "{0} sudah dikeluarkan dari perpustakaan", "ItemAddedWithName": "{0} sudah dimasukkan ke dalam perpustakaan", "Inherit": "Warisan", @@ -28,5 +28,63 @@ "Collections": "Koleksi", "Books": "Buku", "Artists": "Artis", - "Application": "Aplikasi" + "Application": "Aplikasi", + "ChapterNameValue": "Bagian {0}", + "Channels": "Saluran", + "TvShows": "Seri TV", + "SubtitleDownloadFailureFromForItem": "Talop gagal diunduh dari {0} untuk {1}", + "StartupEmbyServerIsLoading": "Peladen Jellyfin sedang dimuat. Silakan coba kembali beberapa saat lagi.", + "Songs": "Lagu", + "Playlists": "Daftar putar", + "NotificationOptionPluginUninstalled": "Plugin dilepas", + "MusicVideos": "Video musik", + "VersionNumber": "Versi {0}", + "ValueSpecialEpisodeName": "Spesial - {0}", + "ValueHasBeenAddedToLibrary": "{0} telah ditambahkan ke pustaka media Anda", + "UserStoppedPlayingItemWithValues": "{0} telah selesai memutar {1} pada {2}", + "UserStartedPlayingItemWithValues": "{0} sedang memutar {1} pada {2}", + "UserPolicyUpdatedWithName": "Kebijakan pengguna telah diperbarui untuk {0}", + "UserPasswordChangedWithName": "Kata sandi telah diubah untuk pengguna {0}", + "UserOnlineFromDevice": "{0} sedang daring dari {1}", + "UserOfflineFromDevice": "{0} telah terputus dari {1}", + "UserLockedOutWithName": "Pengguna {0} telah dikunci", + "UserDownloadingItemWithValues": "{0} sedang mengunduh {1}", + "UserDeletedWithName": "Pengguna {0} telah dihapus", + "UserCreatedWithName": "Pengguna {0} telah dibuat", + "User": "Pengguna", + "System": "Sistem", + "Sync": "Sinkron", + "SubtitlesDownloadedForItem": "Talop telah diunduh untuk {0}", + "Shows": "Tayangan", + "ServerNameNeedsToBeRestarted": "{0} perlu dimuat ulang", + "ScheduledTaskStartedWithName": "{0} dimulai", + "ScheduledTaskFailedWithName": "{0} gagal", + "ProviderValue": "Penyedia: {0}", + "PluginUpdatedWithName": "{0} telah diperbarui", + "PluginInstalledWithName": "{0} telah dipasang", + "Plugin": "Plugin", + "Photos": "Foto", + "NotificationOptionUserLockedOut": "Pengguna terkunci", + "NotificationOptionTaskFailed": "Kegagalan tugas terjadwal", + "NotificationOptionServerRestartRequired": "Restart peladen dibutuhkan", + "NotificationOptionPluginUpdateInstalled": "Pembaruan plugin terpasang", + "NotificationOptionPluginInstalled": "Plugin terpasang", + "NotificationOptionPluginError": "Kegagalan plugin", + "NotificationOptionNewLibraryContent": "Konten baru ditambahkan", + "NotificationOptionInstallationFailed": "Kegagalan pemasangan", + "NotificationOptionCameraImageUploaded": "Gambar kamera terunggah", + "NotificationOptionApplicationUpdateInstalled": "Pembaruan aplikasi terpasang", + "NotificationOptionApplicationUpdateAvailable": "Pembaruan aplikasi tersedia", + "NewVersionIsAvailable": "Sebuah versi baru dari Peladen Jellyfin tersedia untuk diunduh.", + "NameSeasonUnknown": "Musim tak diketahui", + "NameSeasonNumber": "Musim {0}", + "NameInstallFailed": "{0} instalasi gagal", + "Music": "Musik", + "Movies": "Film", + "MessageServerConfigurationUpdated": "Konfigurasi peladen telah diperbarui", + "MessageNamedServerConfigurationUpdatedWithValue": "Konfigurasi peladen bagian {0} telah diperbarui", + "FailedLoginAttemptWithUserName": "Percobaan login gagal dari {0}", + "CameraImageUploadedFrom": "Sebuah gambar baru telah diunggah dari {0}", + "DeviceOfflineWithName": "{0} telah terputus", + "DeviceOnlineWithName": "{0} telah terhubung" } diff --git a/Emby.Server.Implementations/Localization/Core/sl-SI.json b/Emby.Server.Implementations/Localization/Core/sl-SI.json index c141a40f6e..b43cfbb747 100644 --- a/Emby.Server.Implementations/Localization/Core/sl-SI.json +++ b/Emby.Server.Implementations/Localization/Core/sl-SI.json @@ -12,7 +12,7 @@ "DeviceOfflineWithName": "{0} je prekinil povezavo", "DeviceOnlineWithName": "{0} je povezan", "FailedLoginAttemptWithUserName": "Neuspešen poskus prijave z {0}", - "Favorites": "Priljubljeni", + "Favorites": "Priljubljeno", "Folders": "Mape", "Genres": "Zvrsti", "HeaderAlbumArtists": "Izvajalci albuma", diff --git a/Emby.Server.Implementations/Localization/Core/zh-CN.json b/Emby.Server.Implementations/Localization/Core/zh-CN.json index a567e6e2d3..e0daac8a59 100644 --- a/Emby.Server.Implementations/Localization/Core/zh-CN.json +++ b/Emby.Server.Implementations/Localization/Core/zh-CN.json @@ -79,7 +79,7 @@ "SubtitlesDownloadedForItem": "已为 {0} 下载了字幕", "Sync": "同步", "System": "系统", - "TvShows": "电视节目", + "TvShows": "电视剧", "User": "用户", "UserCreatedWithName": "用户 {0} 已创建", "UserDeletedWithName": "用户 {0} 已删除", diff --git a/Emby.Server.Implementations/Net/SocketFactory.cs b/Emby.Server.Implementations/Net/SocketFactory.cs index 4e04cde78c..e42ff8496e 100644 --- a/Emby.Server.Implementations/Net/SocketFactory.cs +++ b/Emby.Server.Implementations/Net/SocketFactory.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Net; using System.Net.Sockets; using MediaBrowser.Model.Net; diff --git a/Emby.Server.Implementations/Net/WebSocketConnectEventArgs.cs b/Emby.Server.Implementations/Net/WebSocketConnectEventArgs.cs index e3047d3926..6880766f9a 100644 --- a/Emby.Server.Implementations/Net/WebSocketConnectEventArgs.cs +++ b/Emby.Server.Implementations/Net/WebSocketConnectEventArgs.cs @@ -1,6 +1,4 @@ using System; -using System.Net.WebSockets; -using MediaBrowser.Model.Services; using Microsoft.AspNetCore.Http; namespace Emby.Server.Implementations.Net diff --git a/Emby.Server.Implementations/Playlists/PlaylistImageProvider.cs b/Emby.Server.Implementations/Playlists/PlaylistImageProvider.cs index 2dfe59088d..bb56d9771b 100644 --- a/Emby.Server.Implementations/Playlists/PlaylistImageProvider.cs +++ b/Emby.Server.Implementations/Playlists/PlaylistImageProvider.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; using System.Linq; using Emby.Server.Implementations.Images; diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs index ecd5262510..5822c467b7 100644 --- a/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs @@ -70,7 +70,7 @@ namespace Emby.Server.Implementations.ScheduledTasks } /// - /// Returns the task to be executed + /// Returns the task to be executed. /// /// The cancellation token. /// The progress. @@ -89,7 +89,6 @@ namespace Emby.Server.Implementations.ScheduledTasks SourceTypes = new SourceType[] { SourceType.Library }, HasChapterImages = false, IsVirtualItem = false - }) .OfType