From a041fe8a2dc03790b8b56a01bb2c1d2c9fd9d690 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sun, 21 Jun 2020 13:29:35 +0100 Subject: [PATCH 01/82] Add versioning to plugin folders --- .../ApplicationHost.cs | 98 ++++++++++++++++++- .../Updates/InstallationManager.cs | 33 +++++-- 2 files changed, 123 insertions(+), 8 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 23f0571a1d..a3f76470f5 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1008,6 +1008,102 @@ namespace Emby.Server.Implementations protected abstract void RestartInternal(); + /// + /// Converts an string array to a number. + /// Element 0 is the filename. + /// + /// Parts of the filename. + /// Long representing the version of the file. + private long StrToVersion(string[] version) + { + if (version.Length > 4) + { + Logger.LogError("Plugin version number too complex : {0}.", version[0]); + return -1; + } + + // Build version into a string. 1.2.3.4 => 001002003004 (max 999999999999 + string res = string.Empty; + for (int x = 1; x <= version.Length; x++) + { + res += version[1].PadLeft(3 - version[1].Length, '0'); + } + + return long.Parse(res, CultureInfo.InvariantCulture); + } + + /// + /// Only loads the latest version of each assembly based upon the folder name. + /// eg. MyAssembly 11.9.3.6 - will be ignored. + /// MyAssembly 12.2.3.6 - will be loaded. + /// + /// Path to enumerate. + /// Set to true, to try and clean up earlier versions. + /// IEnumerable{string} of filenames. + protected IEnumerable GetLatestDLLVersion(string path, bool cleanup = false) + { + var dllList = new List(); + var versions = new SortedList(); + var directories = Directory.EnumerateDirectories(path, "*.*", SearchOption.TopDirectoryOnly).ToList(); + var folder = string.Empty; + + // Only add the latest version of the folder into the list. + foreach (var dir in directories) + { + string[] parts = dir.Split("."); + + if (parts.Length == 1) + { + dllList.AddRange(Directory.EnumerateFiles(dir, "*.dll", SearchOption.AllDirectories).ToList()); + } + else + { + // Add for version comparison later. + versions.Add(StrToVersion(parts), parts[0]); + } + } + + if (versions.Count > 0) + { + string lastName = string.Empty; + + // Traverse backwards through the list. + // The first item will be the latest version. + for (int x = versions.Count - 1; x > 0; x--) + { + folder = versions.Values[x]; + if (!string.Equals(lastName, folder, StringComparison.OrdinalIgnoreCase)) + { + dllList.AddRange(Directory.EnumerateFiles(path + "\\" + folder, "*.dll", SearchOption.AllDirectories)); + lastName = folder; + continue; + } + + if (!string.IsNullOrEmpty(lastName) && cleanup) + { + // Attempt a cleanup of old folders. + try + { + Logger.LogDebug("Attempting to delete {0}", path + "\\" + folder); + Directory.Delete(path + "\\" + folder); + } + catch + { + // Ignore errors. + } + } + } + + folder = versions.Values[0]; + if (!string.Equals(lastName, folder, StringComparison.OrdinalIgnoreCase)) + { + dllList.AddRange(Directory.EnumerateFiles(path + "\\" + folder, "*.dll", SearchOption.AllDirectories)); + } + } + + return dllList; + } + /// /// Gets the composable part assemblies. /// @@ -1016,7 +1112,7 @@ namespace Emby.Server.Implementations { if (Directory.Exists(ApplicationPaths.PluginsPath)) { - foreach (var file in Directory.EnumerateFiles(ApplicationPaths.PluginsPath, "*.dll", SearchOption.AllDirectories)) + foreach (var file in GetLatestDLLVersion(ApplicationPaths.PluginsPath)) { Assembly plugAss; try diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs index 80326fddf2..229e0338c0 100644 --- a/Emby.Server.Implementations/Updates/InstallationManager.cs +++ b/Emby.Server.Implementations/Updates/InstallationManager.cs @@ -16,6 +16,7 @@ using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Net; using MediaBrowser.Common.Plugins; using MediaBrowser.Common.Updates; +using MediaBrowser.Common.System; using MediaBrowser.Controller.Configuration; using MediaBrowser.Model.Events; using MediaBrowser.Model.IO; @@ -23,6 +24,7 @@ using MediaBrowser.Model.Serialization; using MediaBrowser.Model.Updates; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; +using MediaBrowser.Model.System; namespace Emby.Server.Implementations.Updates { @@ -384,9 +386,19 @@ namespace Emby.Server.Implementations.Updates throw new InvalidDataException("The checksum of the received data doesn't match."); } + // Version folder as they cannot be overwritten in Windows. + targetDir += package.Version.ToString(); + if (Directory.Exists(targetDir)) { - Directory.Delete(targetDir, true); + try + { + Directory.Delete(targetDir, true); + } + catch + { + // Ignore any exceptions. + } } stream.Position = 0; @@ -425,15 +437,22 @@ namespace Emby.Server.Implementations.Updates path = file; } - if (isDirectory) + try { - _logger.LogInformation("Deleting plugin directory {0}", path); - Directory.Delete(path, true); + if (isDirectory) + { + _logger.LogInformation("Deleting plugin directory {0}", path); + Directory.Delete(path, true); + } + else + { + _logger.LogInformation("Deleting plugin file {0}", path); + _fileSystem.DeleteFile(path); + } } - else + catch { - _logger.LogInformation("Deleting plugin file {0}", path); - _fileSystem.DeleteFile(path); + // Ignore file errors. } var list = _config.Configuration.UninstalledPlugins.ToList(); From 99410f3c975dbcce44b6cdec2e17e9a8d67db30e Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sun, 21 Jun 2020 16:15:55 +0100 Subject: [PATCH 02/82] fixes --- .../ApplicationHost.cs | 69 +++++++++++++++---- .../Updates/InstallationManager.cs | 2 +- 2 files changed, 55 insertions(+), 16 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index a3f76470f5..cbd9f7154a 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1013,25 +1013,62 @@ namespace Emby.Server.Implementations /// Element 0 is the filename. /// /// Parts of the filename. + /// Returns the folder name including any periods. eg. vs /// Long representing the version of the file. - private long StrToVersion(string[] version) + private long StrToVersion(string[] version, out string foldername) { - if (version.Length > 4) + if (version.Length > 5) { Logger.LogError("Plugin version number too complex : {0}.", version[0]); - return -1; + foldername = string.Join('.', version); + return 0; + } + + foldername = string.Empty; + int start = 0; + do + { + foldername += "." + version[start]; + start++; } + while (start < version.Length && !int.TryParse(version[start], out _)); + foldername = foldername.TrimStart('.'); - // Build version into a string. 1.2.3.4 => 001002003004 (max 999999999999 + if (start == version.Length) + { + // No valid version number. + return 0; + } + + // Build version into a string. 1.2.3.4 => 001002003004 (max 999999999999). string res = string.Empty; - for (int x = 1; x <= version.Length; x++) + for (int x = start; x < version.Length; x++) { - res += version[1].PadLeft(3 - version[1].Length, '0'); + res += version[x].PadLeft(4 - version[x].Length, '0'); } return long.Parse(res, CultureInfo.InvariantCulture); } + private static int VersionCompare(Tuple a, Tuple b) + { + int compare = string.Compare(a.Item2, b.Item2, false, CultureInfo.InvariantCulture); + + if (compare == 0) + { + if (a.Item1 > b.Item1) + { + return 1; + } + + return -1; + + } + + return compare; + + } + /// /// Only loads the latest version of each assembly based upon the folder name. /// eg. MyAssembly 11.9.3.6 - will be ignored. @@ -1043,7 +1080,8 @@ namespace Emby.Server.Implementations protected IEnumerable GetLatestDLLVersion(string path, bool cleanup = false) { var dllList = new List(); - var versions = new SortedList(); + var versions = new List>(); + var directories = Directory.EnumerateDirectories(path, "*.*", SearchOption.TopDirectoryOnly).ToList(); var folder = string.Empty; @@ -1058,23 +1096,24 @@ namespace Emby.Server.Implementations } else { + long id = StrToVersion(parts, out string foldername); // Add for version comparison later. - versions.Add(StrToVersion(parts), parts[0]); + versions.Add(Tuple.Create(id, foldername, dir)); } } if (versions.Count > 0) { string lastName = string.Empty; - + versions.Sort(VersionCompare); // Traverse backwards through the list. // The first item will be the latest version. for (int x = versions.Count - 1; x > 0; x--) { - folder = versions.Values[x]; + folder = versions[x].Item2; if (!string.Equals(lastName, folder, StringComparison.OrdinalIgnoreCase)) { - dllList.AddRange(Directory.EnumerateFiles(path + "\\" + folder, "*.dll", SearchOption.AllDirectories)); + dllList.AddRange(Directory.EnumerateFiles(folder, "*.dll", SearchOption.AllDirectories)); lastName = folder; continue; } @@ -1084,8 +1123,8 @@ namespace Emby.Server.Implementations // Attempt a cleanup of old folders. try { - Logger.LogDebug("Attempting to delete {0}", path + "\\" + folder); - Directory.Delete(path + "\\" + folder); + Logger.LogDebug("Attempting to delete {0}", folder); + Directory.Delete(folder); } catch { @@ -1094,10 +1133,10 @@ namespace Emby.Server.Implementations } } - folder = versions.Values[0]; + folder = versions[0].Item2; if (!string.Equals(lastName, folder, StringComparison.OrdinalIgnoreCase)) { - dllList.AddRange(Directory.EnumerateFiles(path + "\\" + folder, "*.dll", SearchOption.AllDirectories)); + dllList.AddRange(Directory.EnumerateFiles(folder, "*.dll", SearchOption.AllDirectories)); } } diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs index 229e0338c0..b6cd5a6336 100644 --- a/Emby.Server.Implementations/Updates/InstallationManager.cs +++ b/Emby.Server.Implementations/Updates/InstallationManager.cs @@ -387,7 +387,7 @@ namespace Emby.Server.Implementations.Updates } // Version folder as they cannot be overwritten in Windows. - targetDir += package.Version.ToString(); + targetDir += "." + package.Version.ToString(); if (Directory.Exists(targetDir)) { From d89c46f1a97b436bae0a39816cab71f8d09ad3c3 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sun, 21 Jun 2020 17:11:21 +0100 Subject: [PATCH 03/82] fixes --- .../ApplicationHost.cs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index cbd9f7154a..ce907c3cec 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1083,8 +1083,7 @@ namespace Emby.Server.Implementations var versions = new List>(); var directories = Directory.EnumerateDirectories(path, "*.*", SearchOption.TopDirectoryOnly).ToList(); - var folder = string.Empty; - + // Only add the latest version of the folder into the list. foreach (var dir in directories) { @@ -1110,11 +1109,10 @@ namespace Emby.Server.Implementations // The first item will be the latest version. for (int x = versions.Count - 1; x > 0; x--) { - folder = versions[x].Item2; - if (!string.Equals(lastName, folder, StringComparison.OrdinalIgnoreCase)) + if (!string.Equals(lastName, versions[x].Item2, StringComparison.OrdinalIgnoreCase)) { - dllList.AddRange(Directory.EnumerateFiles(folder, "*.dll", SearchOption.AllDirectories)); - lastName = folder; + dllList.AddRange(Directory.EnumerateFiles(versions[x].Item3, "*.dll", SearchOption.AllDirectories)); + lastName = versions[x].Item2; continue; } @@ -1123,8 +1121,8 @@ namespace Emby.Server.Implementations // Attempt a cleanup of old folders. try { - Logger.LogDebug("Attempting to delete {0}", folder); - Directory.Delete(folder); + Logger.LogDebug("Attempting to delete {0}", versions[x].Item3); + Directory.Delete(versions[x].Item3); } catch { @@ -1133,10 +1131,9 @@ namespace Emby.Server.Implementations } } - folder = versions[0].Item2; - if (!string.Equals(lastName, folder, StringComparison.OrdinalIgnoreCase)) + if (!string.Equals(lastName, versions[0].Item2, StringComparison.OrdinalIgnoreCase)) { - dllList.AddRange(Directory.EnumerateFiles(folder, "*.dll", SearchOption.AllDirectories)); + dllList.AddRange(Directory.EnumerateFiles(versions[0].Item3, "*.dll", SearchOption.AllDirectories)); } } From 2255bc98722e57e77e191d08b1485372c1e9a400 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sun, 21 Jun 2020 18:42:50 +0100 Subject: [PATCH 04/82] Changed padding in version numbers based up how they are stored in the repository. --- Emby.Server.Implementations/ApplicationHost.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index ce907c3cec..22a67b10cf 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1040,11 +1040,16 @@ namespace Emby.Server.Implementations return 0; } - // Build version into a string. 1.2.3.4 => 001002003004 (max 999999999999). + // Build version into a string. 1.2.3.4 => 001002003004, 2.1 -> 200100000000. string res = string.Empty; for (int x = start; x < version.Length; x++) { - res += version[x].PadLeft(4 - version[x].Length, '0'); + res += version[x].PadLeft(3, '0'); + } + + if (res.Length < 12) + { + res = res.PadRight(12, '0'); } return long.Parse(res, CultureInfo.InvariantCulture); @@ -1083,11 +1088,11 @@ namespace Emby.Server.Implementations var versions = new List>(); var directories = Directory.EnumerateDirectories(path, "*.*", SearchOption.TopDirectoryOnly).ToList(); - + // Only add the latest version of the folder into the list. foreach (var dir in directories) { - string[] parts = dir.Split("."); + string[] parts = dir.Replace('_', '.').Split("."); if (parts.Length == 1) { From bf1bbbdd3e72657d0e36a7a2b80c89d03fc40ba8 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sun, 21 Jun 2020 18:46:48 +0100 Subject: [PATCH 05/82] Changed sorting to case insensitive --- Emby.Server.Implementations/ApplicationHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 22a67b10cf..830581d192 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1057,7 +1057,7 @@ namespace Emby.Server.Implementations private static int VersionCompare(Tuple a, Tuple b) { - int compare = string.Compare(a.Item2, b.Item2, false, CultureInfo.InvariantCulture); + int compare = string.Compare(a.Item2, b.Item2, true, CultureInfo.InvariantCulture); if (compare == 0) { From a25a233b75df380d87f1fdca8738b32938095ab4 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Mon, 22 Jun 2020 11:57:46 +0100 Subject: [PATCH 06/82] Using Version class. --- .../ApplicationHost.cs | 128 +++++------------- .../Updates/InstallationManager.cs | 2 +- 2 files changed, 34 insertions(+), 96 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 830581d192..9d452250d8 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1009,137 +1009,75 @@ namespace Emby.Server.Implementations protected abstract void RestartInternal(); /// - /// Converts an string array to a number. - /// Element 0 is the filename. + /// Comparison function used in <. /// - /// Parts of the filename. - /// Returns the folder name including any periods. eg. vs - /// Long representing the version of the file. - private long StrToVersion(string[] version, out string foldername) - { - if (version.Length > 5) - { - Logger.LogError("Plugin version number too complex : {0}.", version[0]); - foldername = string.Join('.', version); - return 0; - } - - foldername = string.Empty; - int start = 0; - do - { - foldername += "." + version[start]; - start++; - } - while (start < version.Length && !int.TryParse(version[start], out _)); - foldername = foldername.TrimStart('.'); - - if (start == version.Length) - { - // No valid version number. - return 0; - } - - // Build version into a string. 1.2.3.4 => 001002003004, 2.1 -> 200100000000. - string res = string.Empty; - for (int x = start; x < version.Length; x++) - { - res += version[x].PadLeft(3, '0'); - } - - if (res.Length < 12) - { - res = res.PadRight(12, '0'); - } - - return long.Parse(res, CultureInfo.InvariantCulture); - } - - private static int VersionCompare(Tuple a, Tuple b) + private static int VersionCompare(Tuple a, Tuple b) { int compare = string.Compare(a.Item2, b.Item2, true, CultureInfo.InvariantCulture); if (compare == 0) { - if (a.Item1 > b.Item1) - { - return 1; - } - - return -1; - + return a.Item1.CompareTo(b.Item1); } return compare; - } /// /// Only loads the latest version of each assembly based upon the folder name. - /// eg. MyAssembly 11.9.3.6 - will be ignored. - /// MyAssembly 12.2.3.6 - will be loaded. + /// eg. MyAssembly_11.9.3.6 - will be ignored. + /// MyAssembly_12.2.3.6 - will be loaded. /// /// Path to enumerate. /// Set to true, to try and clean up earlier versions. /// IEnumerable{string} of filenames. - protected IEnumerable GetLatestDLLVersion(string path, bool cleanup = false) + protected IEnumerable GetLatestDLLVersion(string path, bool cleanup = true) { var dllList = new List(); - var versions = new List>(); + var versions = new List>(); + var directories = Directory.EnumerateDirectories(path, "*.*", SearchOption.TopDirectoryOnly); - var directories = Directory.EnumerateDirectories(path, "*.*", SearchOption.TopDirectoryOnly).ToList(); - - // Only add the latest version of the folder into the list. foreach (var dir in directories) { - string[] parts = dir.Replace('_', '.').Split("."); - - if (parts.Length == 1) + int p = dir.LastIndexOf('_'); + if (p != -1 && Version.TryParse(dir.Substring(p + 1), out Version ver)) { - dllList.AddRange(Directory.EnumerateFiles(dir, "*.dll", SearchOption.AllDirectories).ToList()); + // Versioned folder. + versions.Add(Tuple.Create(ver, dir.Substring(0, p), dir)); } else { - long id = StrToVersion(parts, out string foldername); - // Add for version comparison later. - versions.Add(Tuple.Create(id, foldername, dir)); + // Un-versioned folder. + versions.Add(Tuple.Create(new Version(), dir, dir)); } } - if (versions.Count > 0) + string lastName = string.Empty; + versions.Sort(VersionCompare); + // Traverse backwards through the list. + // The first item will be the latest version. + for (int x = versions.Count - 1; x >= 0; x--) { - string lastName = string.Empty; - versions.Sort(VersionCompare); - // Traverse backwards through the list. - // The first item will be the latest version. - for (int x = versions.Count - 1; x > 0; x--) + if (!string.Equals(lastName, versions[x].Item2, StringComparison.OrdinalIgnoreCase)) { - if (!string.Equals(lastName, versions[x].Item2, StringComparison.OrdinalIgnoreCase)) + dllList.AddRange(Directory.EnumerateFiles(versions[x].Item3, "*.dll", SearchOption.AllDirectories)); + lastName = versions[x].Item2; + continue; + } + + if (!string.IsNullOrEmpty(lastName) && cleanup) + { + // Attempt a cleanup of old folders. + try { - dllList.AddRange(Directory.EnumerateFiles(versions[x].Item3, "*.dll", SearchOption.AllDirectories)); - lastName = versions[x].Item2; - continue; + Logger.LogDebug("Attempting to delete {0}", versions[x].Item3); + Directory.Delete(versions[x].Item3, true); } - - if (!string.IsNullOrEmpty(lastName) && cleanup) + catch { - // Attempt a cleanup of old folders. - try - { - Logger.LogDebug("Attempting to delete {0}", versions[x].Item3); - Directory.Delete(versions[x].Item3); - } - catch - { - // Ignore errors. - } + // Ignore errors. } } - - if (!string.Equals(lastName, versions[0].Item2, StringComparison.OrdinalIgnoreCase)) - { - dllList.AddRange(Directory.EnumerateFiles(versions[0].Item3, "*.dll", SearchOption.AllDirectories)); - } } return dllList; diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs index b6cd5a6336..1fa71e6739 100644 --- a/Emby.Server.Implementations/Updates/InstallationManager.cs +++ b/Emby.Server.Implementations/Updates/InstallationManager.cs @@ -387,7 +387,7 @@ namespace Emby.Server.Implementations.Updates } // Version folder as they cannot be overwritten in Windows. - targetDir += "." + package.Version.ToString(); + targetDir += "_" + package.Version.ToString(); if (Directory.Exists(targetDir)) { From ba3a9f7d466a84040b53399fbc3ae1673b7466ac Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Mon, 22 Jun 2020 12:14:31 +0100 Subject: [PATCH 07/82] removing stray < character from description. --- Emby.Server.Implementations/ApplicationHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 9d452250d8..ae6a82e8b9 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1009,7 +1009,7 @@ namespace Emby.Server.Implementations protected abstract void RestartInternal(); /// - /// Comparison function used in <. + /// Comparison function used in . /// private static int VersionCompare(Tuple a, Tuple b) { From 8b9a38046666227f5c6f9d3099303300ddfd305a Mon Sep 17 00:00:00 2001 From: Mygod Date: Tue, 18 Aug 2020 01:24:24 -0400 Subject: [PATCH 08/82] Add 1440p to the mix Partially addresses #3112. --- MediaBrowser.Model/Dlna/ResolutionNormalizer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs b/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs index 102db3b44e..a4305c8104 100644 --- a/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs +++ b/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs @@ -15,6 +15,7 @@ namespace MediaBrowser.Model.Dlna new ResolutionConfiguration(720, 950000), new ResolutionConfiguration(1280, 2500000), new ResolutionConfiguration(1920, 4000000), + new ResolutionConfiguration(2560, 8000000), new ResolutionConfiguration(3840, 35000000) }; From e33824d28667df0344420d42032fbb01e9f8f659 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sat, 5 Sep 2020 20:20:15 +0100 Subject: [PATCH 09/82] Changed to named tuples --- .../ApplicationHost.cs | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index ae6a82e8b9..1e298042c5 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1011,13 +1011,15 @@ namespace Emby.Server.Implementations /// /// Comparison function used in . /// - private static int VersionCompare(Tuple a, Tuple b) + private static int VersionCompare( + (Version PluginVersion, string Name, string Path) a, + (Version PluginVersion, string Name, string Path) b) { - int compare = string.Compare(a.Item2, b.Item2, true, CultureInfo.InvariantCulture); + int compare = string.Compare(a.Name, b.Name, true, CultureInfo.InvariantCulture); if (compare == 0) { - return a.Item1.CompareTo(b.Item1); + return a.PluginVersion.CompareTo(b.PluginVersion); } return compare; @@ -1034,7 +1036,7 @@ namespace Emby.Server.Implementations protected IEnumerable GetLatestDLLVersion(string path, bool cleanup = true) { var dllList = new List(); - var versions = new List>(); + var versions = new List<(Version PluginVersion, string Name, string Path)>(); var directories = Directory.EnumerateDirectories(path, "*.*", SearchOption.TopDirectoryOnly); foreach (var dir in directories) @@ -1043,12 +1045,12 @@ namespace Emby.Server.Implementations if (p != -1 && Version.TryParse(dir.Substring(p + 1), out Version ver)) { // Versioned folder. - versions.Add(Tuple.Create(ver, dir.Substring(0, p), dir)); + versions.Add((ver, dir.Substring(0, p), dir)); } else { // Un-versioned folder. - versions.Add(Tuple.Create(new Version(), dir, dir)); + versions.Add((new Version(), dir, dir)); } } @@ -1058,10 +1060,10 @@ namespace Emby.Server.Implementations // The first item will be the latest version. for (int x = versions.Count - 1; x >= 0; x--) { - if (!string.Equals(lastName, versions[x].Item2, StringComparison.OrdinalIgnoreCase)) + if (!string.Equals(lastName, versions[x].Name, StringComparison.OrdinalIgnoreCase)) { - dllList.AddRange(Directory.EnumerateFiles(versions[x].Item3, "*.dll", SearchOption.AllDirectories)); - lastName = versions[x].Item2; + dllList.AddRange(Directory.EnumerateFiles(versions[x].Path, "*.dll", SearchOption.AllDirectories)); + lastName = versions[x].Name; continue; } @@ -1070,8 +1072,8 @@ namespace Emby.Server.Implementations // Attempt a cleanup of old folders. try { - Logger.LogDebug("Attempting to delete {0}", versions[x].Item3); - Directory.Delete(versions[x].Item3, true); + Logger.LogDebug("Attempting to delete {0}", versions[x].Path); + Directory.Delete(versions[x].Path, true); } catch { From 0f6ea123ea1ead19e6efc915e6af62dc4a198329 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sat, 5 Sep 2020 20:55:42 +0100 Subject: [PATCH 10/82] Update ApplicationHost.cs --- Emby.Server.Implementations/ApplicationHost.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index d579beb2f2..52c40f4a5e 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; +using System.Globalization; using System.IO; using System.Linq; using System.Net; From 95265288a6d2d28e6a7c8aa6861a54539978f6cd Mon Sep 17 00:00:00 2001 From: Cromefire_ Date: Mon, 7 Sep 2020 21:46:19 +0200 Subject: [PATCH 11/82] More expressive name for the VideoStream API --- Jellyfin.Api/Controllers/VideosController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jellyfin.Api/Controllers/VideosController.cs b/Jellyfin.Api/Controllers/VideosController.cs index 5c65399cb8..3126a0bc33 100644 --- a/Jellyfin.Api/Controllers/VideosController.cs +++ b/Jellyfin.Api/Controllers/VideosController.cs @@ -325,9 +325,9 @@ namespace Jellyfin.Api.Controllers /// Optional. The streaming options. /// Video stream returned. /// A containing the audio file. - [HttpGet("{itemId}/{stream=stream}.{container?}", Name = "GetVideoStream_2")] + [HttpGet("{itemId}/{stream=stream}.{container?}", Name = "GetVideoStreamWithExt")] [HttpGet("{itemId}/stream")] - [HttpHead("{itemId}/{stream=stream}.{container?}", Name = "HeadVideoStream_2")] + [HttpHead("{itemId}/{stream=stream}.{container?}", Name = "HeadVideoStreamWithExt")] [HttpHead("{itemId}/stream", Name = "HeadVideoStream")] [ProducesResponseType(StatusCodes.Status200OK)] public async Task GetVideoStream( From e11a57f19b6f77138765b0924fe8f2731b32b6dc Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Tue, 8 Sep 2020 16:12:47 +0200 Subject: [PATCH 12/82] Fix some warnings --- .../Plugins/Tmdb/Models/General/Videos.cs | 2 +- .../Plugins/Tmdb/Models/Movies/Trailers.cs | 2 +- .../Tmdb/Models/People/PersonImages.cs | 2 +- .../Plugins/Tmdb/Movies/TmdbImageProvider.cs | 5 ++- .../{TmdbSettings.cs => TmdbImageSettings.cs} | 11 ++---- .../Plugins/Tmdb/Movies/TmdbMovieProvider.cs | 28 +++++++------- .../Plugins/Tmdb/Movies/TmdbSearch.cs | 7 +++- .../Plugins/Tmdb/Movies/TmdbSettingsResult.cs | 9 +++++ .../Tmdb/Music/TmdbMusicVideoProvider.cs | 4 +- .../Plugins/Tmdb/People/TmdbPersonProvider.cs | 11 ++---- .../Tmdb/TV/TmdbEpisodeImageProvider.cs | 23 +++++++----- .../Plugins/Tmdb/TV/TmdbEpisodeProvider.cs | 15 ++++---- .../Tmdb/TV/TmdbEpisodeProviderBase.cs | 13 +++++-- .../Plugins/Tmdb/TV/TmdbSeasonProvider.cs | 23 ++++++++---- .../Tmdb/TV/TmdbSeriesImageProvider.cs | 26 ++++++------- .../Plugins/Tmdb/TV/TmdbSeriesProvider.cs | 37 ++++++++----------- .../Tmdb/Trailers/TmdbTrailerProvider.cs | 8 ++-- .../Studios/StudiosImageProvider.cs | 16 ++++---- .../Subtitles/SubtitleManager.cs | 2 +- .../TV/MissingEpisodeProvider.cs | 15 ++++++-- .../TV/SeasonMetadataService.cs | 6 +-- 21 files changed, 146 insertions(+), 119 deletions(-) rename MediaBrowser.Providers/Plugins/Tmdb/Movies/{TmdbSettings.cs => TmdbImageSettings.cs} (55%) create mode 100644 MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbSettingsResult.cs diff --git a/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Videos.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Videos.cs index 241dcab4de..1c673fdbd6 100644 --- a/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Videos.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Videos.cs @@ -6,6 +6,6 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General { public class Videos { - public List /// The item. /// The language. - /// The json serializer. /// The cancellation token. /// Task{MovieImages}. - private async Task FetchImages(BaseItem item, string language, IJsonSerializer jsonSerializer, + private async Task FetchImages( + BaseItem item, + string language, CancellationToken cancellationToken) { var tmdbId = item.GetProviderId(MetadataProvider.Tmdb); @@ -165,22 +169,14 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV var path = TmdbSeriesProvider.Current.GetDataFilePath(tmdbId, language); - if (!string.IsNullOrEmpty(path)) + if (!string.IsNullOrEmpty(path) && File.Exists(path)) { - var fileInfo = _fileSystem.GetFileInfo(path); - - if (fileInfo.Exists) - { - return jsonSerializer.DeserializeFromFile(path).Images; - } + return _jsonSerializer.DeserializeFromFile(path).Images; } return null; } - // After tvdb and fanart - public int Order => 2; - public Task GetImageResponse(string url, CancellationToken cancellationToken) { return _httpClientFactory.CreateClient(NamedClient.Default).GetAsync(url, cancellationToken); diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs index fa0873b9de..287ebca8c9 100644 --- a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs @@ -17,8 +17,6 @@ using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Globalization; -using MediaBrowser.Model.IO; using MediaBrowser.Model.Providers; using MediaBrowser.Model.Serialization; using MediaBrowser.Providers.Plugins.Tmdb.Models.Search; @@ -33,38 +31,35 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV private const string GetTvInfo3 = TmdbUtils.BaseTmdbApiUrl + @"3/tv/{0}?api_key={1}&append_to_response=credits,images,keywords,external_ids,videos,content_ratings"; private readonly IJsonSerializer _jsonSerializer; - private readonly IFileSystem _fileSystem; private readonly IServerConfigurationManager _configurationManager; private readonly ILogger _logger; - private readonly ILocalizationManager _localization; private readonly IHttpClientFactory _httpClientFactory; private readonly ILibraryManager _libraryManager; private readonly CultureInfo _usCulture = new CultureInfo("en-US"); - internal static TmdbSeriesProvider Current { get; private set; } - public TmdbSeriesProvider( IJsonSerializer jsonSerializer, - IFileSystem fileSystem, IServerConfigurationManager configurationManager, ILogger logger, - ILocalizationManager localization, IHttpClientFactory httpClientFactory, ILibraryManager libraryManager) { _jsonSerializer = jsonSerializer; - _fileSystem = fileSystem; _configurationManager = configurationManager; _logger = logger; - _localization = localization; _httpClientFactory = httpClientFactory; _libraryManager = libraryManager; Current = this; } + internal static TmdbSeriesProvider Current { get; private set; } + public string Name => TmdbUtils.ProviderName; + // After TheTVDB + public int Order => 1; + public async Task> GetSearchResults(SeriesInfo searchInfo, CancellationToken cancellationToken) { var tmdbId = searchInfo.GetProviderId(MetadataProvider.Tmdb); @@ -129,8 +124,10 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV public async Task> GetMetadata(SeriesInfo info, CancellationToken cancellationToken) { - var result = new MetadataResult(); - result.QueriedById = true; + var result = new MetadataResult + { + QueriedById = true + }; var tmdbId = info.GetProviderId(MetadataProvider.Tmdb); @@ -206,9 +203,11 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV await EnsureSeriesInfo(tmdbId, language, cancellationToken).ConfigureAwait(false); - var result = new MetadataResult(); - result.Item = new Series(); - result.ResultLanguage = seriesInfo.ResultLanguage; + var result = new MetadataResult + { + Item = new Series(), + ResultLanguage = seriesInfo.ResultLanguage + }; var settings = await TmdbMovieProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false); @@ -474,12 +473,11 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV var path = GetDataFilePath(tmdbId, language); - var fileInfo = _fileSystem.GetFileSystemInfo(path); - + var fileInfo = new FileInfo(path); if (fileInfo.Exists) { // If it's recent or automatic updates are enabled, don't re-download - if ((DateTime.UtcNow - _fileSystem.GetLastWriteTimeUtc(fileInfo)).TotalDays <= 2) + if ((DateTime.UtcNow - fileInfo.LastWriteTimeUtc).TotalDays <= 2) { return Task.CompletedTask; } @@ -549,9 +547,6 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV return null; } - // After TheTVDB - public int Order => 1; - public Task GetImageResponse(string url, CancellationToken cancellationToken) { return _httpClientFactory.CreateClient(NamedClient.Default).GetAsync(url, cancellationToken); diff --git a/MediaBrowser.Providers/Plugins/Tmdb/Trailers/TmdbTrailerProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/Trailers/TmdbTrailerProvider.cs index 25296387ba..613dc17e31 100644 --- a/MediaBrowser.Providers/Plugins/Tmdb/Trailers/TmdbTrailerProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Trailers/TmdbTrailerProvider.cs @@ -21,6 +21,10 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Trailers _httpClientFactory = httpClientFactory; } + public string Name => TmdbMovieProvider.Current.Name; + + public int Order => 0; + public Task> GetSearchResults(TrailerInfo searchInfo, CancellationToken cancellationToken) { return TmdbMovieProvider.Current.GetMovieSearchResults(searchInfo, cancellationToken); @@ -31,10 +35,6 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Trailers return TmdbMovieProvider.Current.GetItemMetadata(info, cancellationToken); } - public string Name => TmdbMovieProvider.Current.Name; - - public int Order => 0; - public Task GetImageResponse(string url, CancellationToken cancellationToken) { return _httpClientFactory.CreateClient(NamedClient.Default).GetAsync(url, cancellationToken); diff --git a/MediaBrowser.Providers/Studios/StudiosImageProvider.cs b/MediaBrowser.Providers/Studios/StudiosImageProvider.cs index 76dc7df7f7..90e13f12f8 100644 --- a/MediaBrowser.Providers/Studios/StudiosImageProvider.cs +++ b/MediaBrowser.Providers/Studios/StudiosImageProvider.cs @@ -33,6 +33,8 @@ namespace MediaBrowser.Providers.Studios public string Name => "Emby Designs"; + public int Order => 0; + public bool Supports(BaseItem item) { return item is Studio; @@ -119,8 +121,6 @@ namespace MediaBrowser.Providers.Studios return EnsureList(url, file, _fileSystem, cancellationToken); } - public int Order => 0; - public Task GetImageResponse(string url, CancellationToken cancellationToken) { var httpClient = _httpClientFactory.CreateClient(NamedClient.Default); @@ -161,12 +161,12 @@ namespace MediaBrowser.Providers.Studios private string GetComparableName(string name) { - return name.Replace(" ", string.Empty) - .Replace(".", string.Empty) - .Replace("&", string.Empty) - .Replace("!", string.Empty) - .Replace(",", string.Empty) - .Replace("/", string.Empty); + return name.Replace(" ", string.Empty, StringComparison.Ordinal) + .Replace(".", string.Empty, StringComparison.Ordinal) + .Replace("&", string.Empty, StringComparison.Ordinal) + .Replace("!", string.Empty, StringComparison.Ordinal) + .Replace(",", string.Empty, StringComparison.Ordinal) + .Replace("/", string.Empty, StringComparison.Ordinal); } public IEnumerable GetAvailableImages(string file) diff --git a/MediaBrowser.Providers/Subtitles/SubtitleManager.cs b/MediaBrowser.Providers/Subtitles/SubtitleManager.cs index 0f7cb3f8fa..f25d3d5ee7 100644 --- a/MediaBrowser.Providers/Subtitles/SubtitleManager.cs +++ b/MediaBrowser.Providers/Subtitles/SubtitleManager.cs @@ -303,7 +303,7 @@ namespace MediaBrowser.Providers.Subtitles private ISubtitleProvider GetProvider(string id) { - return _subtitleProviders.First(i => string.Equals(id, GetProviderId(i.Name))); + return _subtitleProviders.First(i => string.Equals(id, GetProviderId(i.Name), StringComparison.Ordinal)); } /// diff --git a/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs b/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs index 616c61ec0a..c833b12271 100644 --- a/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs +++ b/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs @@ -48,18 +48,25 @@ namespace MediaBrowser.Providers.TV public async Task Run(Series series, bool addNewItems, CancellationToken cancellationToken) { - var tvdbId = series.GetProviderId(MetadataProvider.Tvdb); - if (string.IsNullOrEmpty(tvdbId)) + var tvdbIdString = series.GetProviderId(MetadataProvider.Tvdb); + if (string.IsNullOrEmpty(tvdbIdString)) { return false; } - var episodes = await _tvdbClientManager.GetAllEpisodesAsync(Convert.ToInt32(tvdbId), series.GetPreferredMetadataLanguage(), cancellationToken); + var episodes = await _tvdbClientManager.GetAllEpisodesAsync( + int.Parse(tvdbIdString, CultureInfo.InvariantCulture), + series.GetPreferredMetadataLanguage(), + cancellationToken).ConfigureAwait(false); var episodeLookup = episodes .Select(i => { - DateTime.TryParse(i.FirstAired, out var firstAired); + if (!DateTime.TryParse(i.FirstAired, out var firstAired)) + { + firstAired = default; + } + var seasonNumber = i.AiredSeason.GetValueOrDefault(-1); var episodeNumber = i.AiredEpisodeNumber.GetValueOrDefault(-1); return (seasonNumber, episodeNumber, firstAired); diff --git a/MediaBrowser.Providers/TV/SeasonMetadataService.cs b/MediaBrowser.Providers/TV/SeasonMetadataService.cs index 5431de623e..4e59f78bc4 100644 --- a/MediaBrowser.Providers/TV/SeasonMetadataService.cs +++ b/MediaBrowser.Providers/TV/SeasonMetadataService.cs @@ -27,6 +27,9 @@ namespace MediaBrowser.Providers.TV { } + /// + protected override bool EnableUpdatingPremiereDateFromChildren => true; + /// protected override ItemUpdateType BeforeSaveInternal(Season item, bool isFullRefresh, ItemUpdateType currentUpdateType) { @@ -67,9 +70,6 @@ namespace MediaBrowser.Providers.TV return updateType; } - /// - protected override bool EnableUpdatingPremiereDateFromChildren => true; - /// protected override IList GetChildrenForMetadataUpdates(Season item) => item.GetEpisodes(); From 2eff0db804dcc46849ad536ad14c3f5faa0695be Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Tue, 8 Sep 2020 17:49:38 +0100 Subject: [PATCH 13/82] Update Emby.Server.Implementations/ApplicationHost.cs Co-authored-by: Cody Robibero --- Emby.Server.Implementations/ApplicationHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 52c40f4a5e..8144718037 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1080,7 +1080,7 @@ namespace Emby.Server.Implementations // Attempt a cleanup of old folders. try { - Logger.LogDebug("Attempting to delete {0}", versions[x].Path); + Logger.LogDebug("Deleting {Path}", versions[x].Path); Directory.Delete(versions[x].Path, true); } catch From a9d8b53658930d062c1f2ddc34715c51aec08ce1 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Tue, 8 Sep 2020 17:49:55 +0100 Subject: [PATCH 14/82] Update Emby.Server.Implementations/ApplicationHost.cs Co-authored-by: Cody Robibero --- Emby.Server.Implementations/ApplicationHost.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 8144718037..a6b6505bf9 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1083,9 +1083,9 @@ namespace Emby.Server.Implementations Logger.LogDebug("Deleting {Path}", versions[x].Path); Directory.Delete(versions[x].Path, true); } - catch + catch (Exception e) { - // Ignore errors. + Logger.LogWarning(e, "Unable to delete {Path}", versions[x].Path); } } } From f4eb34a9662a2474cf555e1665db517ee41db68e Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Tue, 8 Sep 2020 17:50:19 +0100 Subject: [PATCH 15/82] Update Emby.Server.Implementations/Updates/InstallationManager.cs Co-authored-by: Cody Robibero --- Emby.Server.Implementations/Updates/InstallationManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs index 81cf18f8df..5af2b7e32f 100644 --- a/Emby.Server.Implementations/Updates/InstallationManager.cs +++ b/Emby.Server.Implementations/Updates/InstallationManager.cs @@ -375,7 +375,7 @@ namespace Emby.Server.Implementations.Updates } // Version folder as they cannot be overwritten in Windows. - targetDir += "_" + package.Version.ToString(); + targetDir += "_" + package.Version; if (Directory.Exists(targetDir)) { From ddfb13f94550b6df7cbe7d6aeb17ab91d4bb2b54 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Tue, 8 Sep 2020 17:50:37 +0100 Subject: [PATCH 16/82] Update Emby.Server.Implementations/Updates/InstallationManager.cs Co-authored-by: Cody Robibero --- Emby.Server.Implementations/Updates/InstallationManager.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs index 5af2b7e32f..ba0fdfc340 100644 --- a/Emby.Server.Implementations/Updates/InstallationManager.cs +++ b/Emby.Server.Implementations/Updates/InstallationManager.cs @@ -388,7 +388,6 @@ namespace Emby.Server.Implementations.Updates // Ignore any exceptions. } } - stream.Position = 0; _zipClient.ExtractAllFromZip(stream, targetDir, true); From 60e8f47194d0bc7053e5771cd355b1ef628f99a2 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Tue, 8 Sep 2020 17:52:08 +0100 Subject: [PATCH 17/82] Update ApplicationHost.cs --- Emby.Server.Implementations/ApplicationHost.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index a6b6505bf9..1bc436820e 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1049,11 +1049,11 @@ namespace Emby.Server.Implementations foreach (var dir in directories) { - int p = dir.LastIndexOf('_'); - if (p != -1 && Version.TryParse(dir.Substring(p + 1), out Version ver)) + int underscoreIndex = dir.LastIndexOf('_'); + if (underscoreIndex != -1 && Version.TryParse(dir.Substring(underscoreIndex + 1), out Version ver)) { // Versioned folder. - versions.Add((ver, dir.Substring(0, p), dir)); + versions.Add((ver, dir.Substring(0, underscoreIndex), dir)); } else { From 3b319d45c0e1420d381d8e8fdc9b39a4be7ff280 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Tue, 8 Sep 2020 23:15:32 +0200 Subject: [PATCH 18/82] Fix build --- .../Plugins/Tmdb/TV/TmdbSeriesImageProvider.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesImageProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesImageProvider.cs index e2cd5e441c..179ceb825d 100644 --- a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesImageProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesImageProvider.cs @@ -13,7 +13,6 @@ using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; -using MediaBrowser.Model.IO; using MediaBrowser.Model.Providers; using MediaBrowser.Model.Serialization; using MediaBrowser.Providers.Plugins.Tmdb.Models.General; @@ -31,7 +30,6 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV { _jsonSerializer = jsonSerializer; _httpClientFactory = httpClientFactory; - _fileSystem = fileSystem; } public string Name => ProviderName; From 03d4e907286f48bc1f085f30b49569ff4eacc550 Mon Sep 17 00:00:00 2001 From: crobibero Date: Wed, 9 Sep 2020 18:52:12 -0600 Subject: [PATCH 19/82] add new files to rpm build --- fedora/jellyfin.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fedora/jellyfin.spec b/fedora/jellyfin.spec index 37b573e505..bfb2b3be29 100644 --- a/fedora/jellyfin.spec +++ b/fedora/jellyfin.spec @@ -84,6 +84,10 @@ EOF %{_libdir}/jellyfin/*.so %{_libdir}/jellyfin/*.a %{_libdir}/jellyfin/createdump +%{_libdir}/jellyfin/*.xml +%{_libdir}/jellyfin/wwwroot/api-docs/* +%{_libdir}/jellyfin/wwwroot/api-docs/redoc/* +%{_libdir}/jellyfin/wwwroot/api-docs/swagger/* # Needs 755 else only root can run it since binary build by dotnet is 722 %attr(755,root,root) %{_libdir}/jellyfin/jellyfin %{_libdir}/jellyfin/SOS_README.md From 46ae51bc9aaf4564cdb38b02d6b87b9cfcc82bfb Mon Sep 17 00:00:00 2001 From: crobibero Date: Sat, 12 Sep 2020 10:19:04 -0600 Subject: [PATCH 20/82] update to dotnet 3.1.8 --- .../Emby.Server.Implementations.csproj | 8 ++++---- Jellyfin.Api/Jellyfin.Api.csproj | 4 ++-- Jellyfin.Data/Jellyfin.Data.csproj | 4 ++-- .../Jellyfin.Server.Implementations.csproj | 4 ++-- Jellyfin.Server/Jellyfin.Server.csproj | 8 ++++---- MediaBrowser.Common/MediaBrowser.Common.csproj | 4 ++-- MediaBrowser.Controller/MediaBrowser.Controller.csproj | 4 ++-- MediaBrowser.Model/MediaBrowser.Model.csproj | 2 +- MediaBrowser.Providers/MediaBrowser.Providers.csproj | 6 +++--- deployment/Dockerfile.debian.amd64 | 2 +- deployment/Dockerfile.debian.arm64 | 2 +- deployment/Dockerfile.debian.armhf | 2 +- deployment/Dockerfile.linux.amd64 | 2 +- deployment/Dockerfile.macos | 2 +- deployment/Dockerfile.portable | 2 +- deployment/Dockerfile.ubuntu.amd64 | 2 +- deployment/Dockerfile.ubuntu.arm64 | 2 +- deployment/Dockerfile.ubuntu.armhf | 2 +- deployment/Dockerfile.windows.amd64 | 2 +- tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj | 4 ++-- 20 files changed, 34 insertions(+), 34 deletions(-) diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index 0a348f0d00..c84c7b53df 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -32,10 +32,10 @@ - - - - + + + + diff --git a/Jellyfin.Api/Jellyfin.Api.csproj b/Jellyfin.Api/Jellyfin.Api.csproj index ca0542b036..c27dce8ddf 100644 --- a/Jellyfin.Api/Jellyfin.Api.csproj +++ b/Jellyfin.Api/Jellyfin.Api.csproj @@ -14,9 +14,9 @@ - + - + diff --git a/Jellyfin.Data/Jellyfin.Data.csproj b/Jellyfin.Data/Jellyfin.Data.csproj index 95343f91b5..6bb0d8ce27 100644 --- a/Jellyfin.Data/Jellyfin.Data.csproj +++ b/Jellyfin.Data/Jellyfin.Data.csproj @@ -41,8 +41,8 @@ - - + + diff --git a/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj b/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj index 30ed3e6af3..4e79dd8d6c 100644 --- a/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj +++ b/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj @@ -24,11 +24,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Jellyfin.Server/Jellyfin.Server.csproj b/Jellyfin.Server/Jellyfin.Server.csproj index 0ac309a0b0..648172fbf7 100644 --- a/Jellyfin.Server/Jellyfin.Server.csproj +++ b/Jellyfin.Server/Jellyfin.Server.csproj @@ -41,10 +41,10 @@ - - - - + + + + diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj index 70dcc2397c..322740cca8 100644 --- a/MediaBrowser.Common/MediaBrowser.Common.csproj +++ b/MediaBrowser.Common/MediaBrowser.Common.csproj @@ -18,8 +18,8 @@ - - + + diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 9854ec520f..6544704065 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index c0a75009ae..2646810907 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -34,7 +34,7 @@ - + diff --git a/MediaBrowser.Providers/MediaBrowser.Providers.csproj b/MediaBrowser.Providers/MediaBrowser.Providers.csproj index 39f93c479b..51ca26361d 100644 --- a/MediaBrowser.Providers/MediaBrowser.Providers.csproj +++ b/MediaBrowser.Providers/MediaBrowser.Providers.csproj @@ -16,9 +16,9 @@ - - - + + + diff --git a/deployment/Dockerfile.debian.amd64 b/deployment/Dockerfile.debian.amd64 index 1ac5f76d6c..7202c58838 100644 --- a/deployment/Dockerfile.debian.amd64 +++ b/deployment/Dockerfile.debian.amd64 @@ -16,7 +16,7 @@ RUN apt-get update \ # Install dotnet repository # https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current -RUN wget https://download.visualstudio.microsoft.com/download/pr/4f9b8a64-5e09-456c-a087-527cfc8b4cd2/15e14ec06eab947432de139f172f7a98/dotnet-sdk-3.1.401-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ +RUN wget https://download.visualstudio.microsoft.com/download/pr/f01e3d97-c1c3-4635-bc77-0c893be36820/6ec6acabc22468c6cc68b61625b14a7d/dotnet-sdk-3.1.402-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ && mkdir -p dotnet-sdk \ && tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \ && ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet diff --git a/deployment/Dockerfile.debian.arm64 b/deployment/Dockerfile.debian.arm64 index 68381e7bfd..e9f30213f4 100644 --- a/deployment/Dockerfile.debian.arm64 +++ b/deployment/Dockerfile.debian.arm64 @@ -16,7 +16,7 @@ RUN apt-get update \ # Install dotnet repository # https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current -RUN wget https://download.visualstudio.microsoft.com/download/pr/4f9b8a64-5e09-456c-a087-527cfc8b4cd2/15e14ec06eab947432de139f172f7a98/dotnet-sdk-3.1.401-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ +RUN wget https://download.visualstudio.microsoft.com/download/pr/f01e3d97-c1c3-4635-bc77-0c893be36820/6ec6acabc22468c6cc68b61625b14a7d/dotnet-sdk-3.1.402-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ && mkdir -p dotnet-sdk \ && tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \ && ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet diff --git a/deployment/Dockerfile.debian.armhf b/deployment/Dockerfile.debian.armhf index ce1b100c1c..91a8a6e7a1 100644 --- a/deployment/Dockerfile.debian.armhf +++ b/deployment/Dockerfile.debian.armhf @@ -16,7 +16,7 @@ RUN apt-get update \ # Install dotnet repository # https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current -RUN wget https://download.visualstudio.microsoft.com/download/pr/4f9b8a64-5e09-456c-a087-527cfc8b4cd2/15e14ec06eab947432de139f172f7a98/dotnet-sdk-3.1.401-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ +RUN wget https://download.visualstudio.microsoft.com/download/pr/f01e3d97-c1c3-4635-bc77-0c893be36820/6ec6acabc22468c6cc68b61625b14a7d/dotnet-sdk-3.1.402-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ && mkdir -p dotnet-sdk \ && tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \ && ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet diff --git a/deployment/Dockerfile.linux.amd64 b/deployment/Dockerfile.linux.amd64 index b4a3c1b76d..828d5c2cf9 100644 --- a/deployment/Dockerfile.linux.amd64 +++ b/deployment/Dockerfile.linux.amd64 @@ -16,7 +16,7 @@ RUN apt-get update \ # Install dotnet repository # https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current -RUN wget https://download.visualstudio.microsoft.com/download/pr/4f9b8a64-5e09-456c-a087-527cfc8b4cd2/15e14ec06eab947432de139f172f7a98/dotnet-sdk-3.1.401-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ +RUN wget https://download.visualstudio.microsoft.com/download/pr/f01e3d97-c1c3-4635-bc77-0c893be36820/6ec6acabc22468c6cc68b61625b14a7d/dotnet-sdk-3.1.402-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ && mkdir -p dotnet-sdk \ && tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \ && ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet diff --git a/deployment/Dockerfile.macos b/deployment/Dockerfile.macos index 7912e018e5..0b2a0fe5fa 100644 --- a/deployment/Dockerfile.macos +++ b/deployment/Dockerfile.macos @@ -16,7 +16,7 @@ RUN apt-get update \ # Install dotnet repository # https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current -RUN wget https://download.visualstudio.microsoft.com/download/pr/4f9b8a64-5e09-456c-a087-527cfc8b4cd2/15e14ec06eab947432de139f172f7a98/dotnet-sdk-3.1.401-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ +RUN wget https://download.visualstudio.microsoft.com/download/pr/f01e3d97-c1c3-4635-bc77-0c893be36820/6ec6acabc22468c6cc68b61625b14a7d/dotnet-sdk-3.1.402-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ && mkdir -p dotnet-sdk \ && tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \ && ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet diff --git a/deployment/Dockerfile.portable b/deployment/Dockerfile.portable index 949f1ef8f8..7d5de230fa 100644 --- a/deployment/Dockerfile.portable +++ b/deployment/Dockerfile.portable @@ -15,7 +15,7 @@ RUN apt-get update \ # Install dotnet repository # https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current -RUN wget https://download.visualstudio.microsoft.com/download/pr/4f9b8a64-5e09-456c-a087-527cfc8b4cd2/15e14ec06eab947432de139f172f7a98/dotnet-sdk-3.1.401-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ +RUN wget https://download.visualstudio.microsoft.com/download/pr/f01e3d97-c1c3-4635-bc77-0c893be36820/6ec6acabc22468c6cc68b61625b14a7d/dotnet-sdk-3.1.402-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ && mkdir -p dotnet-sdk \ && tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \ && ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet diff --git a/deployment/Dockerfile.ubuntu.amd64 b/deployment/Dockerfile.ubuntu.amd64 index 9518d84936..9c63f43dfa 100644 --- a/deployment/Dockerfile.ubuntu.amd64 +++ b/deployment/Dockerfile.ubuntu.amd64 @@ -16,7 +16,7 @@ RUN apt-get update \ # Install dotnet repository # https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current -RUN wget https://download.visualstudio.microsoft.com/download/pr/4f9b8a64-5e09-456c-a087-527cfc8b4cd2/15e14ec06eab947432de139f172f7a98/dotnet-sdk-3.1.401-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ +RUN wget https://download.visualstudio.microsoft.com/download/pr/f01e3d97-c1c3-4635-bc77-0c893be36820/6ec6acabc22468c6cc68b61625b14a7d/dotnet-sdk-3.1.402-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ && mkdir -p dotnet-sdk \ && tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \ && ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet diff --git a/deployment/Dockerfile.ubuntu.arm64 b/deployment/Dockerfile.ubuntu.arm64 index 0174f2f2a9..51612dd443 100644 --- a/deployment/Dockerfile.ubuntu.arm64 +++ b/deployment/Dockerfile.ubuntu.arm64 @@ -16,7 +16,7 @@ RUN apt-get update \ # Install dotnet repository # https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current -RUN wget https://download.visualstudio.microsoft.com/download/pr/4f9b8a64-5e09-456c-a087-527cfc8b4cd2/15e14ec06eab947432de139f172f7a98/dotnet-sdk-3.1.401-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ +RUN wget https://download.visualstudio.microsoft.com/download/pr/f01e3d97-c1c3-4635-bc77-0c893be36820/6ec6acabc22468c6cc68b61625b14a7d/dotnet-sdk-3.1.402-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ && mkdir -p dotnet-sdk \ && tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \ && ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet diff --git a/deployment/Dockerfile.ubuntu.armhf b/deployment/Dockerfile.ubuntu.armhf index 0e02240c8f..4ed7f86872 100644 --- a/deployment/Dockerfile.ubuntu.armhf +++ b/deployment/Dockerfile.ubuntu.armhf @@ -16,7 +16,7 @@ RUN apt-get update \ # Install dotnet repository # https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current -RUN wget https://download.visualstudio.microsoft.com/download/pr/4f9b8a64-5e09-456c-a087-527cfc8b4cd2/15e14ec06eab947432de139f172f7a98/dotnet-sdk-3.1.401-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ +RUN wget https://download.visualstudio.microsoft.com/download/pr/f01e3d97-c1c3-4635-bc77-0c893be36820/6ec6acabc22468c6cc68b61625b14a7d/dotnet-sdk-3.1.402-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ && mkdir -p dotnet-sdk \ && tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \ && ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet diff --git a/deployment/Dockerfile.windows.amd64 b/deployment/Dockerfile.windows.amd64 index d1f2f9e48b..5671cc598a 100644 --- a/deployment/Dockerfile.windows.amd64 +++ b/deployment/Dockerfile.windows.amd64 @@ -15,7 +15,7 @@ RUN apt-get update \ # Install dotnet repository # https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current -RUN wget https://download.visualstudio.microsoft.com/download/pr/4f9b8a64-5e09-456c-a087-527cfc8b4cd2/15e14ec06eab947432de139f172f7a98/dotnet-sdk-3.1.401-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ +RUN wget https://download.visualstudio.microsoft.com/download/pr/f01e3d97-c1c3-4635-bc77-0c893be36820/6ec6acabc22468c6cc68b61625b14a7d/dotnet-sdk-3.1.402-linux-x64.tar.gz -O dotnet-sdk.tar.gz \ && mkdir -p dotnet-sdk \ && tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \ && ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet diff --git a/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj b/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj index bcba3a2032..e3a7a54286 100644 --- a/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj +++ b/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj @@ -16,8 +16,8 @@ - - + + From 81f655803d50ce75c270d06d409d1f1c190a6d79 Mon Sep 17 00:00:00 2001 From: Jim Cartlidge Date: Sun, 13 Sep 2020 16:30:04 +0100 Subject: [PATCH 21/82] Modified to work with manifests. --- .../ApplicationHost.cs | 43 +++++++++++-------- .../Plugins/PlugInManifest.cs | 32 ++++++++++++++ 2 files changed, 57 insertions(+), 18 deletions(-) create mode 100644 Emby.Server.Implementations/Plugins/PlugInManifest.cs diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 1bc436820e..89752c63c0 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -38,6 +38,7 @@ using Emby.Server.Implementations.LiveTv; using Emby.Server.Implementations.Localization; using Emby.Server.Implementations.Net; using Emby.Server.Implementations.Playlists; +using Emby.Server.Implementations.Plugins; using Emby.Server.Implementations.QuickConnect; using Emby.Server.Implementations.ScheduledTasks; using Emby.Server.Implementations.Security; @@ -1020,7 +1021,7 @@ namespace Emby.Server.Implementations /// Comparison function used in . /// private static int VersionCompare( - (Version PluginVersion, string Name, string Path) a, + (Version PluginVersion, string Name, string Path) a, (Version PluginVersion, string Name, string Path) b) { int compare = string.Compare(a.Name, b.Name, true, CultureInfo.InvariantCulture); @@ -1033,32 +1034,38 @@ namespace Emby.Server.Implementations return compare; } - /// - /// Only loads the latest version of each assembly based upon the folder name. - /// eg. MyAssembly_11.9.3.6 - will be ignored. - /// MyAssembly_12.2.3.6 - will be loaded. - /// - /// Path to enumerate. - /// Set to true, to try and clean up earlier versions. - /// IEnumerable{string} of filenames. - protected IEnumerable GetLatestDLLVersion(string path, bool cleanup = true) + private IEnumerable GetPlugins(string path, bool cleanup = true) { var dllList = new List(); var versions = new List<(Version PluginVersion, string Name, string Path)>(); var directories = Directory.EnumerateDirectories(path, "*.*", SearchOption.TopDirectoryOnly); + var serializer = new JsonSerializer(); foreach (var dir in directories) { - int underscoreIndex = dir.LastIndexOf('_'); - if (underscoreIndex != -1 && Version.TryParse(dir.Substring(underscoreIndex + 1), out Version ver)) + try { - // Versioned folder. - versions.Add((ver, dir.Substring(0, underscoreIndex), dir)); + var manifest = serializer.DeserializeFromFile(dir + "\\meta.json"); + + if (!Version.TryParse(manifest.TargetAbi, out var targetAbi)) + { + targetAbi = new Version("0.0.0.1"); + } + + if (!Version.TryParse(manifest.Version, out var version)) + { + version = new Version("0.0.0.1"); + } + + if (targetAbi <= ApplicationVersion) + { + // Only load Plugins for this version or below. + versions.Add((version, manifest.Name, dir)); + } } - else + catch { - // Un-versioned folder. - versions.Add((new Version(), dir, dir)); + continue; } } @@ -1101,7 +1108,7 @@ namespace Emby.Server.Implementations { if (Directory.Exists(ApplicationPaths.PluginsPath)) { - foreach (var file in GetLatestDLLVersion(ApplicationPaths.PluginsPath)) + foreach (var file in GetPlugins(ApplicationPaths.PluginsPath)) { Assembly plugAss; try diff --git a/Emby.Server.Implementations/Plugins/PlugInManifest.cs b/Emby.Server.Implementations/Plugins/PlugInManifest.cs new file mode 100644 index 0000000000..e334d65e50 --- /dev/null +++ b/Emby.Server.Implementations/Plugins/PlugInManifest.cs @@ -0,0 +1,32 @@ +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +using System; + +namespace Emby.Server.Implementations.Plugins +{ + /// + /// Defines a Plugin manifest file. + /// + public class PlugInManifest + { + public string Category { get; set; } + + public string Changelog { get; set; } + + public string Description { get; set; } + + public Guid Guid { get; set; } + + public string Name { get; set; } + + public string Overview { get; set; } + + public string Owner { get; set; } + + public string TargetAbi { get; set; } + + public DateTime Timestamp { get; set; } + + public string Version { get; set; } +} +} From 5f58d2c15183736098ca9e4cb7397ea9fb75d5d1 Mon Sep 17 00:00:00 2001 From: Jim Cartlidge Date: Sun, 13 Sep 2020 16:37:20 +0100 Subject: [PATCH 22/82] With method comments. --- Emby.Server.Implementations/ApplicationHost.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 89752c63c0..7f17419399 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1020,6 +1020,9 @@ namespace Emby.Server.Implementations /// /// Comparison function used in . /// + /// Item to compare. + /// Item to compare with. + /// Boolean result of the operation. private static int VersionCompare( (Version PluginVersion, string Name, string Path) a, (Version PluginVersion, string Name, string Path) b) @@ -1034,6 +1037,12 @@ namespace Emby.Server.Implementations return compare; } + /// + /// Returns a list of plugsin to install. + /// + /// Path to check. + /// True if an attempt should be made to delete old plugs. + /// Enumerable list of dlls to load. private IEnumerable GetPlugins(string path, bool cleanup = true) { var dllList = new List(); From b4edb7c90d82a8a3e1e542e0e5e26cb3a1f70a6a Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sun, 13 Sep 2020 17:24:02 +0100 Subject: [PATCH 23/82] Update Emby.Server.Implementations/ApplicationHost.cs Co-authored-by: Cody Robibero --- Emby.Server.Implementations/ApplicationHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 7f17419399..9aeb0c42a2 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1058,7 +1058,7 @@ namespace Emby.Server.Implementations if (!Version.TryParse(manifest.TargetAbi, out var targetAbi)) { - targetAbi = new Version("0.0.0.1"); + targetAbi = new Version(0, 0, 0, 1); } if (!Version.TryParse(manifest.Version, out var version)) From 008aa51eb731c926df3c584fed8d7ccad1d8c94a Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sun, 13 Sep 2020 17:24:30 +0100 Subject: [PATCH 24/82] Update Emby.Server.Implementations/ApplicationHost.cs Co-authored-by: Cody Robibero --- Emby.Server.Implementations/ApplicationHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 9aeb0c42a2..cf55f392d8 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1063,7 +1063,7 @@ namespace Emby.Server.Implementations if (!Version.TryParse(manifest.Version, out var version)) { - version = new Version("0.0.0.1"); + version = new Version(0, 0, 0, 1); } if (targetAbi <= ApplicationVersion) From 12fb827405473d9f499848ce2098008fc96d0321 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sun, 13 Sep 2020 17:29:10 +0100 Subject: [PATCH 25/82] Update Emby.Server.Implementations/ApplicationHost.cs Co-authored-by: Cody Robibero --- Emby.Server.Implementations/ApplicationHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index cf55f392d8..db70b6203c 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1054,7 +1054,7 @@ namespace Emby.Server.Implementations { try { - var manifest = serializer.DeserializeFromFile(dir + "\\meta.json"); + var manifest = serializer.DeserializeFromFile(Path.Combine(dir, "meta.json"); if (!Version.TryParse(manifest.TargetAbi, out var targetAbi)) { From ea0eb9a6ffc8a667c9d9d455121d3f48d72fa360 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sun, 13 Sep 2020 17:42:40 +0100 Subject: [PATCH 26/82] Update PlugInManifest.cs Added comments. --- .../Plugins/PlugInManifest.cs | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/Emby.Server.Implementations/Plugins/PlugInManifest.cs b/Emby.Server.Implementations/Plugins/PlugInManifest.cs index e334d65e50..fa48d73c55 100644 --- a/Emby.Server.Implementations/Plugins/PlugInManifest.cs +++ b/Emby.Server.Implementations/Plugins/PlugInManifest.cs @@ -1,5 +1,3 @@ -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - using System; namespace Emby.Server.Implementations.Plugins @@ -9,24 +7,54 @@ namespace Emby.Server.Implementations.Plugins /// public class PlugInManifest { + /// + /// Gets or sets the category of the plugin. + /// public string Category { get; set; } + /// + /// Gets or sets the changelog information. + /// public string Changelog { get; set; } + /// + /// Gets or sets the description of the plugin. + /// public string Description { get; set; } + /// + /// Gets or sets the Global Unique Identifier for the plugin. + /// public Guid Guid { get; set; } + /// + /// Gets or sets the Name of the plugin. + /// public string Name { get; set; } + /// + /// Gets or sets an overview of the plugin. + /// public string Overview { get; set; } + /// + /// Gets or sets the owner of the plugin. + /// public string Owner { get; set; } + /// + /// Gets or sets the compatibility version for the plugin. + /// public string TargetAbi { get; set; } + /// + /// Gets or sets the timestamp of the plugin. + /// public DateTime Timestamp { get; set; } + /// + /// Gets or sets the Version number of the plugin. + /// public string Version { get; set; } -} + } } From 6c2c2cb872b0e98ff27d1cc8d664a185e63e39ac Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sun, 13 Sep 2020 17:45:17 +0100 Subject: [PATCH 27/82] Update ApplicationHost.cs Global jsonserializer added --- Emby.Server.Implementations/ApplicationHost.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index db70b6203c..ea4c77f3cc 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -121,6 +121,7 @@ namespace Emby.Server.Implementations private readonly IFileSystem _fileSystemManager; private readonly INetworkManager _networkManager; private readonly IXmlSerializer _xmlSerializer; + private readonly IJsonSerializer _jsonSerializer; private readonly IStartupOptions _startupOptions; private IMediaEncoder _mediaEncoder; @@ -251,6 +252,8 @@ namespace Emby.Server.Implementations IServiceCollection serviceCollection) { _xmlSerializer = new MyXmlSerializer(); + _jsonSerializer = new JsonSerializer(); + ServiceCollection = serviceCollection; _networkManager = networkManager; @@ -1049,12 +1052,11 @@ namespace Emby.Server.Implementations var versions = new List<(Version PluginVersion, string Name, string Path)>(); var directories = Directory.EnumerateDirectories(path, "*.*", SearchOption.TopDirectoryOnly); - var serializer = new JsonSerializer(); foreach (var dir in directories) { try { - var manifest = serializer.DeserializeFromFile(Path.Combine(dir, "meta.json"); + var manifest = _jsonSerializer.DeserializeFromFile(Path.Combine(dir, "meta.json"); if (!Version.TryParse(manifest.TargetAbi, out var targetAbi)) { From 107d606a7069e43bafacd0e8254631230219111f Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sun, 13 Sep 2020 17:51:14 +0100 Subject: [PATCH 28/82] Update ApplicationHost.cs --- Emby.Server.Implementations/ApplicationHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index ea4c77f3cc..9540a879af 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1056,7 +1056,7 @@ namespace Emby.Server.Implementations { try { - var manifest = _jsonSerializer.DeserializeFromFile(Path.Combine(dir, "meta.json"); + var manifest = _jsonSerializer.DeserializeFromFile(Path.Combine(dir, "meta.json")); if (!Version.TryParse(manifest.TargetAbi, out var targetAbi)) { From 7b4b101ecacb6026cf2ca4142f0ca0fbb0f637fd Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sun, 13 Sep 2020 18:06:13 +0100 Subject: [PATCH 29/82] Update ApplicationHost.cs --- Emby.Server.Implementations/ApplicationHost.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 9540a879af..2206fabadf 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1021,7 +1021,7 @@ namespace Emby.Server.Implementations protected abstract void RestartInternal(); /// - /// Comparison function used in . + /// Comparison function used in . /// /// Item to compare. /// Item to compare with. @@ -1068,7 +1068,7 @@ namespace Emby.Server.Implementations version = new Version(0, 0, 0, 1); } - if (targetAbi <= ApplicationVersion) + if (targetAbi >= ApplicationVersion) { // Only load Plugins for this version or below. versions.Add((version, manifest.Name, dir)); From b83b8f526729771ce52571bf6447a2d5eeac4b8d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2020 12:02:19 +0000 Subject: [PATCH 30/82] Bump SkiaSharp from 2.80.1 to 2.80.2 Bumps SkiaSharp from 2.80.1 to 2.80.2. Signed-off-by: dependabot[bot] --- Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj b/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj index c71c76f08f..6b378034a5 100644 --- a/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj +++ b/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj @@ -20,7 +20,7 @@ - + From 68d08e94fded259adc2b2cd3d9379d6ab1e8b384 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Mon, 14 Sep 2020 16:18:39 +0100 Subject: [PATCH 31/82] Update Emby.Server.Implementations/ApplicationHost.cs Co-authored-by: Cody Robibero --- Emby.Server.Implementations/ApplicationHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 2206fabadf..878ea30fc7 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1041,7 +1041,7 @@ namespace Emby.Server.Implementations } /// - /// Returns a list of plugsin to install. + /// Returns a list of plugins to install. /// /// Path to check. /// True if an attempt should be made to delete old plugs. From cdf96d266317b2a16e8fcba2f18804f8a1b58bcb Mon Sep 17 00:00:00 2001 From: Android Dev Notes Date: Mon, 14 Sep 2020 21:30:20 +0530 Subject: [PATCH 32/82] Fix typos --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 55d6917ae0..5e731d2100 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ To run the project with Visual Studio Code you will first need to open the repos Second, you need to [install the recommended extensions for the workspace](https://code.visualstudio.com/docs/editor/extension-gallery#_recommended-extensions). Note that extension recommendations are classified as either "Workspace Recommendations" or "Other Recommendations", but only the "Workspace Recommendations" are required. -After the required extensions are installed, you can can run the server by pressing `F5`. +After the required extensions are installed, you can run the server by pressing `F5`. #### Running From The Command Line From f73e744785fc8016e858c9f676ac0b04ee4f564b Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Mon, 14 Sep 2020 17:58:10 +0100 Subject: [PATCH 33/82] Update Emby.Server.Implementations/Plugins/PlugInManifest.cs Co-authored-by: dkanada --- Emby.Server.Implementations/Plugins/PlugInManifest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Plugins/PlugInManifest.cs b/Emby.Server.Implementations/Plugins/PlugInManifest.cs index fa48d73c55..b874676d84 100644 --- a/Emby.Server.Implementations/Plugins/PlugInManifest.cs +++ b/Emby.Server.Implementations/Plugins/PlugInManifest.cs @@ -5,7 +5,7 @@ namespace Emby.Server.Implementations.Plugins /// /// Defines a Plugin manifest file. /// - public class PlugInManifest + public class PluginManifest { /// /// Gets or sets the category of the plugin. From a626ce5bd00ad1076ea704673ecd38d270938264 Mon Sep 17 00:00:00 2001 From: hoanghuy309 Date: Mon, 14 Sep 2020 14:10:44 +0000 Subject: [PATCH 34/82] Translated using Weblate (Vietnamese) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/vi/ --- Emby.Server.Implementations/Localization/Core/vi.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Emby.Server.Implementations/Localization/Core/vi.json b/Emby.Server.Implementations/Localization/Core/vi.json index 8b4334d7a6..bf4cfe75ca 100644 --- a/Emby.Server.Implementations/Localization/Core/vi.json +++ b/Emby.Server.Implementations/Localization/Core/vi.json @@ -4,7 +4,7 @@ "Folders": "Thư Mục", "Genres": "Thể Loại", "HeaderAlbumArtists": "Bộ Sưu Tập Nghệ sĩ", - "HeaderContinueWatching": "Tiếp Tục Xem", + "HeaderContinueWatching": "Tiếp Tục Xem Tiếp", "HeaderLiveTV": "TV Trực Tiếp", "Movies": "Phim", "Photos": "Ảnh", @@ -14,7 +14,7 @@ "Sync": "Đồng Bộ", "ValueSpecialEpisodeName": "Đặc Biệt - {0}", "Albums": "Bộ Sưu Tập", - "Artists": "Nghệ Sĩ", + "Artists": "Các Nghệ Sĩ", "TaskDownloadMissingSubtitlesDescription": "Tìm kiếm phụ đề bị thiếu trên Internet dựa trên cấu hình thông tin chi tiết.", "TaskDownloadMissingSubtitles": "Tải xuống phụ đề bị thiếu", "TaskRefreshChannelsDescription": "Làm mới thông tin kênh internet.", @@ -108,9 +108,9 @@ "DeviceOnlineWithName": "{0} đã kết nối", "DeviceOfflineWithName": "{0} đã ngắt kết nối", "ChapterNameValue": "Chương {0}", - "Channels": "Kênh", + "Channels": "Các Kênh", "CameraImageUploadedFrom": "Một hình ảnh máy ảnh mới đã được tải lên từ {0}", - "Books": "Sách", + "Books": "Các Quyển Sách", "AuthenticationSucceededWithUserName": "{0} xác thực thành công", "Application": "Ứng Dụng", "AppDeviceValues": "Ứng Dụng: {0}, Thiết Bị: {1}" From d27d2a8990afb80ba137688121f85b831599d45a Mon Sep 17 00:00:00 2001 From: Jim Cartlidge Date: Mon, 14 Sep 2020 18:23:50 +0100 Subject: [PATCH 35/82] Renamed file. --- .../ApplicationHost.cs | 35 ++++++++++++------- .../Plugins/PlugInManifest.cs | 20 +++++------ 2 files changed, 33 insertions(+), 22 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 878ea30fc7..d1e28cce5c 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1051,27 +1051,38 @@ namespace Emby.Server.Implementations var dllList = new List(); var versions = new List<(Version PluginVersion, string Name, string Path)>(); var directories = Directory.EnumerateDirectories(path, "*.*", SearchOption.TopDirectoryOnly); + string metafile; foreach (var dir in directories) { try { - var manifest = _jsonSerializer.DeserializeFromFile(Path.Combine(dir, "meta.json")); - - if (!Version.TryParse(manifest.TargetAbi, out var targetAbi)) + metafile = Path.Combine(dir, "meta.json"); + if (File.Exists(metafile)) { - targetAbi = new Version(0, 0, 0, 1); - } + var manifest = _jsonSerializer.DeserializeFromFile(metafile); - if (!Version.TryParse(manifest.Version, out var version)) - { - version = new Version(0, 0, 0, 1); - } + if (!Version.TryParse(manifest.TargetAbi, out var targetAbi)) + { + targetAbi = new Version(0, 0, 0, 1); + } - if (targetAbi >= ApplicationVersion) + if (!Version.TryParse(manifest.Version, out var version)) + { + version = new Version(0, 0, 0, 1); + } + + if (ApplicationVersion <= targetAbi) + { + // Only load Plugins if the plugin is built for this version or below. + versions.Add((version, manifest.Name, dir)); + } + } + else { - // Only load Plugins for this version or below. - versions.Add((version, manifest.Name, dir)); + metafile = dir.Split(new char[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries).Last(); + // Add it under the path name and version 0.0.0.1. + versions.Add((new Version("0.0.0.1"), metafile, dir)); } } catch diff --git a/Emby.Server.Implementations/Plugins/PlugInManifest.cs b/Emby.Server.Implementations/Plugins/PlugInManifest.cs index b874676d84..33762791bc 100644 --- a/Emby.Server.Implementations/Plugins/PlugInManifest.cs +++ b/Emby.Server.Implementations/Plugins/PlugInManifest.cs @@ -9,52 +9,52 @@ namespace Emby.Server.Implementations.Plugins { /// /// Gets or sets the category of the plugin. - /// + /// public string Category { get; set; } /// /// Gets or sets the changelog information. - /// + /// public string Changelog { get; set; } /// /// Gets or sets the description of the plugin. - /// + /// public string Description { get; set; } /// /// Gets or sets the Global Unique Identifier for the plugin. - /// + /// public Guid Guid { get; set; } /// /// Gets or sets the Name of the plugin. - /// + /// public string Name { get; set; } /// /// Gets or sets an overview of the plugin. - /// + /// public string Overview { get; set; } /// /// Gets or sets the owner of the plugin. - /// + /// public string Owner { get; set; } /// /// Gets or sets the compatibility version for the plugin. - /// + /// public string TargetAbi { get; set; } /// /// Gets or sets the timestamp of the plugin. - /// + /// public DateTime Timestamp { get; set; } /// /// Gets or sets the Version number of the plugin. - /// + /// public string Version { get; set; } } } From f80e181eda2d1bb9348bb2b7e050e51d9948cb41 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Mon, 14 Sep 2020 18:44:17 +0100 Subject: [PATCH 36/82] Update Emby.Server.Implementations/ApplicationHost.cs Co-authored-by: Cody Robibero --- Emby.Server.Implementations/ApplicationHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index d1e28cce5c..4cb107f804 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1080,7 +1080,7 @@ namespace Emby.Server.Implementations } else { - metafile = dir.Split(new char[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries).Last(); + metafile = dir.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries)[^1]; // Add it under the path name and version 0.0.0.1. versions.Add((new Version("0.0.0.1"), metafile, dir)); } From e88d3ba8c2fd502ee159c0554467e9af064dfd1c Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Mon, 14 Sep 2020 18:44:29 +0100 Subject: [PATCH 37/82] Update Emby.Server.Implementations/ApplicationHost.cs Co-authored-by: Cody Robibero --- Emby.Server.Implementations/ApplicationHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 4cb107f804..8eed609d42 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1082,7 +1082,7 @@ namespace Emby.Server.Implementations { metafile = dir.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries)[^1]; // Add it under the path name and version 0.0.0.1. - versions.Add((new Version("0.0.0.1"), metafile, dir)); + versions.Add(new Version(0, 0, 0, 1), metafile, dir)); } } catch From 51c416c83250988a20c2bd1c21a9fa4d528437a3 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Mon, 14 Sep 2020 20:23:35 +0100 Subject: [PATCH 38/82] Update Emby.Server.Implementations/ApplicationHost.cs Co-authored-by: Cody Robibero --- Emby.Server.Implementations/ApplicationHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 8eed609d42..b9e2f5b672 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1072,7 +1072,7 @@ namespace Emby.Server.Implementations version = new Version(0, 0, 0, 1); } - if (ApplicationVersion <= targetAbi) + if (ApplicationVersion >= targetAbi) { // Only load Plugins if the plugin is built for this version or below. versions.Add((version, manifest.Name, dir)); From 69c4b44d248367fb45019242ab95d68ef0eff7e3 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Mon, 14 Sep 2020 20:52:18 +0100 Subject: [PATCH 39/82] Update ApplicationHost.cs --- Emby.Server.Implementations/ApplicationHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index b9e2f5b672..3dce001c7d 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1080,7 +1080,7 @@ namespace Emby.Server.Implementations } else { - metafile = dir.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries)[^1]; + metafile = dir.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries)[^1]); // Add it under the path name and version 0.0.0.1. versions.Add(new Version(0, 0, 0, 1), metafile, dir)); } From 02951bb8ce19f5487f2960c3a71fb23f870f9f9a Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Mon, 14 Sep 2020 20:57:00 +0100 Subject: [PATCH 40/82] Update Emby.Server.Implementations/ApplicationHost.cs Co-authored-by: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> --- Emby.Server.Implementations/ApplicationHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 3dce001c7d..c4447770fb 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1082,7 +1082,7 @@ namespace Emby.Server.Implementations { metafile = dir.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries)[^1]); // Add it under the path name and version 0.0.0.1. - versions.Add(new Version(0, 0, 0, 1), metafile, dir)); + versions.Add(new Version(0, 0, 0, 1), metafile, dir); } } catch From 5baf87663f80a2e4f899b596d6f14aaa2f01687b Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Mon, 14 Sep 2020 20:57:49 +0100 Subject: [PATCH 41/82] Update Emby.Server.Implementations/ApplicationHost.cs Co-authored-by: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> --- Emby.Server.Implementations/ApplicationHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index c4447770fb..d4d3a1d3b6 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1080,7 +1080,7 @@ namespace Emby.Server.Implementations } else { - metafile = dir.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries)[^1]); + metafile = dir.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries)[^1]; // Add it under the path name and version 0.0.0.1. versions.Add(new Version(0, 0, 0, 1), metafile, dir); } From a2c50e8005280887ad744739469cd64df13bfabb Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Mon, 14 Sep 2020 21:02:13 +0100 Subject: [PATCH 42/82] Update Emby.Server.Implementations/ApplicationHost.cs Co-authored-by: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> --- Emby.Server.Implementations/ApplicationHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index d4d3a1d3b6..83617111b1 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1082,7 +1082,7 @@ namespace Emby.Server.Implementations { metafile = dir.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries)[^1]; // Add it under the path name and version 0.0.0.1. - versions.Add(new Version(0, 0, 0, 1), metafile, dir); + versions.Add((new Version(0, 0, 0, 1), metafile, dir)); } } catch From 2dbf73b98962bcab1de06f8699e621e4e75a96fb Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Wed, 16 Sep 2020 14:16:44 +0200 Subject: [PATCH 43/82] Minor improvements --- Emby.Dlna/DlnaManager.cs | 16 ++++----- .../Data/SqliteExtensions.cs | 4 ++- .../Controllers/DynamicHlsController.cs | 36 +++++++++---------- Jellyfin.Api/Controllers/LiveTvController.cs | 2 +- .../Controllers/SubtitleController.cs | 8 +++-- .../Manager/MetadataService.cs | 19 +++------- RSSDP/DisposableManagedObjectBase.cs | 4 +-- 7 files changed, 41 insertions(+), 48 deletions(-) diff --git a/Emby.Dlna/DlnaManager.cs b/Emby.Dlna/DlnaManager.cs index 5612376a55..1807ac6a13 100644 --- a/Emby.Dlna/DlnaManager.cs +++ b/Emby.Dlna/DlnaManager.cs @@ -126,14 +126,14 @@ namespace Emby.Dlna var builder = new StringBuilder(); builder.AppendLine("No matching device profile found. The default will need to be used."); - builder.AppendFormat(CultureInfo.InvariantCulture, "FriendlyName:{0}", profile.FriendlyName ?? string.Empty).AppendLine(); - builder.AppendFormat(CultureInfo.InvariantCulture, "Manufacturer:{0}", profile.Manufacturer ?? string.Empty).AppendLine(); - builder.AppendFormat(CultureInfo.InvariantCulture, "ManufacturerUrl:{0}", profile.ManufacturerUrl ?? string.Empty).AppendLine(); - builder.AppendFormat(CultureInfo.InvariantCulture, "ModelDescription:{0}", profile.ModelDescription ?? string.Empty).AppendLine(); - builder.AppendFormat(CultureInfo.InvariantCulture, "ModelName:{0}", profile.ModelName ?? string.Empty).AppendLine(); - builder.AppendFormat(CultureInfo.InvariantCulture, "ModelNumber:{0}", profile.ModelNumber ?? string.Empty).AppendLine(); - builder.AppendFormat(CultureInfo.InvariantCulture, "ModelUrl:{0}", profile.ModelUrl ?? string.Empty).AppendLine(); - builder.AppendFormat(CultureInfo.InvariantCulture, "SerialNumber:{0}", profile.SerialNumber ?? string.Empty).AppendLine(); + builder.Append("FriendlyName:").AppendLine(profile.FriendlyName); + builder.Append("Manufacturer:").AppendLine(profile.Manufacturer); + builder.Append("ManufacturerUrl:").AppendLine(profile.ManufacturerUrl); + builder.Append("ModelDescription:").AppendLine(profile.ModelDescription); + builder.Append("ModelName:").AppendLine(profile.ModelName); + builder.Append("ModelNumber:").AppendLine(profile.ModelNumber); + builder.Append("ModelUrl:").AppendLine(profile.ModelUrl); + builder.Append("SerialNumber:").AppendLine(profile.SerialNumber); _logger.LogInformation(builder.ToString()); } diff --git a/Emby.Server.Implementations/Data/SqliteExtensions.cs b/Emby.Server.Implementations/Data/SqliteExtensions.cs index 716e5071d5..70a6df977f 100644 --- a/Emby.Server.Implementations/Data/SqliteExtensions.cs +++ b/Emby.Server.Implementations/Data/SqliteExtensions.cs @@ -234,7 +234,9 @@ namespace Emby.Server.Implementations.Data { if (statement.BindParameters.TryGetValue(name, out IBindParameter bindParam)) { - bindParam.Bind(value.ToByteArray()); + Span byteValue = stackalloc byte[16]; + value.TryWriteBytes(byteValue); + bindParam.Bind(byteValue); } else { diff --git a/Jellyfin.Api/Controllers/DynamicHlsController.cs b/Jellyfin.Api/Controllers/DynamicHlsController.cs index 670b41611b..5fd9780c5d 100644 --- a/Jellyfin.Api/Controllers/DynamicHlsController.cs +++ b/Jellyfin.Api/Controllers/DynamicHlsController.cs @@ -1144,30 +1144,30 @@ namespace Jellyfin.Api.Controllers var builder = new StringBuilder(); - builder.AppendLine("#EXTM3U"); - builder.AppendLine("#EXT-X-PLAYLIST-TYPE:VOD"); - builder.AppendLine("#EXT-X-VERSION:3"); - builder.AppendLine("#EXT-X-TARGETDURATION:" + Math.Ceiling(segmentLengths.Length > 0 ? segmentLengths.Max() : state.SegmentLength).ToString(CultureInfo.InvariantCulture)); - builder.AppendLine("#EXT-X-MEDIA-SEQUENCE:0"); + builder.AppendLine("#EXTM3U") + .AppendLine("#EXT-X-PLAYLIST-TYPE:VOD") + .AppendLine("#EXT-X-VERSION:3") + .Append("#EXT-X-TARGETDURATION:") + .Append(Math.Ceiling(segmentLengths.Length > 0 ? segmentLengths.Max() : state.SegmentLength)) + .AppendLine() + .AppendLine("#EXT-X-MEDIA-SEQUENCE:0"); - var queryString = Request.QueryString; var index = 0; - var segmentExtension = GetSegmentFileExtension(streamingRequest.SegmentContainer); + var queryString = Request.QueryString; foreach (var length in segmentLengths) { - builder.AppendLine("#EXTINF:" + length.ToString("0.0000", CultureInfo.InvariantCulture) + ", nodesc"); - builder.AppendLine( - string.Format( - CultureInfo.InvariantCulture, - "hls1/{0}/{1}{2}{3}", - name, - index.ToString(CultureInfo.InvariantCulture), - segmentExtension, - queryString)); - - index++; + builder.Append("#EXTINF:") + .Append(length.ToString("0.0000", CultureInfo.InvariantCulture)) + .Append(", nodesc") + .Append("hls1/") + .Append(name) + .Append('/') + .Append(index++) + .Append(segmentExtension) + .Append(queryString) + .AppendLine(); } builder.AppendLine("#EXT-X-ENDLIST"); diff --git a/Jellyfin.Api/Controllers/LiveTvController.cs b/Jellyfin.Api/Controllers/LiveTvController.cs index 32ebfbd988..3557e63047 100644 --- a/Jellyfin.Api/Controllers/LiveTvController.cs +++ b/Jellyfin.Api/Controllers/LiveTvController.cs @@ -1017,9 +1017,9 @@ namespace Jellyfin.Api.Controllers [FromQuery] bool validateListings = false, [FromQuery] bool validateLogin = false) { - using var sha = SHA1.Create(); if (!string.IsNullOrEmpty(pw)) { + using var sha = SHA1.Create(); listingsProviderInfo.Password = Hex.Encode(sha.ComputeHash(Encoding.UTF8.GetBytes(pw))); } diff --git a/Jellyfin.Api/Controllers/SubtitleController.cs b/Jellyfin.Api/Controllers/SubtitleController.cs index 78c9d43981..cc682ed542 100644 --- a/Jellyfin.Api/Controllers/SubtitleController.cs +++ b/Jellyfin.Api/Controllers/SubtitleController.cs @@ -281,7 +281,8 @@ namespace Jellyfin.Api.Controllers var builder = new StringBuilder(); builder.AppendLine("#EXTM3U") .Append("#EXT-X-TARGETDURATION:") - .AppendLine(segmentLength.ToString(CultureInfo.InvariantCulture)) + .Append(segmentLength) + .AppendLine() .AppendLine("#EXT-X-VERSION:3") .AppendLine("#EXT-X-MEDIA-SEQUENCE:0") .AppendLine("#EXT-X-PLAYLIST-TYPE:VOD"); @@ -296,8 +297,9 @@ namespace Jellyfin.Api.Controllers var lengthTicks = Math.Min(remaining, segmentLengthTicks); builder.Append("#EXTINF:") - .Append(TimeSpan.FromTicks(lengthTicks).TotalSeconds.ToString(CultureInfo.InvariantCulture)) - .AppendLine(","); + .Append(TimeSpan.FromTicks(lengthTicks).TotalSeconds) + .Append(',') + .AppendLine(); var endPositionTicks = Math.Min(runtime, positionTicks + segmentLengthTicks); diff --git a/MediaBrowser.Providers/Manager/MetadataService.cs b/MediaBrowser.Providers/Manager/MetadataService.cs index 42785b0574..f110eafa5a 100644 --- a/MediaBrowser.Providers/Manager/MetadataService.cs +++ b/MediaBrowser.Providers/Manager/MetadataService.cs @@ -297,7 +297,7 @@ namespace MediaBrowser.Providers.Manager } /// - /// Befores the save. + /// Before the save. /// /// The item. /// if set to true [is full refresh]. @@ -355,13 +355,12 @@ namespace MediaBrowser.Providers.Manager protected virtual IList GetChildrenForMetadataUpdates(TItemType item) { - var folder = item as Folder; - if (folder != null) + if (item is Folder folder) { return folder.GetRecursiveChildren(); } - return new List(); + return Array.Empty(); } protected virtual ItemUpdateType UpdateMetadataFromChildren(TItemType item, IList children, bool isFullRefresh, ItemUpdateType currentUpdateType) @@ -814,7 +813,7 @@ namespace MediaBrowser.Providers.Manager try { - refreshResult.UpdateType = refreshResult.UpdateType | await provider.FetchAsync(item, options, cancellationToken).ConfigureAwait(false); + refreshResult.UpdateType |= await provider.FetchAsync(item, options, cancellationToken).ConfigureAwait(false); } catch (OperationCanceledException) { @@ -882,16 +881,6 @@ namespace MediaBrowser.Providers.Manager return refreshResult; } - private string NormalizeLanguage(string language) - { - if (string.IsNullOrWhiteSpace(language)) - { - return "en"; - } - - return language; - } - private void MergeNewData(TItemType source, TIdType lookupInfo) { // Copy new provider id's that may have been obtained diff --git a/RSSDP/DisposableManagedObjectBase.cs b/RSSDP/DisposableManagedObjectBase.cs index 66a0c5ec45..745ec359c9 100644 --- a/RSSDP/DisposableManagedObjectBase.cs +++ b/RSSDP/DisposableManagedObjectBase.cs @@ -43,13 +43,13 @@ namespace Rssdp.Infrastructure { var builder = new StringBuilder(); - const string argFormat = "{0}: {1}\r\n"; + const string ArgFormat = "{0}: {1}\r\n"; builder.AppendFormat("{0}\r\n", header); foreach (var pair in values) { - builder.AppendFormat(argFormat, pair.Key, pair.Value); + builder.AppendFormat(ArgFormat, pair.Key, pair.Value); } builder.Append("\r\n"); From ad00b93be54115674750b1b89421f9e5ea1807cb Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Wed, 16 Sep 2020 14:14:10 +0100 Subject: [PATCH 44/82] Rename PlugInManifest.cs to PluginManifest.cs --- .../Plugins/{PlugInManifest.cs => PluginManifest.cs} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Emby.Server.Implementations/Plugins/{PlugInManifest.cs => PluginManifest.cs} (100%) diff --git a/Emby.Server.Implementations/Plugins/PlugInManifest.cs b/Emby.Server.Implementations/Plugins/PluginManifest.cs similarity index 100% rename from Emby.Server.Implementations/Plugins/PlugInManifest.cs rename to Emby.Server.Implementations/Plugins/PluginManifest.cs From 0007756a5ee0b0da3ac238ccc76f4be198ee4eed Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Wed, 16 Sep 2020 15:35:37 +0200 Subject: [PATCH 45/82] Fix --- Jellyfin.Api/Controllers/DynamicHlsController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Api/Controllers/DynamicHlsController.cs b/Jellyfin.Api/Controllers/DynamicHlsController.cs index 5fd9780c5d..54481c9be7 100644 --- a/Jellyfin.Api/Controllers/DynamicHlsController.cs +++ b/Jellyfin.Api/Controllers/DynamicHlsController.cs @@ -1160,7 +1160,7 @@ namespace Jellyfin.Api.Controllers { builder.Append("#EXTINF:") .Append(length.ToString("0.0000", CultureInfo.InvariantCulture)) - .Append(", nodesc") + .AppendLine(", nodesc") .Append("hls1/") .Append(name) .Append('/') From 826148dc843616df4157de9f03e025fa60f6147d Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Thu, 17 Sep 2020 11:01:46 +0100 Subject: [PATCH 46/82] Added versioning to files without meta.json --- Emby.Server.Implementations/ApplicationHost.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 276d0fe30a..abec4126af 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1086,9 +1086,20 @@ namespace Emby.Server.Implementations } else { + // No metafile, so lets see if the folder is versioned. metafile = dir.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries)[^1]; - // Add it under the path name and version 0.0.0.1. - versions.Add((new Version(0, 0, 0, 1), metafile, dir)); + + int p = dir.LastIndexOf('_'); + if (p != -1 && Version.TryParse(dir.Substring(p + 1), out Version ver)) + { + // Versioned folder. + versions.Add((ver, metafile, dir)); + } + else + { + // Un-versioned folder - Add it under the path name and version 0.0.0.1. + versions.Add((new Version(0, 0, 0, 1), metafile, dir)); + } } } catch From 92b63db569f2e425673eba7d05e66411a9c4c21f Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Thu, 17 Sep 2020 15:57:11 +0100 Subject: [PATCH 47/82] Update ApplicationHost.cs --- Emby.Server.Implementations/ApplicationHost.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index abec4126af..7a46fdf2e7 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1089,8 +1089,8 @@ namespace Emby.Server.Implementations // No metafile, so lets see if the folder is versioned. metafile = dir.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries)[^1]; - int p = dir.LastIndexOf('_'); - if (p != -1 && Version.TryParse(dir.Substring(p + 1), out Version ver)) + int versionIndex = dir.LastIndexOf('_'); + if (versionIndex != -1 && Version.TryParse(dir.Substring(versionIndex + 1), out Version ver)) { // Versioned folder. versions.Add((ver, metafile, dir)); From 81db323f88ddd87b4f75f9231206e83fbe4356b1 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Thu, 17 Sep 2020 17:54:09 +0100 Subject: [PATCH 48/82] Update SessionController.cs --- Jellyfin.Api/Controllers/SessionController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs index b00675d679..9820ded444 100644 --- a/Jellyfin.Api/Controllers/SessionController.cs +++ b/Jellyfin.Api/Controllers/SessionController.cs @@ -155,13 +155,13 @@ namespace Jellyfin.Api.Controllers /// The starting position of the first item. /// Instruction sent to session. /// A . - [HttpPost("Sessions/{sessionId}/Playing/{command}")] + [HttpPost("Sessions/{sessionId}/Playing")] [Authorize(Policy = Policies.DefaultAuthorization)] [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult Play( [FromRoute, Required] string sessionId, [FromRoute, Required] PlayCommand command, - [FromQuery] Guid[] itemIds, + [FromQuery] Guid itemIds, [FromQuery] long? startPositionTicks) { var playRequest = new PlayRequest @@ -187,7 +187,7 @@ namespace Jellyfin.Api.Controllers /// The . /// Playstate command sent to session. /// A . - [HttpPost("Sessions/{sessionId}/Playing")] + [HttpPost("Sessions/{sessionId}/Playing/{command}")] [Authorize(Policy = Policies.DefaultAuthorization)] [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SendPlaystateCommand( From 9fc1a8b6198b80e2fe2dfcceab8614146c7fc6f4 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Thu, 17 Sep 2020 18:20:27 +0100 Subject: [PATCH 49/82] Inverted if statement --- Jellyfin.Api/Helpers/StreamingHelpers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Api/Helpers/StreamingHelpers.cs b/Jellyfin.Api/Helpers/StreamingHelpers.cs index 89ab2da627..f4ec29bdef 100644 --- a/Jellyfin.Api/Helpers/StreamingHelpers.cs +++ b/Jellyfin.Api/Helpers/StreamingHelpers.cs @@ -169,7 +169,7 @@ namespace Jellyfin.Api.Helpers string? containerInternal = Path.GetExtension(state.RequestedUrl); - if (string.IsNullOrEmpty(streamingRequest.Container)) + if (!string.IsNullOrEmpty(streamingRequest.Container)) { containerInternal = streamingRequest.Container; } From 604edea6a68236f9ebe9a446608214304ac936b8 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Thu, 17 Sep 2020 18:26:27 +0100 Subject: [PATCH 50/82] Update DynamicHlsController.cs Removed container fields --- .../Controllers/DynamicHlsController.cs | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/Jellyfin.Api/Controllers/DynamicHlsController.cs b/Jellyfin.Api/Controllers/DynamicHlsController.cs index 670b41611b..31e09a7e26 100644 --- a/Jellyfin.Api/Controllers/DynamicHlsController.cs +++ b/Jellyfin.Api/Controllers/DynamicHlsController.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Diagnostics.CodeAnalysis; @@ -113,7 +113,6 @@ namespace Jellyfin.Api.Controllers /// Gets a video hls playlist stream. /// /// The item id. - /// The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. /// Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. /// The streaming parameters. /// The tag. @@ -170,7 +169,6 @@ namespace Jellyfin.Api.Controllers [ProducesPlaylistFile] public async Task GetMasterHlsVideoPlaylist( [FromRoute, Required] Guid itemId, - [FromRoute, Required] string container, [FromQuery] bool? @static, [FromQuery] string? @params, [FromQuery] string? tag, @@ -223,7 +221,6 @@ namespace Jellyfin.Api.Controllers var streamingRequest = new HlsVideoRequestDto { Id = itemId, - Container = container, Static = @static ?? true, Params = @params, Tag = tag, @@ -281,7 +278,6 @@ namespace Jellyfin.Api.Controllers /// Gets an audio hls playlist stream. /// /// The item id. - /// The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. /// Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. /// The streaming parameters. /// The tag. @@ -338,7 +334,6 @@ namespace Jellyfin.Api.Controllers [ProducesPlaylistFile] public async Task GetMasterHlsAudioPlaylist( [FromRoute, Required] Guid itemId, - [FromQuery, Required] string container, [FromQuery] bool? @static, [FromQuery] string? @params, [FromQuery] string? tag, @@ -391,7 +386,6 @@ namespace Jellyfin.Api.Controllers var streamingRequest = new HlsAudioRequestDto { Id = itemId, - Container = container, Static = @static ?? true, Params = @params, Tag = tag, @@ -449,7 +443,6 @@ namespace Jellyfin.Api.Controllers /// Gets a video stream using HTTP live streaming. /// /// The item id. - /// The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. /// Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. /// The streaming parameters. /// The tag. @@ -504,7 +497,6 @@ namespace Jellyfin.Api.Controllers [ProducesPlaylistFile] public async Task GetVariantHlsVideoPlaylist( [FromRoute, Required] Guid itemId, - [FromQuery, Required] string container, [FromQuery] bool? @static, [FromQuery] string? @params, [FromQuery] string? tag, @@ -557,7 +549,6 @@ namespace Jellyfin.Api.Controllers var streamingRequest = new VideoRequestDto { Id = itemId, - Container = container, Static = @static ?? true, Params = @params, Tag = tag, @@ -615,7 +606,6 @@ namespace Jellyfin.Api.Controllers /// Gets an audio stream using HTTP live streaming. /// /// The item id. - /// The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. /// Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. /// The streaming parameters. /// The tag. @@ -670,7 +660,6 @@ namespace Jellyfin.Api.Controllers [ProducesPlaylistFile] public async Task GetVariantHlsAudioPlaylist( [FromRoute, Required] Guid itemId, - [FromQuery, Required] string container, [FromQuery] bool? @static, [FromQuery] string? @params, [FromQuery] string? tag, @@ -723,7 +712,6 @@ namespace Jellyfin.Api.Controllers var streamingRequest = new StreamingRequestDto { Id = itemId, - Container = container, Static = @static ?? true, Params = @params, Tag = tag, @@ -841,7 +829,7 @@ namespace Jellyfin.Api.Controllers [FromRoute, Required] Guid itemId, [FromRoute, Required] string playlistId, [FromRoute, Required] int segmentId, - [FromRoute, Required] string container, + [FromRoute] string container, [FromQuery] bool? @static, [FromQuery] string? @params, [FromQuery] string? tag, @@ -1011,7 +999,7 @@ namespace Jellyfin.Api.Controllers [FromRoute, Required] Guid itemId, [FromRoute, Required] string playlistId, [FromRoute, Required] int segmentId, - [FromRoute, Required] string container, + [FromRoute] string container, [FromQuery] bool? @static, [FromQuery] string? @params, [FromQuery] string? tag, From 8738fe570a54d367f3c13255ba18b21b12ac47ac Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Thu, 17 Sep 2020 18:27:07 +0100 Subject: [PATCH 51/82] Update SessionController.cs --- Jellyfin.Api/Controllers/SessionController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs index 9820ded444..e2e95182e2 100644 --- a/Jellyfin.Api/Controllers/SessionController.cs +++ b/Jellyfin.Api/Controllers/SessionController.cs @@ -166,7 +166,7 @@ namespace Jellyfin.Api.Controllers { var playRequest = new PlayRequest { - ItemIds = itemIds, + ItemIds = new [] { itemIds }, StartPositionTicks = startPositionTicks, PlayCommand = command }; From d428ca55cd09efa757b38a5f749cedb42eca10a9 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Thu, 17 Sep 2020 18:41:12 +0100 Subject: [PATCH 52/82] Update DynamicHlsController.cs --- Jellyfin.Api/Controllers/DynamicHlsController.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Jellyfin.Api/Controllers/DynamicHlsController.cs b/Jellyfin.Api/Controllers/DynamicHlsController.cs index 31e09a7e26..0ce9bed652 100644 --- a/Jellyfin.Api/Controllers/DynamicHlsController.cs +++ b/Jellyfin.Api/Controllers/DynamicHlsController.cs @@ -278,6 +278,7 @@ namespace Jellyfin.Api.Controllers /// Gets an audio hls playlist stream. /// /// The item id. + /// The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. /// Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. /// The streaming parameters. /// The tag. @@ -334,6 +335,7 @@ namespace Jellyfin.Api.Controllers [ProducesPlaylistFile] public async Task GetMasterHlsAudioPlaylist( [FromRoute, Required] Guid itemId, + [FromQuery, Required] string container, [FromQuery] bool? @static, [FromQuery] string? @params, [FromQuery] string? tag, @@ -386,6 +388,7 @@ namespace Jellyfin.Api.Controllers var streamingRequest = new HlsAudioRequestDto { Id = itemId, + Container = container, Static = @static ?? true, Params = @params, Tag = tag, @@ -443,6 +446,7 @@ namespace Jellyfin.Api.Controllers /// Gets a video stream using HTTP live streaming. /// /// The item id. + /// The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. /// Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. /// The streaming parameters. /// The tag. @@ -497,6 +501,7 @@ namespace Jellyfin.Api.Controllers [ProducesPlaylistFile] public async Task GetVariantHlsVideoPlaylist( [FromRoute, Required] Guid itemId, + [FromQuery, Required] string container, [FromQuery] bool? @static, [FromQuery] string? @params, [FromQuery] string? tag, @@ -549,6 +554,7 @@ namespace Jellyfin.Api.Controllers var streamingRequest = new VideoRequestDto { Id = itemId, + Container = container, Static = @static ?? true, Params = @params, Tag = tag, @@ -606,6 +612,7 @@ namespace Jellyfin.Api.Controllers /// Gets an audio stream using HTTP live streaming. /// /// The item id. + /// The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. /// Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. /// The streaming parameters. /// The tag. @@ -660,6 +667,7 @@ namespace Jellyfin.Api.Controllers [ProducesPlaylistFile] public async Task GetVariantHlsAudioPlaylist( [FromRoute, Required] Guid itemId, + [FromQuery, Required] string container, [FromQuery] bool? @static, [FromQuery] string? @params, [FromQuery] string? tag, @@ -712,6 +720,7 @@ namespace Jellyfin.Api.Controllers var streamingRequest = new StreamingRequestDto { Id = itemId, + Container = container, Static = @static ?? true, Params = @params, Tag = tag, From ea7b3699c208ab542e4fc157acad2e9519891654 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Thu, 17 Sep 2020 18:47:36 +0100 Subject: [PATCH 53/82] Update SessionController.cs removed space --- Jellyfin.Api/Controllers/SessionController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs index e2e95182e2..6ae645e8fe 100644 --- a/Jellyfin.Api/Controllers/SessionController.cs +++ b/Jellyfin.Api/Controllers/SessionController.cs @@ -166,7 +166,7 @@ namespace Jellyfin.Api.Controllers { var playRequest = new PlayRequest { - ItemIds = new [] { itemIds }, + ItemIds = new[] { itemIds }, StartPositionTicks = startPositionTicks, PlayCommand = command }; From 226e517f1174bdf150057202176c166676c12f90 Mon Sep 17 00:00:00 2001 From: MrTimscampi Date: Fri, 18 Sep 2020 10:02:15 +0200 Subject: [PATCH 54/82] Update SkiaSharp.NativeAssets.Linux to 2.80.2 --- Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj b/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj index 6b378034a5..f86b142449 100644 --- a/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj +++ b/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj @@ -21,7 +21,7 @@ - + From f363d8afd59ed84d5f199a320776659853c83915 Mon Sep 17 00:00:00 2001 From: hoanghuy309 <71051936+hoanghuy309@users.noreply.github.com> Date: Fri, 18 Sep 2020 22:31:09 +0700 Subject: [PATCH 55/82] Update LocalizationManager.cs --- Emby.Server.Implementations/Localization/LocalizationManager.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Emby.Server.Implementations/Localization/LocalizationManager.cs b/Emby.Server.Implementations/Localization/LocalizationManager.cs index 90e2766b84..30aaf3a058 100644 --- a/Emby.Server.Implementations/Localization/LocalizationManager.cs +++ b/Emby.Server.Implementations/Localization/LocalizationManager.cs @@ -413,6 +413,7 @@ namespace Emby.Server.Implementations.Localization yield return new LocalizationOption("Swedish", "sv"); yield return new LocalizationOption("Swiss German", "gsw"); yield return new LocalizationOption("Turkish", "tr"); + yield return new LocalizationOption("Tiếng Việt", "vi"); } } } From 675fcab4514df6853c560f9c567e78d0e9c52fa8 Mon Sep 17 00:00:00 2001 From: hoanghuy309 Date: Sat, 19 Sep 2020 07:00:32 +0000 Subject: [PATCH 56/82] Translated using Weblate (Vietnamese) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/vi/ --- Emby.Server.Implementations/Localization/Core/vi.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Emby.Server.Implementations/Localization/Core/vi.json b/Emby.Server.Implementations/Localization/Core/vi.json index bf4cfe75ca..c3da35acbb 100644 --- a/Emby.Server.Implementations/Localization/Core/vi.json +++ b/Emby.Server.Implementations/Localization/Core/vi.json @@ -29,8 +29,8 @@ "TaskCleanLogs": "Làm sạch nhật ký", "TaskRefreshLibraryDescription": "Quét thư viện phương tiện của bạn để tìm các tệp mới và làm mới thông tin chi tiết.", "TaskRefreshLibrary": "Quét Thư viện Phương tiện", - "TaskRefreshChapterImagesDescription": "Tạo hình thu nhỏ cho các video có chương.", - "TaskRefreshChapterImages": "Trích xuất hình ảnh chương", + "TaskRefreshChapterImagesDescription": "Tạo hình thu nhỏ cho video có cảnh quay.", + "TaskRefreshChapterImages": "Trích Xuất Ảnh Cảnh Quay", "TaskCleanCacheDescription": "Xóa các tệp cache không còn cần thiết của hệ thống.", "TaskCleanCache": "Làm Sạch Thư Mục Cache", "TasksChannelsCategory": "Kênh Internet", @@ -107,7 +107,7 @@ "FailedLoginAttemptWithUserName": "Nỗ lực đăng nhập thất bại từ {0}", "DeviceOnlineWithName": "{0} đã kết nối", "DeviceOfflineWithName": "{0} đã ngắt kết nối", - "ChapterNameValue": "Chương {0}", + "ChapterNameValue": "Cảnh Quay {0}", "Channels": "Các Kênh", "CameraImageUploadedFrom": "Một hình ảnh máy ảnh mới đã được tải lên từ {0}", "Books": "Các Quyển Sách", From dc73d044de83110c28b33000cf0d5d8628f3d99e Mon Sep 17 00:00:00 2001 From: David Date: Sat, 19 Sep 2020 13:58:35 +0200 Subject: [PATCH 57/82] Fix TMDB Season Images --- .../Plugins/Tmdb/TV/TmdbSeasonImageProvider.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonImageProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonImageProvider.cs index e7e2fd05b8..dcc7f87002 100644 --- a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonImageProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonImageProvider.cs @@ -112,9 +112,10 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV private async Task> FetchImages(Season item, string tmdbId, string language, CancellationToken cancellationToken) { - await TmdbSeasonProvider.Current.EnsureSeasonInfo(tmdbId, item.IndexNumber.GetValueOrDefault(), language, cancellationToken).ConfigureAwait(false); + var seasonNumber = item.IndexNumber.GetValueOrDefault(); + await TmdbSeasonProvider.Current.EnsureSeasonInfo(tmdbId, seasonNumber, language, cancellationToken).ConfigureAwait(false); - var path = TmdbSeriesProvider.Current.GetDataFilePath(tmdbId, language); + var path = TmdbSeasonProvider.Current.GetDataFilePath(tmdbId, seasonNumber, language); if (!string.IsNullOrEmpty(path)) { From 4dae7d0521fd0052a87515aefb3e3bd7f2fda3f7 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sat, 19 Sep 2020 13:58:18 +0100 Subject: [PATCH 58/82] Update Jellyfin.Api/Controllers/SessionController.cs Co-authored-by: Claus Vium --- Jellyfin.Api/Controllers/SessionController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs index 6ae645e8fe..9d7f2a502c 100644 --- a/Jellyfin.Api/Controllers/SessionController.cs +++ b/Jellyfin.Api/Controllers/SessionController.cs @@ -166,7 +166,7 @@ namespace Jellyfin.Api.Controllers { var playRequest = new PlayRequest { - ItemIds = new[] { itemIds }, + ItemIds = itemIds.Split(','), StartPositionTicks = startPositionTicks, PlayCommand = command }; From eee977a77ba775babeca61fed54793f9fc6f57dc Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sat, 19 Sep 2020 13:58:39 +0100 Subject: [PATCH 59/82] Update Jellyfin.Api/Controllers/SessionController.cs Co-authored-by: Claus Vium --- Jellyfin.Api/Controllers/SessionController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs index 9d7f2a502c..228d6c8341 100644 --- a/Jellyfin.Api/Controllers/SessionController.cs +++ b/Jellyfin.Api/Controllers/SessionController.cs @@ -161,7 +161,7 @@ namespace Jellyfin.Api.Controllers public ActionResult Play( [FromRoute, Required] string sessionId, [FromRoute, Required] PlayCommand command, - [FromQuery] Guid itemIds, + [FromQuery] string itemIds, [FromQuery] long? startPositionTicks) { var playRequest = new PlayRequest From d8e8d298ea8cff3e1b47e7110d2abd80bd34b981 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sat, 19 Sep 2020 13:58:56 +0100 Subject: [PATCH 60/82] Update Jellyfin.Api/Controllers/SessionController.cs Co-authored-by: Claus Vium --- Jellyfin.Api/Controllers/SessionController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs index 228d6c8341..3aa1642da5 100644 --- a/Jellyfin.Api/Controllers/SessionController.cs +++ b/Jellyfin.Api/Controllers/SessionController.cs @@ -160,7 +160,7 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult Play( [FromRoute, Required] string sessionId, - [FromRoute, Required] PlayCommand command, + [FromQuery, Required] PlayRequest playRequest, [FromQuery] string itemIds, [FromQuery] long? startPositionTicks) { From 50060175b1ad3db835a68d9f109af6c07efeda0b Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sat, 19 Sep 2020 14:53:08 +0100 Subject: [PATCH 61/82] Update DynamicHlsController.cs --- Jellyfin.Api/Controllers/DynamicHlsController.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Jellyfin.Api/Controllers/DynamicHlsController.cs b/Jellyfin.Api/Controllers/DynamicHlsController.cs index 0ce9bed652..31e09a7e26 100644 --- a/Jellyfin.Api/Controllers/DynamicHlsController.cs +++ b/Jellyfin.Api/Controllers/DynamicHlsController.cs @@ -278,7 +278,6 @@ namespace Jellyfin.Api.Controllers /// Gets an audio hls playlist stream. /// /// The item id. - /// The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. /// Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. /// The streaming parameters. /// The tag. @@ -335,7 +334,6 @@ namespace Jellyfin.Api.Controllers [ProducesPlaylistFile] public async Task GetMasterHlsAudioPlaylist( [FromRoute, Required] Guid itemId, - [FromQuery, Required] string container, [FromQuery] bool? @static, [FromQuery] string? @params, [FromQuery] string? tag, @@ -388,7 +386,6 @@ namespace Jellyfin.Api.Controllers var streamingRequest = new HlsAudioRequestDto { Id = itemId, - Container = container, Static = @static ?? true, Params = @params, Tag = tag, @@ -446,7 +443,6 @@ namespace Jellyfin.Api.Controllers /// Gets a video stream using HTTP live streaming. /// /// The item id. - /// The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. /// Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. /// The streaming parameters. /// The tag. @@ -501,7 +497,6 @@ namespace Jellyfin.Api.Controllers [ProducesPlaylistFile] public async Task GetVariantHlsVideoPlaylist( [FromRoute, Required] Guid itemId, - [FromQuery, Required] string container, [FromQuery] bool? @static, [FromQuery] string? @params, [FromQuery] string? tag, @@ -554,7 +549,6 @@ namespace Jellyfin.Api.Controllers var streamingRequest = new VideoRequestDto { Id = itemId, - Container = container, Static = @static ?? true, Params = @params, Tag = tag, @@ -612,7 +606,6 @@ namespace Jellyfin.Api.Controllers /// Gets an audio stream using HTTP live streaming. /// /// The item id. - /// The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. /// Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. /// The streaming parameters. /// The tag. @@ -667,7 +660,6 @@ namespace Jellyfin.Api.Controllers [ProducesPlaylistFile] public async Task GetVariantHlsAudioPlaylist( [FromRoute, Required] Guid itemId, - [FromQuery, Required] string container, [FromQuery] bool? @static, [FromQuery] string? @params, [FromQuery] string? tag, @@ -720,7 +712,6 @@ namespace Jellyfin.Api.Controllers var streamingRequest = new StreamingRequestDto { Id = itemId, - Container = container, Static = @static ?? true, Params = @params, Tag = tag, From 7050525f6b70d9725cb76a6954004a3979e4bfda Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sat, 19 Sep 2020 15:01:34 +0100 Subject: [PATCH 62/82] Update SessionController.cs --- Jellyfin.Api/Controllers/SessionController.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs index 3aa1642da5..a1ec391129 100644 --- a/Jellyfin.Api/Controllers/SessionController.cs +++ b/Jellyfin.Api/Controllers/SessionController.cs @@ -1,4 +1,4 @@ -#pragma warning disable CA1801 +#pragma warning disable CA1801 using System; using System.Collections.Generic; @@ -150,7 +150,7 @@ namespace Jellyfin.Api.Controllers /// Instructs a session to play an item. /// /// The session id. - /// The type of play command to issue (PlayNow, PlayNext, PlayLast). Clients who have not yet implemented play next and play last may play now. + /// The type of play command to issue (PlayNow, PlayNext, PlayLast). Clients who have not yet implemented play next and play last may play now. /// The ids of the items to play, comma delimited. /// The starting position of the first item. /// Instruction sent to session. @@ -160,15 +160,15 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult Play( [FromRoute, Required] string sessionId, - [FromQuery, Required] PlayRequest playRequest, - [FromQuery] string itemIds, + [FromQuery, Required] PlayCommand playCommand, + [FromQuery] Guid itemIds, [FromQuery] long? startPositionTicks) { var playRequest = new PlayRequest { - ItemIds = itemIds.Split(','), + ItemIds = new[] { itemIds }, StartPositionTicks = startPositionTicks, - PlayCommand = command + PlayCommand = playCommand }; _sessionManager.SendPlayCommand( @@ -184,6 +184,7 @@ namespace Jellyfin.Api.Controllers /// Issues a playstate command to a client. /// /// The session id. + /// The . /// The . /// Playstate command sent to session. /// A . @@ -192,7 +193,8 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SendPlaystateCommand( [FromRoute, Required] string sessionId, - [FromBody] PlaystateRequest playstateRequest) + [FromRoute, Required] PlayCommand command, + [FromQuery] PlaystateRequest playstateRequest) { _sessionManager.SendPlaystateCommand( RequestHelpers.GetSession(_sessionManager, _authContext, Request).Id, From 701d54260d44d7750ddc757f9957a9f0bdee781b Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sat, 19 Sep 2020 15:46:47 +0100 Subject: [PATCH 63/82] Update SessionController.cs --- Jellyfin.Api/Controllers/SessionController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs index a1ec391129..1d7dc7c8ae 100644 --- a/Jellyfin.Api/Controllers/SessionController.cs +++ b/Jellyfin.Api/Controllers/SessionController.cs @@ -161,12 +161,12 @@ namespace Jellyfin.Api.Controllers public ActionResult Play( [FromRoute, Required] string sessionId, [FromQuery, Required] PlayCommand playCommand, - [FromQuery] Guid itemIds, + [FromQuery, Required] string itemIds, [FromQuery] long? startPositionTicks) { var playRequest = new PlayRequest { - ItemIds = new[] { itemIds }, + ItemIds = itemIds.Split(',').Select(p => Guid.Parse(p)).ToArray(), StartPositionTicks = startPositionTicks, PlayCommand = playCommand }; From 5464eaed4ae0e1927883fce89d02ed2b6e60a745 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sat, 19 Sep 2020 16:40:39 +0100 Subject: [PATCH 64/82] Update EncoderValidator.cs --- MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs index c8bf5557b0..3287f9814e 100644 --- a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs +++ b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs @@ -212,7 +212,10 @@ namespace MediaBrowser.MediaEncoding.Encoder if (match.Success) { - return new Version(match.Groups[1].Value); + if (Version.TryParse(match.Groups[1].Value, out var result)) + { + return result; + } } var versionMap = GetFFmpegLibraryVersions(output); From bbf196c7bd1f7a32d5410e790b8d8752d34cd339 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sat, 19 Sep 2020 16:44:35 +0100 Subject: [PATCH 65/82] Update TranscodingJobHelper.cs --- Jellyfin.Api/Helpers/TranscodingJobHelper.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs index 67e4503729..64d1227f7c 100644 --- a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs +++ b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs @@ -504,6 +504,11 @@ namespace Jellyfin.Api.Helpers } } + if (string.IsNullOrEmpty(_mediaEncoder.EncoderPath)) + { + throw new ArgumentException("FFMPEG path not set."); + } + var process = new Process { StartInfo = new ProcessStartInfo From 484cd887664132096d3c7fb2263485c297e73adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Fernandez=20Pr=C3=ADncipe?= Date: Sat, 19 Sep 2020 12:24:21 +0000 Subject: [PATCH 66/82] Translated using Weblate (Galician) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/gl/ --- Emby.Server.Implementations/Localization/Core/gl.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Localization/Core/gl.json b/Emby.Server.Implementations/Localization/Core/gl.json index 94034962df..faee2519a1 100644 --- a/Emby.Server.Implementations/Localization/Core/gl.json +++ b/Emby.Server.Implementations/Localization/Core/gl.json @@ -1,3 +1,11 @@ { - "Albums": "Álbumes" + "Albums": "Álbumes", + "Collections": "Colecións", + "ChapterNameValue": "Capítulos {0}", + "Channels": "Canles", + "CameraImageUploadedFrom": "Cargouse unha nova imaxe da cámara desde {0}", + "Books": "Libros", + "AuthenticationSucceededWithUserName": "{0} autenticouse correctamente", + "Artists": "Artistas", + "Application": "Aplicativo" } From d39b70de324316ff1f48e2795aca45db3488ff0d Mon Sep 17 00:00:00 2001 From: jeremletrol81 Date: Sun, 20 Sep 2020 10:50:50 +0000 Subject: [PATCH 67/82] Translated using Weblate (French) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/fr/ --- Emby.Server.Implementations/Localization/Core/fr.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Localization/Core/fr.json b/Emby.Server.Implementations/Localization/Core/fr.json index 47ebe12540..7fc9968219 100644 --- a/Emby.Server.Implementations/Localization/Core/fr.json +++ b/Emby.Server.Implementations/Localization/Core/fr.json @@ -107,7 +107,7 @@ "TaskCleanLogsDescription": "Supprime les journaux de plus de {0} jours.", "TaskCleanLogs": "Nettoyer le répertoire des journaux", "TaskRefreshLibraryDescription": "Scanne toute les bibliothèques pour trouver les nouveaux fichiers et rafraîchit les métadonnées.", - "TaskRefreshLibrary": "Scanner toute les Bibliothèques", + "TaskRefreshLibrary": "Scanner toutes les Bibliothèques", "TaskRefreshChapterImagesDescription": "Crée des images de miniature pour les vidéos ayant des chapitres.", "TaskRefreshChapterImages": "Extraire les images de chapitre", "TaskCleanCacheDescription": "Supprime les fichiers de cache dont le système n'a plus besoin.", From 9cb37ae9c217146d94949a31df86ec3c85687ad8 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sun, 20 Sep 2020 12:44:10 +0100 Subject: [PATCH 68/82] Update Jellyfin.Api/Controllers/SessionController.cs Co-authored-by: Cody Robibero --- Jellyfin.Api/Controllers/SessionController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs index 1d7dc7c8ae..3720e821f7 100644 --- a/Jellyfin.Api/Controllers/SessionController.cs +++ b/Jellyfin.Api/Controllers/SessionController.cs @@ -166,7 +166,7 @@ namespace Jellyfin.Api.Controllers { var playRequest = new PlayRequest { - ItemIds = itemIds.Split(',').Select(p => Guid.Parse(p)).ToArray(), + ItemIds = RequestHelpers.GetGuids(itemIds), StartPositionTicks = startPositionTicks, PlayCommand = playCommand }; From 228b33a23bfe21c3601933ad3168a2e590f4f430 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Sun, 20 Sep 2020 14:02:41 +0200 Subject: [PATCH 69/82] Minor improvements --- .../AudioBook/AudioBookFilePathParser.cs | 9 ++---- .../AudioBookFilePathParserResult.cs | 3 +- .../Extensions/StringExtensions.cs | 6 +--- .../Library/NameExtensions.cs | 3 +- .../AudioBook/AudioBookFileInfoTests.cs | 30 +++++++++++++++++++ .../Jellyfin.Naming.Tests/Video/ExtraTests.cs | 16 +++++----- .../Library/PathExtensionsTests.cs | 1 + 7 files changed, 46 insertions(+), 22 deletions(-) create mode 100644 tests/Jellyfin.Naming.Tests/AudioBook/AudioBookFileInfoTests.cs diff --git a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs index eb9393b0bd..14edd64926 100644 --- a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs +++ b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs @@ -1,6 +1,6 @@ +#nullable enable #pragma warning disable CS1591 -using System; using System.Globalization; using System.IO; using System.Text.RegularExpressions; @@ -19,12 +19,7 @@ namespace Emby.Naming.AudioBook public AudioBookFilePathParserResult Parse(string path) { - if (path == null) - { - throw new ArgumentNullException(nameof(path)); - } - - var result = new AudioBookFilePathParserResult(); + AudioBookFilePathParserResult result = default; var fileName = Path.GetFileNameWithoutExtension(path); foreach (var expression in _options.AudioBookPartsExpressions) { diff --git a/Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs b/Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs index e28a58db78..7bfc4479d2 100644 --- a/Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs +++ b/Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs @@ -1,8 +1,9 @@ +#nullable enable #pragma warning disable CS1591 namespace Emby.Naming.AudioBook { - public class AudioBookFilePathParserResult + public struct AudioBookFilePathParserResult { public int? PartNumber { get; set; } diff --git a/MediaBrowser.Controller/Extensions/StringExtensions.cs b/MediaBrowser.Controller/Extensions/StringExtensions.cs index 3cc1f328a9..182c8ef658 100644 --- a/MediaBrowser.Controller/Extensions/StringExtensions.cs +++ b/MediaBrowser.Controller/Extensions/StringExtensions.cs @@ -1,3 +1,4 @@ +#nullable enable #pragma warning disable CS1591 using System; @@ -15,11 +16,6 @@ namespace MediaBrowser.Controller.Extensions { public static string RemoveDiacritics(this string text) { - if (text == null) - { - throw new ArgumentNullException(nameof(text)); - } - var chars = Normalize(text, NormalizationForm.FormD) .Where(ch => CharUnicodeInfo.GetUnicodeCategory(ch) != UnicodeCategory.NonSpacingMark); diff --git a/MediaBrowser.Controller/Library/NameExtensions.cs b/MediaBrowser.Controller/Library/NameExtensions.cs index 21f33ad190..1c90bb4e02 100644 --- a/MediaBrowser.Controller/Library/NameExtensions.cs +++ b/MediaBrowser.Controller/Library/NameExtensions.cs @@ -1,3 +1,4 @@ +#nullable enable #pragma warning disable CS1591 using System; @@ -9,7 +10,7 @@ namespace MediaBrowser.Controller.Library { public static class NameExtensions { - private static string RemoveDiacritics(string name) + private static string RemoveDiacritics(string? name) { if (name == null) { diff --git a/tests/Jellyfin.Naming.Tests/AudioBook/AudioBookFileInfoTests.cs b/tests/Jellyfin.Naming.Tests/AudioBook/AudioBookFileInfoTests.cs new file mode 100644 index 0000000000..a214bc57c4 --- /dev/null +++ b/tests/Jellyfin.Naming.Tests/AudioBook/AudioBookFileInfoTests.cs @@ -0,0 +1,30 @@ +using Emby.Naming.AudioBook; +using Xunit; + +namespace Jellyfin.Naming.Tests.AudioBook +{ + public class AudioBookFileInfoTests + { + [Fact] + public void CompareTo_Same_Success() + { + var info = new AudioBookFileInfo(); + Assert.Equal(0, info.CompareTo(info)); + } + + [Fact] + public void CompareTo_Null_Success() + { + var info = new AudioBookFileInfo(); + Assert.Equal(1, info.CompareTo(null)); + } + + [Fact] + public void CompareTo_Empty_Success() + { + var info1 = new AudioBookFileInfo(); + var info2 = new AudioBookFileInfo(); + Assert.Equal(0, info1.CompareTo(info2)); + } + } +} diff --git a/tests/Jellyfin.Naming.Tests/Video/ExtraTests.cs b/tests/Jellyfin.Naming.Tests/Video/ExtraTests.cs index a2722a1753..8dfb8f8591 100644 --- a/tests/Jellyfin.Naming.Tests/Video/ExtraTests.cs +++ b/tests/Jellyfin.Naming.Tests/Video/ExtraTests.cs @@ -44,14 +44,14 @@ namespace Jellyfin.Naming.Tests.Video } [Theory] - [InlineData(ExtraType.BehindTheScenes, "behind the scenes" )] - [InlineData(ExtraType.DeletedScene, "deleted scenes" )] - [InlineData(ExtraType.Interview, "interviews" )] - [InlineData(ExtraType.Scene, "scenes" )] - [InlineData(ExtraType.Sample, "samples" )] - [InlineData(ExtraType.Clip, "shorts" )] - [InlineData(ExtraType.Clip, "featurettes" )] - [InlineData(ExtraType.Unknown, "extras" )] + [InlineData(ExtraType.BehindTheScenes, "behind the scenes")] + [InlineData(ExtraType.DeletedScene, "deleted scenes")] + [InlineData(ExtraType.Interview, "interviews")] + [InlineData(ExtraType.Scene, "scenes")] + [InlineData(ExtraType.Sample, "samples")] + [InlineData(ExtraType.Clip, "shorts")] + [InlineData(ExtraType.Clip, "featurettes")] + [InlineData(ExtraType.Unknown, "extras")] public void TestDirectories(ExtraType type, string dirName) { Test(dirName + "/300.mp4", type, _videoOptions); diff --git a/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs b/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs index c771f5f4ae..6d768af890 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs @@ -10,6 +10,7 @@ namespace Jellyfin.Server.Implementations.Tests.Library [InlineData("Superman: Red Son [imdbid=tt10985510]", "imdbid", "tt10985510")] [InlineData("Superman: Red Son - tt10985510", "imdbid", "tt10985510")] [InlineData("Superman: Red Son", "imdbid", null)] + [InlineData("Superman: Red Son", "something", null)] public void GetAttributeValue_ValidArgs_Correct(string input, string attribute, string? expectedResult) { Assert.Equal(expectedResult, PathExtensions.GetAttributeValue(input, attribute)); From d6f01d6503c2846dade8314a3d8d624140b03f8e Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sun, 20 Sep 2020 14:35:46 +0100 Subject: [PATCH 70/82] Update DynamicHlsController.cs --- Jellyfin.Api/Controllers/DynamicHlsController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Api/Controllers/DynamicHlsController.cs b/Jellyfin.Api/Controllers/DynamicHlsController.cs index 31e09a7e26..7cf96dd341 100644 --- a/Jellyfin.Api/Controllers/DynamicHlsController.cs +++ b/Jellyfin.Api/Controllers/DynamicHlsController.cs @@ -1453,7 +1453,7 @@ namespace Jellyfin.Api.Controllers var args = "-codec:v:0 " + codec; - // if (state.EnableMpegtsM2TsMode) + // if (state.EnableMpegtsM2TsMode) // { // args += " -mpegts_m2ts_mode 1"; // } From f71812abc07bfe3784c4779d6e4fa8d87be7aa94 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sun, 20 Sep 2020 14:36:46 +0100 Subject: [PATCH 71/82] Update SessionController.cs --- Jellyfin.Api/Controllers/SessionController.cs | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs index 3720e821f7..a7bddc1715 100644 --- a/Jellyfin.Api/Controllers/SessionController.cs +++ b/Jellyfin.Api/Controllers/SessionController.cs @@ -1,5 +1,3 @@ -#pragma warning disable CA1801 - using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; @@ -184,8 +182,9 @@ namespace Jellyfin.Api.Controllers /// Issues a playstate command to a client. /// /// The session id. - /// The . - /// The . + /// The . + /// The optional position ticks. + /// The optional controlling user id. /// Playstate command sent to session. /// A . [HttpPost("Sessions/{sessionId}/Playing/{command}")] @@ -193,13 +192,19 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SendPlaystateCommand( [FromRoute, Required] string sessionId, - [FromRoute, Required] PlayCommand command, - [FromQuery] PlaystateRequest playstateRequest) + [FromRoute, Required] PlaystateCommand command, + [FromQuery] long? seekPositionTicks, + [FromQuery] string? controllingUserId) { _sessionManager.SendPlaystateCommand( RequestHelpers.GetSession(_sessionManager, _authContext, Request).Id, sessionId, - playstateRequest, + new PlaystateRequest() + { + Command = command, + ControllingUserId = controllingUserId, + SeekPositionTicks = seekPositionTicks, + }, CancellationToken.None); return NoContent(); @@ -436,9 +441,9 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult ReportViewing( [FromQuery] string? sessionId, - [FromQuery] string? itemId) + [FromQuery, Required] string? itemId) { - string session = RequestHelpers.GetSession(_sessionManager, _authContext, Request).Id; + string session = sessionId ?? RequestHelpers.GetSession(_sessionManager, _authContext, Request).Id; _sessionManager.ReportNowViewingItem(session, itemId); return NoContent(); From 983aa05e76a7045289e9a7fb3e0c5a3c90ef8365 Mon Sep 17 00:00:00 2001 From: josteinh Date: Mon, 21 Sep 2020 08:07:42 +0000 Subject: [PATCH 72/82] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegian?= =?UTF-8?q?=20Bokm=C3=A5l)=20Translation:=20Jellyfin/Jellyfin=20Translate-?= =?UTF-8?q?URL:=20https://translate.jellyfin.org/projects/jellyfin/jellyfi?= =?UTF-8?q?n-core/nb=5FNO/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Emby.Server.Implementations/Localization/Core/nb.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Localization/Core/nb.json b/Emby.Server.Implementations/Localization/Core/nb.json index a97c2e17ad..07a5991211 100644 --- a/Emby.Server.Implementations/Localization/Core/nb.json +++ b/Emby.Server.Implementations/Localization/Core/nb.json @@ -50,7 +50,7 @@ "NotificationOptionAudioPlayback": "Lydavspilling startet", "NotificationOptionAudioPlaybackStopped": "Lydavspilling stoppet", "NotificationOptionCameraImageUploaded": "Kamerabilde lastet opp", - "NotificationOptionInstallationFailed": "Installasjonsfeil", + "NotificationOptionInstallationFailed": "Installasjonen feilet", "NotificationOptionNewLibraryContent": "Nytt innhold lagt til", "NotificationOptionPluginError": "Pluginfeil", "NotificationOptionPluginInstalled": "Plugin installert", From 1f2e227610cd2eaf9abd38ee5b2310ed3e878421 Mon Sep 17 00:00:00 2001 From: hoanghuy309 Date: Mon, 21 Sep 2020 10:19:32 +0000 Subject: [PATCH 73/82] Translated using Weblate (Vietnamese) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/vi/ --- Emby.Server.Implementations/Localization/Core/vi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Localization/Core/vi.json b/Emby.Server.Implementations/Localization/Core/vi.json index c3da35acbb..c9201a4a60 100644 --- a/Emby.Server.Implementations/Localization/Core/vi.json +++ b/Emby.Server.Implementations/Localization/Core/vi.json @@ -1,6 +1,6 @@ { "Collections": "Bộ Sưu Tập", - "Favorites": "Sở Thích", + "Favorites": "Yêu Thích", "Folders": "Thư Mục", "Genres": "Thể Loại", "HeaderAlbumArtists": "Bộ Sưu Tập Nghệ sĩ", From 849835b486755c5e8f0ae0fb563937b3c532aece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9E=A5=EA=B1=B4?= Date: Mon, 21 Sep 2020 11:10:24 +0000 Subject: [PATCH 74/82] Translated using Weblate (Korean) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ko/ --- Emby.Server.Implementations/Localization/Core/ko.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/Localization/Core/ko.json b/Emby.Server.Implementations/Localization/Core/ko.json index 9e3ecd5a8e..a33953c273 100644 --- a/Emby.Server.Implementations/Localization/Core/ko.json +++ b/Emby.Server.Implementations/Localization/Core/ko.json @@ -84,8 +84,8 @@ "UserDeletedWithName": "사용자 {0} 삭제됨", "UserDownloadingItemWithValues": "{0}이(가) {1}을 다운로드 중입니다", "UserLockedOutWithName": "유저 {0} 은(는) 잠금처리 되었습니다", - "UserOfflineFromDevice": "{1}로부터 {0}의 연결이 끊겼습니다", - "UserOnlineFromDevice": "{0}은 {1}에서 온라인 상태입니다", + "UserOfflineFromDevice": "{1}에서 {0}의 연결이 끊킴", + "UserOnlineFromDevice": "{0}이 {1}으로 접속", "UserPasswordChangedWithName": "사용자 {0}의 비밀번호가 변경되었습니다", "UserPolicyUpdatedWithName": "{0}의 사용자 정책이 업데이트되었습니다", "UserStartedPlayingItemWithValues": "{2}에서 {0}이 {1} 재생 중", From 7da03d67a74f37734bf26e1b3dbe5a8672c328f9 Mon Sep 17 00:00:00 2001 From: hoanghuy309 Date: Mon, 21 Sep 2020 10:49:03 +0000 Subject: [PATCH 75/82] Translated using Weblate (Vietnamese) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/vi/ --- Emby.Server.Implementations/Localization/Core/vi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Localization/Core/vi.json b/Emby.Server.Implementations/Localization/Core/vi.json index c9201a4a60..57fe6c7a20 100644 --- a/Emby.Server.Implementations/Localization/Core/vi.json +++ b/Emby.Server.Implementations/Localization/Core/vi.json @@ -8,7 +8,7 @@ "HeaderLiveTV": "TV Trực Tiếp", "Movies": "Phim", "Photos": "Ảnh", - "Playlists": "Danh Sách Chơi", + "Playlists": "Danh sách phát", "Shows": "Các Chương Trình", "Songs": "Các Bài Hát", "Sync": "Đồng Bộ", From 3459655bb401595f62c21513964876b2f4549fed Mon Sep 17 00:00:00 2001 From: Niels van Velzen Date: Mon, 21 Sep 2020 16:53:00 +0200 Subject: [PATCH 76/82] Use GeneralCommandType enum in GeneralCommand name --- CONTRIBUTORS.md | 1 + Emby.Dlna/PlayTo/PlayToController.cs | 87 +++++++++---------- .../Session/SessionManager.cs | 4 +- Jellyfin.Api/Controllers/SessionController.cs | 14 +-- MediaBrowser.Model/Session/GeneralCommand.cs | 2 +- 5 files changed, 54 insertions(+), 54 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index f1fe65064b..efd83012e9 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -135,6 +135,7 @@ - [YouKnowBlom](https://github.com/YouKnowBlom) - [KristupasSavickas](https://github.com/KristupasSavickas) - [Pusta](https://github.com/pusta) + - [nielsvanvelzen](https://github.com/nielsvanvelzen) # Emby Contributors diff --git a/Emby.Dlna/PlayTo/PlayToController.cs b/Emby.Dlna/PlayTo/PlayToController.cs index 328759c5bc..460ac2d8d1 100644 --- a/Emby.Dlna/PlayTo/PlayToController.cs +++ b/Emby.Dlna/PlayTo/PlayToController.cs @@ -669,62 +669,57 @@ namespace Emby.Dlna.PlayTo private Task SendGeneralCommand(GeneralCommand command, CancellationToken cancellationToken) { - if (Enum.TryParse(command.Name, true, out GeneralCommandType commandType)) - { - switch (commandType) - { - case GeneralCommandType.VolumeDown: - return _device.VolumeDown(cancellationToken); - case GeneralCommandType.VolumeUp: - return _device.VolumeUp(cancellationToken); - case GeneralCommandType.Mute: - return _device.Mute(cancellationToken); - case GeneralCommandType.Unmute: - return _device.Unmute(cancellationToken); - case GeneralCommandType.ToggleMute: - return _device.ToggleMute(cancellationToken); - case GeneralCommandType.SetAudioStreamIndex: - if (command.Arguments.TryGetValue("Index", out string index)) + switch (command.Name) + { + case GeneralCommandType.VolumeDown: + return _device.VolumeDown(cancellationToken); + case GeneralCommandType.VolumeUp: + return _device.VolumeUp(cancellationToken); + case GeneralCommandType.Mute: + return _device.Mute(cancellationToken); + case GeneralCommandType.Unmute: + return _device.Unmute(cancellationToken); + case GeneralCommandType.ToggleMute: + return _device.ToggleMute(cancellationToken); + case GeneralCommandType.SetAudioStreamIndex: + if (command.Arguments.TryGetValue("Index", out string index)) + { + if (int.TryParse(index, NumberStyles.Integer, _usCulture, out var val)) { - if (int.TryParse(index, NumberStyles.Integer, _usCulture, out var val)) - { - return SetAudioStreamIndex(val); - } - - throw new ArgumentException("Unsupported SetAudioStreamIndex value supplied."); + return SetAudioStreamIndex(val); } - throw new ArgumentException("SetAudioStreamIndex argument cannot be null"); - case GeneralCommandType.SetSubtitleStreamIndex: - if (command.Arguments.TryGetValue("Index", out index)) - { - if (int.TryParse(index, NumberStyles.Integer, _usCulture, out var val)) - { - return SetSubtitleStreamIndex(val); - } + throw new ArgumentException("Unsupported SetAudioStreamIndex value supplied."); + } - throw new ArgumentException("Unsupported SetSubtitleStreamIndex value supplied."); + throw new ArgumentException("SetAudioStreamIndex argument cannot be null"); + case GeneralCommandType.SetSubtitleStreamIndex: + if (command.Arguments.TryGetValue("Index", out index)) + { + if (int.TryParse(index, NumberStyles.Integer, _usCulture, out var val)) + { + return SetSubtitleStreamIndex(val); } - throw new ArgumentException("SetSubtitleStreamIndex argument cannot be null"); - case GeneralCommandType.SetVolume: - if (command.Arguments.TryGetValue("Volume", out string vol)) - { - if (int.TryParse(vol, NumberStyles.Integer, _usCulture, out var volume)) - { - return _device.SetVolume(volume, cancellationToken); - } + throw new ArgumentException("Unsupported SetSubtitleStreamIndex value supplied."); + } - throw new ArgumentException("Unsupported volume value supplied."); + throw new ArgumentException("SetSubtitleStreamIndex argument cannot be null"); + case GeneralCommandType.SetVolume: + if (command.Arguments.TryGetValue("Volume", out string vol)) + { + if (int.TryParse(vol, NumberStyles.Integer, _usCulture, out var volume)) + { + return _device.SetVolume(volume, cancellationToken); } - throw new ArgumentException("Volume argument cannot be null"); - default: - return Task.CompletedTask; - } - } + throw new ArgumentException("Unsupported volume value supplied."); + } - return Task.CompletedTask; + throw new ArgumentException("Volume argument cannot be null"); + default: + return Task.CompletedTask; + } } private async Task SetAudioStreamIndex(int? newIndex) diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index ca8e0e29bb..e42d478533 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -1037,7 +1037,7 @@ namespace Emby.Server.Implementations.Session var generalCommand = new GeneralCommand { - Name = GeneralCommandType.DisplayMessage.ToString() + Name = GeneralCommandType.DisplayMessage }; generalCommand.Arguments["Header"] = command.Header; @@ -1268,7 +1268,7 @@ namespace Emby.Server.Implementations.Session { var generalCommand = new GeneralCommand { - Name = GeneralCommandType.DisplayContent.ToString(), + Name = GeneralCommandType.DisplayContent, Arguments = { ["ItemId"] = command.ItemId, diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs index b00675d679..5a2a3cdc09 100644 --- a/Jellyfin.Api/Controllers/SessionController.cs +++ b/Jellyfin.Api/Controllers/SessionController.cs @@ -217,16 +217,15 @@ namespace Jellyfin.Api.Controllers [FromRoute, Required] string sessionId, [FromRoute, Required] string command) { - var name = command; - if (Enum.TryParse(name, true, out GeneralCommandType commandType)) + if (!Enum.TryParse(command, true, out GeneralCommandType commandType)) { - name = commandType.ToString(); + return BadRequest(); } var currentSession = RequestHelpers.GetSession(_sessionManager, _authContext, Request); var generalCommand = new GeneralCommand { - Name = name, + Name = commandType, ControllingUserId = currentSession.UserId }; @@ -249,11 +248,16 @@ namespace Jellyfin.Api.Controllers [FromRoute, Required] string sessionId, [FromRoute, Required] string command) { + if (!Enum.TryParse(command, true, out GeneralCommandType commandType)) + { + return BadRequest(); + } + var currentSession = RequestHelpers.GetSession(_sessionManager, _authContext, Request); var generalCommand = new GeneralCommand { - Name = command, + Name = commandType, ControllingUserId = currentSession.UserId }; diff --git a/MediaBrowser.Model/Session/GeneralCommand.cs b/MediaBrowser.Model/Session/GeneralCommand.cs index 9794bd2929..77bb6bcf77 100644 --- a/MediaBrowser.Model/Session/GeneralCommand.cs +++ b/MediaBrowser.Model/Session/GeneralCommand.cs @@ -8,7 +8,7 @@ namespace MediaBrowser.Model.Session { public class GeneralCommand { - public string Name { get; set; } + public GeneralCommandType Name { get; set; } public Guid ControllingUserId { get; set; } From 891c538f818be7a339fcdfacaf34adb4a329d514 Mon Sep 17 00:00:00 2001 From: Niels van Velzen Date: Mon, 21 Sep 2020 17:49:45 +0200 Subject: [PATCH 77/82] Use GeneralCommandType in SessionController parameters --- Jellyfin.Api/Controllers/SessionController.cs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs index 5a2a3cdc09..c257a46dcf 100644 --- a/Jellyfin.Api/Controllers/SessionController.cs +++ b/Jellyfin.Api/Controllers/SessionController.cs @@ -215,17 +215,12 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SendSystemCommand( [FromRoute, Required] string sessionId, - [FromRoute, Required] string command) + [FromRoute, Required] GeneralCommandType command) { - if (!Enum.TryParse(command, true, out GeneralCommandType commandType)) - { - return BadRequest(); - } - var currentSession = RequestHelpers.GetSession(_sessionManager, _authContext, Request); var generalCommand = new GeneralCommand { - Name = commandType, + Name = command, ControllingUserId = currentSession.UserId }; @@ -246,18 +241,13 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SendGeneralCommand( [FromRoute, Required] string sessionId, - [FromRoute, Required] string command) + [FromRoute, Required] GeneralCommandType command) { - if (!Enum.TryParse(command, true, out GeneralCommandType commandType)) - { - return BadRequest(); - } - var currentSession = RequestHelpers.GetSession(_sessionManager, _authContext, Request); var generalCommand = new GeneralCommand { - Name = commandType, + Name = command, ControllingUserId = currentSession.UserId }; From 03cbf5cfbfeae399e6e91e1271e328d6d7c096df Mon Sep 17 00:00:00 2001 From: Nelson Tham Date: Mon, 21 Sep 2020 19:02:54 +0000 Subject: [PATCH 78/82] Translated using Weblate (Chinese (Traditional)) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/zh_Hant/ --- Emby.Server.Implementations/Localization/Core/zh-TW.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Localization/Core/zh-TW.json b/Emby.Server.Implementations/Localization/Core/zh-TW.json index 01108fe84d..7b6540c3e3 100644 --- a/Emby.Server.Implementations/Localization/Core/zh-TW.json +++ b/Emby.Server.Implementations/Localization/Core/zh-TW.json @@ -96,7 +96,7 @@ "TaskDownloadMissingSubtitles": "下載遺失的字幕", "TaskRefreshChannels": "重新整理頻道", "TaskUpdatePlugins": "更新外掛", - "TaskRefreshPeople": "重新整理人員", + "TaskRefreshPeople": "刷新用戶", "TaskCleanLogsDescription": "刪除超過 {0} 天的舊紀錄檔。", "TaskCleanLogs": "清空紀錄資料夾", "TaskRefreshLibraryDescription": "重新掃描媒體庫的新檔案並更新描述資料。", From 5a74710df313a8d32225410af520b4af6ee99121 Mon Sep 17 00:00:00 2001 From: Andrew Rabert Date: Mon, 21 Sep 2020 17:00:50 -0400 Subject: [PATCH 79/82] Optimize images Used: - `oxipng --zopfli --opt max --strip all` - `jpegoptim --all-progressive --strip-all` --- Emby.Dlna/Images/logo240.jpg | Bin 11520 -> 11483 bytes Emby.Dlna/Images/people48.png | Bin 286 -> 278 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/Emby.Dlna/Images/logo240.jpg b/Emby.Dlna/Images/logo240.jpg index da1cb5e071b7b4407803f549f1be3e0bf64f95cc..78a27f1b544ab929cdde18d4b7744019cf0267d3 100644 GIT binary patch literal 11483 zcmb8VWmp`|5-7ZjyF+kycXx;2uECvP!5sn#9^BoX0KuK$?(Xg`!S9myJ?DJi^V~nT zcXp9{>b^!~z2TS0JH*P#{KNASfOX2ml9y%KxB1 za7YL+DCoB(00IaL3y=BkXW!l%?Y4NPb6iPV-k z4b9M^NOk0|dr1C&yFf45k7gC8wa-kcmws`a#^K>+^oh!-s$}7yET*N)xnTJ7Pe1zh zmoy`Ly* z$}V$&xH?}S=*;ovuts$yBA!(o&7bdGKbTideO~pkDlW|&>YHr*(+RLAc(p^!^p=+? zQrxOZ?w)+_g;~yZy}Ca>JHQ?$5F#cUaxl^$w|&L6BmMeriHvb{ilZy#7xa zy(P`5aq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3L4J{bnf{bKP>dE;oC6MMq2^7M+HuV;{^r<<6rd0jF-^%_ixel zXyQ|8a)yaAqqP2WjFBvnG^KZj-OjF7eN^^rId%kkY=vRwE<0dBY34q^HK3;%6hjW4 zC+$`iNcP8fV6+Nb7#q!c2%u;1ig^!{Od3ygzw{1mF?iTBJ0ld!%`CDV%F|u(bydR$q9h z`Gx&6(H9Lb7G4A}5EQ{A8!Thit%T^DXU7e>f<>k;a)P&~@k=Bg0r-tYcRw^^s$?lx z8ISLY9yZk-5-X)W4zMe7ZGFD9o(Ur>;_b}N0~t0*wZ7Qt-E(JlojH(V$DB^3U2Ngg){YYpkXr?&9ps&AQY|7eCrYU^2UQ4=8cN^DOgSKFAPFsV~MA6RB zfeN}er2`t!T=v$H%wN+QIME9}YodeZtU88ZNBD8L;?x|8!vQLvX8d%JbiP2t)~uV= iNUoFs_awE*$hRY1^1y#K-hb68{xwzkrwhg7%zpqAdZ)Gk diff --git a/Emby.Dlna/Images/people48.png b/Emby.Dlna/Images/people48.png index 7fb25e6b393dcec7eb9f1335107e6a37c567d54d..dae5f6057fb0bea7a33e19601b81fe5dee250971 100644 GIT binary patch delta 250 zcmVI;NVulT(|gAquZW0FRW%mrEkRS$y)^b+b! z4w&4a={aS9EuaDhIAL&QfI9|-)DJSi$^9S(RLb}yAA^Vi=5skTl^O+b_7`}(X?W%5 z{ei?BpLWgxUPAw6-pYbGZ*_l3top$aslV(7c2Nz&wN%C2iRwq(F5p2+Aq`g0+L{9R zCg8Fe2IK+w2m&}12ncYXKumy;0^-kr(*VH;-pq`F@&nkN$N&HU07*qoM6N<$f{6}k AoB#j- delta 258 zcmV+d0sa1#0-gepB!A^eL_t(Y$766I5ipEu7|9ykd$--Wzh|;9u^Q6v{0D;<#l&gI z{qr9NYKYO`^$4#1|EmBZG)()C1XdBD;UKbxn?z`Mimc(MJ7EnUkTv}GC9L5%vikc( zIB5y8hCM`Ri2RID|0kW8i0eXVSVUaXSOksgKdan{Onm95fP2pRb|IIPp~{qZ*I^0L+Ym^7S}r)&Kwi07*qo IM6N<$g4F$e00000 From fa1df73d105ab42516712a4425c3e89951c41266 Mon Sep 17 00:00:00 2001 From: hoanghuy309 Date: Tue, 22 Sep 2020 15:49:55 +0000 Subject: [PATCH 80/82] Translated using Weblate (Vietnamese) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/vi/ --- .../Localization/Core/vi.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Emby.Server.Implementations/Localization/Core/vi.json b/Emby.Server.Implementations/Localization/Core/vi.json index 57fe6c7a20..aff21c05a5 100644 --- a/Emby.Server.Implementations/Localization/Core/vi.json +++ b/Emby.Server.Implementations/Localization/Core/vi.json @@ -4,16 +4,16 @@ "Folders": "Thư Mục", "Genres": "Thể Loại", "HeaderAlbumArtists": "Bộ Sưu Tập Nghệ sĩ", - "HeaderContinueWatching": "Tiếp Tục Xem Tiếp", + "HeaderContinueWatching": "Xem Tiếp", "HeaderLiveTV": "TV Trực Tiếp", "Movies": "Phim", "Photos": "Ảnh", "Playlists": "Danh sách phát", - "Shows": "Các Chương Trình", + "Shows": "Chương Trình TV", "Songs": "Các Bài Hát", "Sync": "Đồng Bộ", "ValueSpecialEpisodeName": "Đặc Biệt - {0}", - "Albums": "Bộ Sưu Tập", + "Albums": "Albums", "Artists": "Các Nghệ Sĩ", "TaskDownloadMissingSubtitlesDescription": "Tìm kiếm phụ đề bị thiếu trên Internet dựa trên cấu hình thông tin chi tiết.", "TaskDownloadMissingSubtitles": "Tải xuống phụ đề bị thiếu", @@ -29,8 +29,8 @@ "TaskCleanLogs": "Làm sạch nhật ký", "TaskRefreshLibraryDescription": "Quét thư viện phương tiện của bạn để tìm các tệp mới và làm mới thông tin chi tiết.", "TaskRefreshLibrary": "Quét Thư viện Phương tiện", - "TaskRefreshChapterImagesDescription": "Tạo hình thu nhỏ cho video có cảnh quay.", - "TaskRefreshChapterImages": "Trích Xuất Ảnh Cảnh Quay", + "TaskRefreshChapterImagesDescription": "Tạo hình thu nhỏ cho video có các phân cảnh.", + "TaskRefreshChapterImages": "Trích Xuất Ảnh Phân Cảnh", "TaskCleanCacheDescription": "Xóa các tệp cache không còn cần thiết của hệ thống.", "TaskCleanCache": "Làm Sạch Thư Mục Cache", "TasksChannelsCategory": "Kênh Internet", @@ -107,7 +107,7 @@ "FailedLoginAttemptWithUserName": "Nỗ lực đăng nhập thất bại từ {0}", "DeviceOnlineWithName": "{0} đã kết nối", "DeviceOfflineWithName": "{0} đã ngắt kết nối", - "ChapterNameValue": "Cảnh Quay {0}", + "ChapterNameValue": "Phân Cảnh {0}", "Channels": "Các Kênh", "CameraImageUploadedFrom": "Một hình ảnh máy ảnh mới đã được tải lên từ {0}", "Books": "Các Quyển Sách", From a1511add060249e4e04d88eeb8e9ee1d6c20c2a9 Mon Sep 17 00:00:00 2001 From: hoanghuy309 Date: Tue, 22 Sep 2020 16:26:52 +0000 Subject: [PATCH 81/82] Translated using Weblate (Vietnamese) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/vi/ --- Emby.Server.Implementations/Localization/Core/vi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Localization/Core/vi.json b/Emby.Server.Implementations/Localization/Core/vi.json index aff21c05a5..f190f8298d 100644 --- a/Emby.Server.Implementations/Localization/Core/vi.json +++ b/Emby.Server.Implementations/Localization/Core/vi.json @@ -110,7 +110,7 @@ "ChapterNameValue": "Phân Cảnh {0}", "Channels": "Các Kênh", "CameraImageUploadedFrom": "Một hình ảnh máy ảnh mới đã được tải lên từ {0}", - "Books": "Các Quyển Sách", + "Books": "Sách", "AuthenticationSucceededWithUserName": "{0} xác thực thành công", "Application": "Ứng Dụng", "AppDeviceValues": "Ứng Dụng: {0}, Thiết Bị: {1}" From 9bcd81a5dd14e1dc5b14a87520f54dd4205123d0 Mon Sep 17 00:00:00 2001 From: Oatavandi Date: Wed, 23 Sep 2020 12:30:24 +0000 Subject: [PATCH 82/82] Translated using Weblate (Tamil) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ta/ --- Emby.Server.Implementations/Localization/Core/ta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Localization/Core/ta.json b/Emby.Server.Implementations/Localization/Core/ta.json index ed6877f7d7..810b1b9abe 100644 --- a/Emby.Server.Implementations/Localization/Core/ta.json +++ b/Emby.Server.Implementations/Localization/Core/ta.json @@ -26,7 +26,7 @@ "DeviceOnlineWithName": "{0} இணைக்கப்பட்டது", "DeviceOfflineWithName": "{0} துண்டிக்கப்பட்டது", "Collections": "தொகுப்புகள்", - "CameraImageUploadedFrom": "{0} இலிருந்து புதிய புகைப்படம் பதிவேற்றப்பட்டது", + "CameraImageUploadedFrom": "{0} இல் இருந்து புதிய புகைப்படம் பதிவேற்றப்பட்டது", "AppDeviceValues": "செயலி: {0}, சாதனம்: {1}", "TaskDownloadMissingSubtitles": "விடுபட்டுபோன வசன வரிகளைப் பதிவிறக்கு", "TaskRefreshChannels": "சேனல்களை புதுப்பி",