From 6d3b1296661a486d511fa12163456f96cfa3fcc7 Mon Sep 17 00:00:00 2001
From: Joe Rogers <1337joe@gmail.com>
Date: Fri, 19 Nov 2021 22:02:26 +0100
Subject: Add image scaling options for tmdb
---
.../Tmdb/Configuration/PluginConfiguration.cs | 41 ++++++++++
.../Plugins/Tmdb/Configuration/config.html | 41 +++++++++-
.../Plugins/Tmdb/TmdbClientManager.cs | 91 +++++++++++++++++++---
3 files changed, 162 insertions(+), 11 deletions(-)
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/Configuration/PluginConfiguration.cs b/MediaBrowser.Providers/Plugins/Tmdb/Configuration/PluginConfiguration.cs
index 9a78a7536..b043da76c 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/Configuration/PluginConfiguration.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/Configuration/PluginConfiguration.cs
@@ -1,3 +1,4 @@
+using System.Collections.Generic;
using MediaBrowser.Model.Plugins;
namespace MediaBrowser.Providers.Plugins.Tmdb
@@ -26,5 +27,45 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
/// Gets or sets a value indicating the maximum number of cast members to fetch for an item.
///
public int MaxCastMembers { get; set; } = 15;
+
+ ///
+ /// Gets or sets a value indicating the poster image size to fetch.
+ ///
+ public string? PosterSize { get; set; }
+
+ ///
+ /// Gets or sets the available options for poster size.
+ ///
+ public List PosterSizeOptions { get; set; } = new List();
+
+ ///
+ /// Gets or sets a value indicating the backdrop image size to fetch.
+ ///
+ public string? BackdropSize { get; set; }
+
+ ///
+ /// Gets or sets the available options for backdrop size.
+ ///
+ public List BackdropSizeOptions { get; set; } = new List();
+
+ ///
+ /// Gets or sets a value indicating the profile image size to fetch.
+ ///
+ public string? ProfileSize { get; set; }
+
+ ///
+ /// Gets or sets the available options for profile size.
+ ///
+ public List ProfileSizeOptions { get; set; } = new List();
+
+ ///
+ /// Gets or sets a value indicating the still image size to fetch.
+ ///
+ public string? StillSize { get; set; }
+
+ ///
+ /// Gets or sets the available options for still size.
+ ///
+ public List StillSizeOptions { get; set; } = new List();
}
}
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/Configuration/config.html b/MediaBrowser.Providers/Plugins/Tmdb/Configuration/config.html
index 12b4c7ca4..d376df96c 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/Configuration/config.html
+++ b/MediaBrowser.Providers/Plugins/Tmdb/Configuration/config.html
@@ -24,7 +24,22 @@
The maximum number of cast members to fetch for an item.
-
+
+
Image Scaling
+
If size options are not populated then refresh metadata for any item from TMDb and reload this page.
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,6 +66,26 @@
cancelable: false
}));
+ var sizeOptionsGenerator = function (size) {
+ return '';
+ }
+
+ var selPosterSize = document.querySelector('#selectPosterSize');
+ selPosterSize.innerHTML = config.PosterSizeOptions.map(sizeOptionsGenerator);
+ selPosterSize.value = config.PosterSize;
+
+ var selBackdropSize = document.querySelector('#selectBackdropSize');
+ selBackdropSize.innerHTML = config.BackdropSizeOptions.map(sizeOptionsGenerator);
+ selBackdropSize.value = config.BackdropSize;
+
+ var selProfileSize = document.querySelector('#selectProfileSize');
+ selProfileSize.innerHTML = config.ProfileSizeOptions.map(sizeOptionsGenerator);
+ selProfileSize.value = config.ProfileSize;
+
+ var selStillSize = document.querySelector('#selectStillSize');
+ selStillSize.innerHTML = config.StillSizeOptions.map(sizeOptionsGenerator);
+ selStillSize.value = config.StillSize;
+
Dashboard.hideLoadingMsg();
});
});
@@ -65,6 +100,10 @@
config.ExcludeTagsSeries = document.querySelector('#excludeTagsSeries').checked;
config.ExcludeTagsMovies = document.querySelector('#excludeTagsMovies').checked;
config.MaxCastMembers = document.querySelector('#maxCastMembers').value;
+ config.PosterSize = document.querySelector('#selectPosterSize').value;
+ config.BackdropSize = document.querySelector('#selectBackdropSize').value;
+ config.ProfileSize = document.querySelector('#selectProfileSize').value;
+ config.StillSize = document.querySelector('#selectStillSize').value;
ApiClient.updatePluginConfiguration(PluginConfig.pluginId, config).then(Dashboard.processPluginConfigurationUpdateResult);
});
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs b/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
index cb644c8ca..c082a6cc4 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Globalization;
+using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Dto;
@@ -508,7 +509,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
/// The absolute URL.
public string GetPosterUrl(string posterPath)
{
- return GetUrl(_tmDbClient.Config.Images.PosterSizes[^1], posterPath);
+ return GetUrl(Plugin.Instance.Configuration.PosterSize, posterPath);
}
///
@@ -518,7 +519,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
/// The absolute URL.
public string GetProfileUrl(string actorProfilePath)
{
- return GetUrl(_tmDbClient.Config.Images.ProfileSizes[^1], actorProfilePath);
+ return GetUrl(Plugin.Instance.Configuration.ProfileSize, actorProfilePath);
}
///
@@ -529,7 +530,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
/// The collection to add the remote images into.
public void ConvertPostersToRemoteImageInfo(List images, string requestLanguage, List results)
{
- ConvertToRemoteImageInfo(images, _tmDbClient.Config.Images.PosterSizes[^1], ImageType.Primary, requestLanguage, results);
+ ConvertToRemoteImageInfo(images, Plugin.Instance.Configuration.PosterSize, ImageType.Primary, requestLanguage, results);
}
///
@@ -540,7 +541,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
/// The collection to add the remote images into.
public void ConvertBackdropsToRemoteImageInfo(List images, string requestLanguage, List results)
{
- ConvertToRemoteImageInfo(images, _tmDbClient.Config.Images.BackdropSizes[^1], ImageType.Backdrop, requestLanguage, results);
+ ConvertToRemoteImageInfo(images, Plugin.Instance.Configuration.BackdropSize, ImageType.Backdrop, requestLanguage, results);
}
///
@@ -551,7 +552,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
/// The collection to add the remote images into.
public void ConvertProfilesToRemoteImageInfo(List images, string requestLanguage, List results)
{
- ConvertToRemoteImageInfo(images, _tmDbClient.Config.Images.ProfileSizes[^1], ImageType.Primary, requestLanguage, results);
+ ConvertToRemoteImageInfo(images, Plugin.Instance.Configuration.ProfileSize, ImageType.Primary, requestLanguage, results);
}
///
@@ -562,7 +563,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
/// The collection to add the remote images into.
public void ConvertStillsToRemoteImageInfo(List images, string requestLanguage, List results)
{
- ConvertToRemoteImageInfo(images, _tmDbClient.Config.Images.StillSizes[^1], ImageType.Primary, requestLanguage, results);
+ ConvertToRemoteImageInfo(images, Plugin.Instance.Configuration.StillSize, ImageType.Primary, requestLanguage, results);
}
///
@@ -575,16 +576,51 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
/// The collection to add the remote images into.
private void ConvertToRemoteImageInfo(List images, string size, ImageType type, string requestLanguage, List results)
{
+ int? targetHeight = null;
+ int? targetWidth = null;
+ var match = Regex.Match(size, @"(?[hw])(?[0-9]+)");
+ if (match.Success)
+ {
+ var targetSize = int.Parse(match.Groups["size"].Value, NumberStyles.Integer, CultureInfo.InvariantCulture);
+ if (string.Equals(match.Groups["dimension"].Value, "h", StringComparison.OrdinalIgnoreCase))
+ {
+ targetHeight = targetSize;
+ }
+ else
+ {
+ targetWidth = targetSize;
+ }
+ }
+
for (var i = 0; i < images.Count; i++)
{
var image = images[i];
+
+ int width;
+ int height;
+ if (targetHeight.HasValue)
+ {
+ width = (int)Math.Round((double)targetHeight.Value / image.Height * image.Width);
+ height = targetHeight.Value;
+ }
+ else if (targetWidth.HasValue)
+ {
+ height = (int)Math.Round((double)targetWidth.Value / image.Width * image.Height);
+ width = targetWidth.Value;
+ }
+ else
+ {
+ width = image.Width;
+ height = image.Height;
+ }
+
results.Add(new RemoteImageInfo
{
Url = GetUrl(size, image.FilePath),
CommunityRating = image.VoteAverage,
VoteCount = image.VoteCount,
- Width = image.Width,
- Height = image.Height,
+ Width = width,
+ Height = height,
Language = TmdbUtils.AdjustImageLanguage(image.Iso_639_1, requestLanguage),
ProviderName = TmdbUtils.ProviderName,
Type = type,
@@ -593,9 +629,44 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
}
}
- private Task EnsureClientConfigAsync()
+ private async Task EnsureClientConfigAsync()
{
- return !_tmDbClient.HasConfig ? _tmDbClient.GetConfigAsync() : Task.CompletedTask;
+ if (!_tmDbClient.HasConfig)
+ {
+ var config = await _tmDbClient.GetConfigAsync().ConfigureAwait(false);
+ ValidatePreferences(config);
+ }
+ }
+
+ private static void ValidatePreferences(TMDbConfig config)
+ {
+ var imageConfig = config.Images;
+
+ var pluginConfig = Plugin.Instance.Configuration;
+
+ pluginConfig.PosterSizeOptions = imageConfig.PosterSizes;
+ if (!pluginConfig.PosterSizeOptions.Contains(pluginConfig.PosterSize))
+ {
+ pluginConfig.PosterSize = pluginConfig.PosterSizeOptions[^1];
+ }
+
+ pluginConfig.BackdropSizeOptions = imageConfig.BackdropSizes;
+ if (!pluginConfig.BackdropSizeOptions.Contains(pluginConfig.BackdropSize))
+ {
+ pluginConfig.BackdropSize = pluginConfig.BackdropSizeOptions[^1];
+ }
+
+ pluginConfig.ProfileSizeOptions = imageConfig.ProfileSizes;
+ if (!pluginConfig.ProfileSizeOptions.Contains(pluginConfig.ProfileSize))
+ {
+ pluginConfig.ProfileSize = pluginConfig.ProfileSizeOptions[^1];
+ }
+
+ pluginConfig.StillSizeOptions = imageConfig.StillSizes;
+ if (!pluginConfig.StillSizeOptions.Contains(pluginConfig.StillSize))
+ {
+ pluginConfig.StillSize = pluginConfig.StillSizeOptions[^1];
+ }
}
///
--
cgit v1.2.3
From 0af5e600946231df73f1783330ad8cd0bbbed2ee Mon Sep 17 00:00:00 2001
From: Joe Rogers <1337joe@gmail.com>
Date: Mon, 22 Nov 2021 21:08:07 +0100
Subject: Address review comments
Store null instead of calculating scaled image sizes.
Add endpoint to provide TMDb image size options.
---
.../Plugins/Tmdb/Api/TmdbController.cs | 41 +++++++++++++
.../Tmdb/Configuration/PluginConfiguration.cs | 21 -------
.../Plugins/Tmdb/Configuration/config.html | 59 ++++++++++++------
.../Plugins/Tmdb/TmdbClientManager.cs | 71 +++++++---------------
4 files changed, 104 insertions(+), 88 deletions(-)
create mode 100644 MediaBrowser.Providers/Plugins/Tmdb/Api/TmdbController.cs
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/Api/TmdbController.cs b/MediaBrowser.Providers/Plugins/Tmdb/Api/TmdbController.cs
new file mode 100644
index 000000000..0bab7c3ca
--- /dev/null
+++ b/MediaBrowser.Providers/Plugins/Tmdb/Api/TmdbController.cs
@@ -0,0 +1,41 @@
+using System.Net.Mime;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using TMDbLib.Objects.General;
+
+namespace MediaBrowser.Providers.Plugins.Tmdb.Api
+{
+ ///
+ /// The TMDb api controller.
+ ///
+ [ApiController]
+ [Authorize(Policy = "DefaultAuthorization")]
+ [Route("[controller]")]
+ [Produces(MediaTypeNames.Application.Json)]
+ public class TmdbController : ControllerBase
+ {
+ private readonly TmdbClientManager _tmdbClientManager;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The TMDb client manager.
+ public TmdbController(TmdbClientManager tmdbClientManager)
+ {
+ _tmdbClientManager = tmdbClientManager;
+ }
+
+ ///
+ /// Gets the TMDb image configuration options.
+ ///
+ /// The image portion of the TMDb client configuration.
+ [HttpGet("ClientConfiguration")]
+ [ProducesResponseType(StatusCodes.Status200OK)]
+ public async Task TmdbClientConfiguration()
+ {
+ return (await _tmdbClientManager.GetClientConfiguration().ConfigureAwait(false)).Images;
+ }
+ }
+}
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/Configuration/PluginConfiguration.cs b/MediaBrowser.Providers/Plugins/Tmdb/Configuration/PluginConfiguration.cs
index b043da76c..dec796148 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/Configuration/PluginConfiguration.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/Configuration/PluginConfiguration.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using MediaBrowser.Model.Plugins;
namespace MediaBrowser.Providers.Plugins.Tmdb
@@ -33,39 +32,19 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
///
public string? PosterSize { get; set; }
- ///
- /// Gets or sets the available options for poster size.
- ///
- public List PosterSizeOptions { get; set; } = new List();
-
///
/// Gets or sets a value indicating the backdrop image size to fetch.
///
public string? BackdropSize { get; set; }
- ///
- /// Gets or sets the available options for backdrop size.
- ///
- public List BackdropSizeOptions { get; set; } = new List();
-
///
/// Gets or sets a value indicating the profile image size to fetch.
///
public string? ProfileSize { get; set; }
- ///
- /// Gets or sets the available options for profile size.
- ///
- public List ProfileSizeOptions { get; set; } = new List();
-
///
/// Gets or sets a value indicating the still image size to fetch.
///
public string? StillSize { get; set; }
-
- ///
- /// Gets or sets the available options for still size.
- ///
- public List StillSizeOptions { get; set; } = new List();
}
}
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/Configuration/config.html b/MediaBrowser.Providers/Plugins/Tmdb/Configuration/config.html
index d376df96c..52693795b 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/Configuration/config.html
+++ b/MediaBrowser.Providers/Plugins/Tmdb/Configuration/config.html
@@ -26,7 +26,6 @@
Image Scaling
-
If size options are not populated then refresh metadata for any item from TMDb and reload this page.
@@ -54,39 +53,61 @@
document.querySelector('.configPage')
.addEventListener('pageshow', function () {
Dashboard.showLoadingMsg();
- ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
- document.querySelector('#includeAdult').checked = config.IncludeAdult;
- document.querySelector('#excludeTagsSeries').checked = config.ExcludeTagsSeries;
- document.querySelector('#excludeTagsMovies').checked = config.ExcludeTagsMovies;
- var maxCastMembers = document.querySelector('#maxCastMembers');
- maxCastMembers.value = config.MaxCastMembers;
- maxCastMembers.dispatchEvent(new Event('change', {
- bubbles: true,
- cancelable: false
- }));
+ var clientConfig, pluginConfig;
+ var configureImageScaling = function() {
+ if (clientConfig === null || pluginConfig === null) {
+ return;
+ }
var sizeOptionsGenerator = function (size) {
return '';
}
var selPosterSize = document.querySelector('#selectPosterSize');
- selPosterSize.innerHTML = config.PosterSizeOptions.map(sizeOptionsGenerator);
- selPosterSize.value = config.PosterSize;
+ selPosterSize.innerHTML = clientConfig.PosterSizes.map(sizeOptionsGenerator);
+ selPosterSize.value = pluginConfig.PosterSize;
var selBackdropSize = document.querySelector('#selectBackdropSize');
- selBackdropSize.innerHTML = config.BackdropSizeOptions.map(sizeOptionsGenerator);
- selBackdropSize.value = config.BackdropSize;
+ selBackdropSize.innerHTML = clientConfig.BackdropSizes.map(sizeOptionsGenerator);
+ selBackdropSize.value = pluginConfig.BackdropSize;
var selProfileSize = document.querySelector('#selectProfileSize');
- selProfileSize.innerHTML = config.ProfileSizeOptions.map(sizeOptionsGenerator);
- selProfileSize.value = config.ProfileSize;
+ selProfileSize.innerHTML = clientConfig.ProfileSizes.map(sizeOptionsGenerator);
+ selProfileSize.value = pluginConfig.ProfileSize;
var selStillSize = document.querySelector('#selectStillSize');
- selStillSize.innerHTML = config.StillSizeOptions.map(sizeOptionsGenerator);
- selStillSize.value = config.StillSize;
+ selStillSize.innerHTML = clientConfig.StillSizes.map(sizeOptionsGenerator);
+ selStillSize.value = pluginConfig.StillSize;
Dashboard.hideLoadingMsg();
+ }
+
+ const request = {
+ url: ApiClient.getUrl('tmdb/ClientConfiguration'),
+ dataType: 'json',
+ type: 'GET',
+ headers: { accept: 'application/json' }
+ }
+ ApiClient.fetch(request).then(function (config) {
+ clientConfig = config;
+ configureImageScaling();
+ });
+
+ ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
+ document.querySelector('#includeAdult').checked = config.IncludeAdult;
+ document.querySelector('#excludeTagsSeries').checked = config.ExcludeTagsSeries;
+ document.querySelector('#excludeTagsMovies').checked = config.ExcludeTagsMovies;
+
+ var maxCastMembers = document.querySelector('#maxCastMembers');
+ maxCastMembers.value = config.MaxCastMembers;
+ maxCastMembers.dispatchEvent(new Event('change', {
+ bubbles: true,
+ cancelable: false
+ }));
+
+ pluginConfig = config;
+ configureImageScaling();
});
});
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs b/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
index c082a6cc4..9a3af1f4a 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
@@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
-using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Dto;
@@ -576,51 +575,20 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
/// The collection to add the remote images into.
private void ConvertToRemoteImageInfo(List images, string size, ImageType type, string requestLanguage, List results)
{
- int? targetHeight = null;
- int? targetWidth = null;
- var match = Regex.Match(size, @"(?[hw])(?[0-9]+)");
- if (match.Success)
- {
- var targetSize = int.Parse(match.Groups["size"].Value, NumberStyles.Integer, CultureInfo.InvariantCulture);
- if (string.Equals(match.Groups["dimension"].Value, "h", StringComparison.OrdinalIgnoreCase))
- {
- targetHeight = targetSize;
- }
- else
- {
- targetWidth = targetSize;
- }
- }
+ // sizes provided are for original resolution, don't store them when downloading scaled images
+ var scaleImage = !string.Equals(size, "original", StringComparison.OrdinalIgnoreCase);
for (var i = 0; i < images.Count; i++)
{
var image = images[i];
- int width;
- int height;
- if (targetHeight.HasValue)
- {
- width = (int)Math.Round((double)targetHeight.Value / image.Height * image.Width);
- height = targetHeight.Value;
- }
- else if (targetWidth.HasValue)
- {
- height = (int)Math.Round((double)targetWidth.Value / image.Width * image.Height);
- width = targetWidth.Value;
- }
- else
- {
- width = image.Width;
- height = image.Height;
- }
-
results.Add(new RemoteImageInfo
{
Url = GetUrl(size, image.FilePath),
CommunityRating = image.VoteAverage,
VoteCount = image.VoteCount,
- Width = width,
- Height = height,
+ Width = scaleImage ? null : image.Width,
+ Height = scaleImage ? null : image.Height,
Language = TmdbUtils.AdjustImageLanguage(image.Iso_639_1, requestLanguage),
ProviderName = TmdbUtils.ProviderName,
Type = type,
@@ -644,31 +612,38 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
var pluginConfig = Plugin.Instance.Configuration;
- pluginConfig.PosterSizeOptions = imageConfig.PosterSizes;
- if (!pluginConfig.PosterSizeOptions.Contains(pluginConfig.PosterSize))
+ if (!imageConfig.PosterSizes.Contains(pluginConfig.PosterSize))
{
- pluginConfig.PosterSize = pluginConfig.PosterSizeOptions[^1];
+ pluginConfig.PosterSize = imageConfig.PosterSizes[^1];
}
- pluginConfig.BackdropSizeOptions = imageConfig.BackdropSizes;
- if (!pluginConfig.BackdropSizeOptions.Contains(pluginConfig.BackdropSize))
+ if (!imageConfig.BackdropSizes.Contains(pluginConfig.BackdropSize))
{
- pluginConfig.BackdropSize = pluginConfig.BackdropSizeOptions[^1];
+ pluginConfig.BackdropSize = imageConfig.BackdropSizes[^1];
}
- pluginConfig.ProfileSizeOptions = imageConfig.ProfileSizes;
- if (!pluginConfig.ProfileSizeOptions.Contains(pluginConfig.ProfileSize))
+ if (!imageConfig.ProfileSizes.Contains(pluginConfig.ProfileSize))
{
- pluginConfig.ProfileSize = pluginConfig.ProfileSizeOptions[^1];
+ pluginConfig.ProfileSize = imageConfig.ProfileSizes[^1];
}
- pluginConfig.StillSizeOptions = imageConfig.StillSizes;
- if (!pluginConfig.StillSizeOptions.Contains(pluginConfig.StillSize))
+ if (!imageConfig.StillSizes.Contains(pluginConfig.StillSize))
{
- pluginConfig.StillSize = pluginConfig.StillSizeOptions[^1];
+ pluginConfig.StillSize = imageConfig.StillSizes[^1];
}
}
+ ///
+ /// Gets the configuration.
+ ///
+ /// The configuration.
+ public async Task GetClientConfiguration()
+ {
+ await EnsureClientConfigAsync().ConfigureAwait(false);
+
+ return _tmDbClient.Config;
+ }
+
///
public void Dispose()
{
--
cgit v1.2.3
From e77846295565151be38fa33513ed6ca5c74e28c1 Mon Sep 17 00:00:00 2001
From: Joe Rogers <1337joe@gmail.com>
Date: Tue, 30 Nov 2021 14:31:32 +0100
Subject: Use SSL for tmdb images
---
MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs b/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
index cb644c8ca..4d3bc61e5 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
@@ -498,7 +498,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
return null;
}
- return _tmDbClient.GetImageUrl(size, path).ToString();
+ return _tmDbClient.GetImageUrl(size, path, true).ToString();
}
///
--
cgit v1.2.3
From eaa003775f641bc77a0216f145933a483ea0802b Mon Sep 17 00:00:00 2001
From: Marius Luca
Date: Tue, 30 Nov 2021 16:09:02 +0200
Subject: - take into account the streams dlnaheaders query parameter set by
the DidlBuilder NormalizeDlnaMediaUrl function
---
Jellyfin.Api/Helpers/StreamingHelpers.cs | 1 +
1 file changed, 1 insertion(+)
diff --git a/Jellyfin.Api/Helpers/StreamingHelpers.cs b/Jellyfin.Api/Helpers/StreamingHelpers.cs
index 1b8f24c27..ed071bcd7 100644
--- a/Jellyfin.Api/Helpers/StreamingHelpers.cs
+++ b/Jellyfin.Api/Helpers/StreamingHelpers.cs
@@ -90,6 +90,7 @@ namespace Jellyfin.Api.Helpers
}
var enableDlnaHeaders = !string.IsNullOrWhiteSpace(streamingRequest.Params) ||
+ streamingRequest.StreamOptions.ContainsKey("dlnaheaders") ||
string.Equals(httpRequest.Headers["GetContentFeatures.DLNA.ORG"], "1", StringComparison.OrdinalIgnoreCase);
var state = new StreamState(mediaSourceManager, transcodingJobType, transcodingJobHelper)
--
cgit v1.2.3
From a0df79d8a54ff129047cb0bb5e9c8f15df3ce55f Mon Sep 17 00:00:00 2001
From: WWWesten
Date: Tue, 30 Nov 2021 12:25:45 +0000
Subject: Translated using Weblate (Persian) Translation: Jellyfin/Jellyfin
Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/fa/
---
Emby.Server.Implementations/Localization/Core/fa.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/fa.json b/Emby.Server.Implementations/Localization/Core/fa.json
index 8ab657e5b..3d3b3533f 100644
--- a/Emby.Server.Implementations/Localization/Core/fa.json
+++ b/Emby.Server.Implementations/Localization/Core/fa.json
@@ -6,7 +6,7 @@
"AuthenticationSucceededWithUserName": "{0} با موفقیت تایید اعتبار شد",
"Books": "کتابها",
"CameraImageUploadedFrom": "یک عکس جدید از دوربین ارسال شده است {0}",
- "Channels": "کانالها",
+ "Channels": "کانالها",
"ChapterNameValue": "قسمت {0}",
"Collections": "مجموعهها",
"DeviceOfflineWithName": "ارتباط {0} قطع شد",
@@ -37,7 +37,7 @@
"MessageNamedServerConfigurationUpdatedWithValue": "پکربندی بخش {0} سرور بروزرسانی شد",
"MessageServerConfigurationUpdated": "پیکربندی سرور بروزرسانی شد",
"MixedContent": "محتوای مخلوط",
- "Movies": "فیلمها",
+ "Movies": "فیلم ها",
"Music": "موسیقی",
"MusicVideos": "موزیک ویدیوها",
"NameInstallFailed": "{0} نصب با مشکل مواجه شد",
--
cgit v1.2.3
From 2da7777e6dc25e7325a45ba2262ef4327e4ee4b6 Mon Sep 17 00:00:00 2001
From: snieguzary
Date: Mon, 29 Nov 2021 13:06:49 +0000
Subject: Translated using Weblate (Polish) Translation: Jellyfin/Jellyfin
Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/pl/
---
Emby.Server.Implementations/Localization/Core/pl.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/pl.json b/Emby.Server.Implementations/Localization/Core/pl.json
index e8a32a13e..4fa8d2bb4 100644
--- a/Emby.Server.Implementations/Localization/Core/pl.json
+++ b/Emby.Server.Implementations/Localization/Core/pl.json
@@ -15,7 +15,7 @@
"Favorites": "Ulubione",
"Folders": "Foldery",
"Genres": "Gatunki",
- "HeaderAlbumArtists": "Album artysty",
+ "HeaderAlbumArtists": "Wykonawcy albumów",
"HeaderContinueWatching": "Kontynuuj odtwarzanie",
"HeaderFavoriteAlbums": "Ulubione albumy",
"HeaderFavoriteArtists": "Ulubieni wykonawcy",
@@ -47,7 +47,7 @@
"NotificationOptionApplicationUpdateAvailable": "Dostępna aktualizacja aplikacji",
"NotificationOptionApplicationUpdateInstalled": "Zaktualizowano aplikację",
"NotificationOptionAudioPlayback": "Rozpoczęto odtwarzanie muzyki",
- "NotificationOptionAudioPlaybackStopped": "Odtwarzane dźwięku zatrzymane",
+ "NotificationOptionAudioPlaybackStopped": "Odtwarzanie dźwięku zatrzymane",
"NotificationOptionCameraImageUploaded": "Przekazano obraz z urządzenia przenośnego",
"NotificationOptionInstallationFailed": "Nieudana instalacja",
"NotificationOptionNewLibraryContent": "Dodano nową zawartość",
@@ -98,7 +98,7 @@
"TaskRefreshChannels": "Odśwież kanały",
"TaskCleanTranscodeDescription": "Usuwa transkodowane pliki starsze niż 1 dzień.",
"TaskCleanTranscode": "Wyczyść folder transkodowania",
- "TaskUpdatePluginsDescription": "Pobiera i instaluje aktualizacje dla pluginów które są skonfigurowane do automatycznej aktualizacji.",
+ "TaskUpdatePluginsDescription": "Pobiera i instaluje aktualizacje dla pluginów, które są skonfigurowane do automatycznej aktualizacji.",
"TaskUpdatePlugins": "Aktualizuj pluginy",
"TaskRefreshPeopleDescription": "Odświeża metadane o aktorów i reżyserów w Twojej bibliotece mediów.",
"TaskRefreshPeople": "Odśwież obsadę",
--
cgit v1.2.3
From f6d8c19a7ac41c6c7c217d9e9ccbf98f78122327 Mon Sep 17 00:00:00 2001
From: hoanghuy309
Date: Tue, 30 Nov 2021 06:43:44 +0000
Subject: 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 cedf468f7..b7ece8d5f 100644
--- a/Emby.Server.Implementations/Localization/Core/vi.json
+++ b/Emby.Server.Implementations/Localization/Core/vi.json
@@ -103,7 +103,7 @@
"HeaderFavoriteEpisodes": "Tập Phim Yêu Thích",
"HeaderFavoriteArtists": "Nghệ Sĩ Yêu Thích",
"HeaderFavoriteAlbums": "Album Ưa Thích",
- "FailedLoginAttemptWithUserName": "Nỗ lực đăng nhập thất bại từ {0}",
+ "FailedLoginAttemptWithUserName": "Đăng nhập không thành công thử từ {0}",
"DeviceOnlineWithName": "{0} đã kết nối",
"DeviceOfflineWithName": "{0} đã ngắt kết nối",
"ChapterNameValue": "Phân Cảnh {0}",
--
cgit v1.2.3
From beafd6eaabf7baa7c478b4a0ef131ddc480b368a Mon Sep 17 00:00:00 2001
From: Bond_009
Date: Wed, 1 Dec 2021 00:13:02 +0100
Subject: Use JsonContent where possible
Should reduce the # of allocated bytes
---
Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs | 9 ++++-----
MediaBrowser.Model/Configuration/LibraryOptions.cs | 1 +
tests/Jellyfin.Server.Integration.Tests/AuthHelper.cs | 6 +++---
.../Controllers/DlnaControllerTests.cs | 10 ++++------
.../Controllers/MediaStructureControllerTests.cs | 7 +++----
.../Controllers/StartupControllerTests.cs | 7 +++----
.../Controllers/UserControllerTests.cs | 7 +++----
7 files changed, 21 insertions(+), 26 deletions(-)
diff --git a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
index 08aa0cfd7..93d72dba4 100644
--- a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
+++ b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
@@ -9,6 +9,7 @@ using System.Globalization;
using System.Linq;
using System.Net;
using System.Net.Http;
+using System.Net.Http.Json;
using System.Net.Http.Headers;
using System.Net.Mime;
using System.Security.Cryptography;
@@ -101,11 +102,10 @@ namespace Emby.Server.Implementations.LiveTv.Listings
}
};
- var requestString = JsonSerializer.Serialize(requestList, _jsonOptions);
- _logger.LogDebug("Request string for schedules is: {RequestString}", requestString);
+ _logger.LogDebug("Request string for schedules is: {@RequestString}", requestList);
using var options = new HttpRequestMessage(HttpMethod.Post, ApiUrl + "/schedules");
- options.Content = new StringContent(requestString, Encoding.UTF8, MediaTypeNames.Application.Json);
+ options.Content = JsonContent.Create(requestList, options: _jsonOptions);
options.Headers.TryAddWithoutValidation("token", token);
using var response = await Send(options, true, info, cancellationToken).ConfigureAwait(false);
await using var responseStream = await response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
@@ -121,8 +121,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
programRequestOptions.Headers.TryAddWithoutValidation("token", token);
var programIds = dailySchedules.SelectMany(d => d.Programs.Select(s => s.ProgramId)).Distinct();
- programRequestOptions.Content = new ByteArrayContent(JsonSerializer.SerializeToUtf8Bytes(programIds, _jsonOptions));
- programRequestOptions.Content.Headers.ContentType = MediaTypeHeaderValue.Parse(MediaTypeNames.Application.Json);
+ programRequestOptions.Content = JsonContent.Create(programIds, options: _jsonOptions);
using var innerResponse = await Send(programRequestOptions, true, info, cancellationToken).ConfigureAwait(false);
await using var innerResponseStream = await innerResponse.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs
index 90cf8f43b..ef049af4b 100644
--- a/MediaBrowser.Model/Configuration/LibraryOptions.cs
+++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs
@@ -81,6 +81,7 @@ namespace MediaBrowser.Model.Configuration
public bool RequirePerfectSubtitleMatch { get; set; }
public bool SaveSubtitlesWithMedia { get; set; }
+
public bool AutomaticallyAddToCollection { get; set; }
public TypeOptions[] TypeOptions { get; set; }
diff --git a/tests/Jellyfin.Server.Integration.Tests/AuthHelper.cs b/tests/Jellyfin.Server.Integration.Tests/AuthHelper.cs
index 4ea05397d..4c8f64d1e 100644
--- a/tests/Jellyfin.Server.Integration.Tests/AuthHelper.cs
+++ b/tests/Jellyfin.Server.Integration.Tests/AuthHelper.cs
@@ -1,6 +1,7 @@
using System;
using System.Net;
using System.Net.Http;
+using System.Net.Http.Json;
using System.Net.Http.Headers;
using System.Net.Mime;
using System.Text.Json;
@@ -26,14 +27,13 @@ namespace Jellyfin.Server.Integration.Tests
using var completeResponse = await client.PostAsync("/Startup/Complete", new ByteArrayContent(Array.Empty())).ConfigureAwait(false);
Assert.Equal(HttpStatusCode.NoContent, completeResponse.StatusCode);
- using var content = new ByteArrayContent(JsonSerializer.SerializeToUtf8Bytes(
+ using var content = JsonContent.Create(
new AuthenticateUserByName()
{
Username = user!.Name,
Pw = user.Password,
},
- jsonOptions));
- content.Headers.ContentType = MediaTypeHeaderValue.Parse(MediaTypeNames.Application.Json);
+ options: jsonOptions);
content.Headers.Add("X-Emby-Authorization", DummyAuthHeader);
using var authResponse = await client.PostAsync("/Users/AuthenticateByName", content).ConfigureAwait(false);
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/DlnaControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/DlnaControllerTests.cs
index 4421ced72..8a03583bb 100644
--- a/tests/Jellyfin.Server.Integration.Tests/Controllers/DlnaControllerTests.cs
+++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/DlnaControllerTests.cs
@@ -2,6 +2,7 @@ using System;
using System.Linq;
using System.Net;
using System.Net.Http;
+using System.Net.Http.Json;
using System.Net.Http.Headers;
using System.Net.Mime;
using System.Text;
@@ -62,8 +63,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
Name = "ThisProfileDoesNotExist"
};
- using var content = new ByteArrayContent(JsonSerializer.SerializeToUtf8Bytes(deviceProfile, _jsonOptions));
- content.Headers.ContentType = MediaTypeHeaderValue.Parse(MediaTypeNames.Application.Json);
+ using var content = JsonContent.Create(deviceProfile, options: _jsonOptions);
using var getResponse = await client.PostAsync("/Dlna/Profiles/" + NonExistentProfile, content).ConfigureAwait(false);
Assert.Equal(HttpStatusCode.NotFound, getResponse.StatusCode);
}
@@ -80,8 +80,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
Name = "ThisProfileIsNew"
};
- using var content = new ByteArrayContent(JsonSerializer.SerializeToUtf8Bytes(deviceProfile, _jsonOptions));
- content.Headers.ContentType = MediaTypeHeaderValue.Parse(MediaTypeNames.Application.Json);
+ using var content = JsonContent.Create(deviceProfile, options: _jsonOptions);
using var getResponse = await client.PostAsync("/Dlna/Profiles", content).ConfigureAwait(false);
Assert.Equal(HttpStatusCode.NoContent, getResponse.StatusCode);
}
@@ -120,8 +119,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
Id = _newDeviceProfileId
};
- using var content = new ByteArrayContent(JsonSerializer.SerializeToUtf8Bytes(updatedProfile, _jsonOptions));
- content.Headers.ContentType = MediaTypeHeaderValue.Parse(MediaTypeNames.Application.Json);
+ using var content = JsonContent.Create(updatedProfile, options: _jsonOptions);
using var getResponse = await client.PostAsync("/Dlna/Profiles", content).ConfigureAwait(false);
Assert.Equal(HttpStatusCode.NoContent, getResponse.StatusCode);
}
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/MediaStructureControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/MediaStructureControllerTests.cs
index 19d8381ea..a9713b4cb 100644
--- a/tests/Jellyfin.Server.Integration.Tests/Controllers/MediaStructureControllerTests.cs
+++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/MediaStructureControllerTests.cs
@@ -1,6 +1,7 @@
using System;
using System.Net;
using System.Net.Http;
+using System.Net.Http.Json;
using System.Net.Http.Headers;
using System.Net.Mime;
using System.Text.Json;
@@ -71,8 +72,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
Path = "/this/path/doesnt/exist"
};
- using var postContent = new ByteArrayContent(JsonSerializer.SerializeToUtf8Bytes(data, _jsonOptions));
- postContent.Headers.ContentType = MediaTypeHeaderValue.Parse(MediaTypeNames.Application.Json);
+ using var postContent = JsonContent.Create(data, options: _jsonOptions);
var response = await client.PostAsync("Library/VirtualFolders/Paths", postContent).ConfigureAwait(false);
Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);
@@ -90,8 +90,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
PathInfo = new MediaPathInfo("test")
};
- using var postContent = new ByteArrayContent(JsonSerializer.SerializeToUtf8Bytes(data, _jsonOptions));
- postContent.Headers.ContentType = MediaTypeHeaderValue.Parse(MediaTypeNames.Application.Json);
+ using var postContent = JsonContent.Create(data, options: _jsonOptions);
var response = await client.PostAsync("Library/VirtualFolders/Paths/Update", postContent).ConfigureAwait(false);
Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs
index 9c0fc72f6..d9cde1dd9 100644
--- a/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs
+++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs
@@ -1,6 +1,7 @@
using System;
using System.Net;
using System.Net.Http;
+using System.Net.Http.Json;
using System.Net.Http.Headers;
using System.Net.Mime;
using System.Text.Json;
@@ -36,8 +37,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
PreferredMetadataLanguage = "nl"
};
- using var postContent = new ByteArrayContent(JsonSerializer.SerializeToUtf8Bytes(config, _jsonOptions));
- postContent.Headers.ContentType = MediaTypeHeaderValue.Parse(MediaTypeNames.Application.Json);
+ using var postContent = JsonContent.Create(config, options: _jsonOptions);
using var postResponse = await client.PostAsync("/Startup/Configuration", postContent).ConfigureAwait(false);
Assert.Equal(HttpStatusCode.NoContent, postResponse.StatusCode);
@@ -80,8 +80,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
Password = "NewPassword"
};
- using var postContent = new ByteArrayContent(JsonSerializer.SerializeToUtf8Bytes(user, _jsonOptions));
- postContent.Headers.ContentType = MediaTypeHeaderValue.Parse(MediaTypeNames.Application.Json);
+ using var postContent = JsonContent.Create(user, options: _jsonOptions);
var postResponse = await client.PostAsync("/Startup/User", postContent).ConfigureAwait(false);
Assert.Equal(HttpStatusCode.NoContent, postResponse.StatusCode);
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs
index 8866ab53c..0f8b930f1 100644
--- a/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs
+++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs
@@ -3,6 +3,7 @@ using System.Globalization;
using System.Linq;
using System.Net;
using System.Net.Http;
+using System.Net.Http.Json;
using System.Net.Http.Headers;
using System.Net.Mime;
using System.Text.Json;
@@ -32,15 +33,13 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
private Task CreateUserByName(HttpClient httpClient, CreateUserByName request)
{
- using var postContent = new ByteArrayContent(JsonSerializer.SerializeToUtf8Bytes(request, _jsonOpions));
- postContent.Headers.ContentType = MediaTypeHeaderValue.Parse(MediaTypeNames.Application.Json);
+ using var postContent = JsonContent.Create(request, options: _jsonOpions);
return httpClient.PostAsync("Users/New", postContent);
}
private Task UpdateUserPassword(HttpClient httpClient, Guid userId, UpdateUserPassword request)
{
- using var postContent = new ByteArrayContent(JsonSerializer.SerializeToUtf8Bytes(request, _jsonOpions));
- postContent.Headers.ContentType = MediaTypeHeaderValue.Parse(MediaTypeNames.Application.Json);
+ using var postContent = JsonContent.Create(request, options: _jsonOpions);
return httpClient.PostAsync("Users/" + userId.ToString("N", CultureInfo.InvariantCulture) + "/Password", postContent);
}
--
cgit v1.2.3
From 40be86eec0fa7f43b64d05f30adcfab88ad3c402 Mon Sep 17 00:00:00 2001
From: Bond_009
Date: Wed, 1 Dec 2021 15:58:23 +0100
Subject: Use PostAsJsonAsync where possible
---
.../Controllers/DlnaControllerTests.cs | 9 +++------
.../Controllers/MediaStructureControllerTests.cs | 6 ++----
.../Controllers/StartupControllerTests.cs | 6 ++----
.../Controllers/UserControllerTests.cs | 10 ++--------
4 files changed, 9 insertions(+), 22 deletions(-)
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/DlnaControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/DlnaControllerTests.cs
index 8a03583bb..4c46933aa 100644
--- a/tests/Jellyfin.Server.Integration.Tests/Controllers/DlnaControllerTests.cs
+++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/DlnaControllerTests.cs
@@ -63,8 +63,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
Name = "ThisProfileDoesNotExist"
};
- using var content = JsonContent.Create(deviceProfile, options: _jsonOptions);
- using var getResponse = await client.PostAsync("/Dlna/Profiles/" + NonExistentProfile, content).ConfigureAwait(false);
+ using var getResponse = await client.PostAsJsonAsync("/Dlna/Profiles/" + NonExistentProfile, deviceProfile, _jsonOptions).ConfigureAwait(false);
Assert.Equal(HttpStatusCode.NotFound, getResponse.StatusCode);
}
@@ -80,8 +79,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
Name = "ThisProfileIsNew"
};
- using var content = JsonContent.Create(deviceProfile, options: _jsonOptions);
- using var getResponse = await client.PostAsync("/Dlna/Profiles", content).ConfigureAwait(false);
+ using var getResponse = await client.PostAsJsonAsync("/Dlna/Profiles", deviceProfile, _jsonOptions).ConfigureAwait(false);
Assert.Equal(HttpStatusCode.NoContent, getResponse.StatusCode);
}
@@ -119,8 +117,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
Id = _newDeviceProfileId
};
- using var content = JsonContent.Create(updatedProfile, options: _jsonOptions);
- using var getResponse = await client.PostAsync("/Dlna/Profiles", content).ConfigureAwait(false);
+ using var getResponse = await client.PostAsJsonAsync("/Dlna/Profiles", updatedProfile, _jsonOptions).ConfigureAwait(false);
Assert.Equal(HttpStatusCode.NoContent, getResponse.StatusCode);
}
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/MediaStructureControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/MediaStructureControllerTests.cs
index a9713b4cb..2da5237db 100644
--- a/tests/Jellyfin.Server.Integration.Tests/Controllers/MediaStructureControllerTests.cs
+++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/MediaStructureControllerTests.cs
@@ -72,8 +72,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
Path = "/this/path/doesnt/exist"
};
- using var postContent = JsonContent.Create(data, options: _jsonOptions);
- var response = await client.PostAsync("Library/VirtualFolders/Paths", postContent).ConfigureAwait(false);
+ var response = await client.PostAsJsonAsync("Library/VirtualFolders/Paths", data, _jsonOptions).ConfigureAwait(false);
Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);
}
@@ -90,8 +89,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
PathInfo = new MediaPathInfo("test")
};
- using var postContent = JsonContent.Create(data, options: _jsonOptions);
- var response = await client.PostAsync("Library/VirtualFolders/Paths/Update", postContent).ConfigureAwait(false);
+ var response = await client.PostAsJsonAsync("Library/VirtualFolders/Paths/Update", data, _jsonOptions).ConfigureAwait(false);
Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
}
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs
index d9cde1dd9..ed92ce25a 100644
--- a/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs
+++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs
@@ -37,8 +37,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
PreferredMetadataLanguage = "nl"
};
- using var postContent = JsonContent.Create(config, options: _jsonOptions);
- using var postResponse = await client.PostAsync("/Startup/Configuration", postContent).ConfigureAwait(false);
+ using var postResponse = await client.PostAsJsonAsync("/Startup/Configuration", config, _jsonOptions).ConfigureAwait(false);
Assert.Equal(HttpStatusCode.NoContent, postResponse.StatusCode);
using var getResponse = await client.GetAsync("/Startup/Configuration").ConfigureAwait(false);
@@ -80,8 +79,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
Password = "NewPassword"
};
- using var postContent = JsonContent.Create(user, options: _jsonOptions);
- var postResponse = await client.PostAsync("/Startup/User", postContent).ConfigureAwait(false);
+ var postResponse = await client.PostAsJsonAsync("/Startup/User", user, _jsonOptions).ConfigureAwait(false);
Assert.Equal(HttpStatusCode.NoContent, postResponse.StatusCode);
var getResponse = await client.GetAsync("/Startup/User").ConfigureAwait(false);
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs
index 0f8b930f1..f11f276f8 100644
--- a/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs
+++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs
@@ -32,16 +32,10 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
}
private Task CreateUserByName(HttpClient httpClient, CreateUserByName request)
- {
- using var postContent = JsonContent.Create(request, options: _jsonOpions);
- return httpClient.PostAsync("Users/New", postContent);
- }
+ => httpClient.PostAsJsonAsync("Users/New", request, _jsonOpions);
private Task UpdateUserPassword(HttpClient httpClient, Guid userId, UpdateUserPassword request)
- {
- using var postContent = JsonContent.Create(request, options: _jsonOpions);
- return httpClient.PostAsync("Users/" + userId.ToString("N", CultureInfo.InvariantCulture) + "/Password", postContent);
- }
+ => httpClient.PostAsJsonAsync("Users/" + userId.ToString("N", CultureInfo.InvariantCulture) + "/Password", request, _jsonOpions);
[Fact]
[Priority(-1)]
--
cgit v1.2.3
From 5535b9c01f56bb789ae1125e64d9515019a052df Mon Sep 17 00:00:00 2001
From: cvium
Date: Thu, 2 Dec 2021 11:21:59 +0100
Subject: Reduce allocations
---
.../MediaInfo/FFProbeProvider.cs | 54 +++++++---------------
1 file changed, 17 insertions(+), 37 deletions(-)
diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs b/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs
index d4b5d8655..887a7f80c 100644
--- a/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs
+++ b/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs
@@ -38,17 +38,9 @@ namespace MediaBrowser.Providers.MediaInfo
IHasItemChangeMonitor
{
private readonly ILogger _logger;
- private readonly IMediaEncoder _mediaEncoder;
- private readonly IItemRepository _itemRepo;
- private readonly IBlurayExaminer _blurayExaminer;
- private readonly ILocalizationManager _localization;
- private readonly IEncodingManager _encodingManager;
- private readonly IServerConfigurationManager _config;
- private readonly ISubtitleManager _subtitleManager;
- private readonly IChapterManager _chapterManager;
- private readonly ILibraryManager _libraryManager;
- private readonly IMediaSourceManager _mediaSourceManager;
private readonly SubtitleResolver _subtitleResolver;
+ private readonly FFProbeVideoInfo _videoProber;
+ private readonly FFProbeAudioInfo _audioProber;
private readonly Task _cachedTask = Task.FromResult(ItemUpdateType.None);
@@ -66,18 +58,21 @@ namespace MediaBrowser.Providers.MediaInfo
ILibraryManager libraryManager)
{
_logger = logger;
- _mediaEncoder = mediaEncoder;
- _itemRepo = itemRepo;
- _blurayExaminer = blurayExaminer;
- _localization = localization;
- _encodingManager = encodingManager;
- _config = config;
- _subtitleManager = subtitleManager;
- _chapterManager = chapterManager;
- _libraryManager = libraryManager;
- _mediaSourceManager = mediaSourceManager;
_subtitleResolver = new SubtitleResolver(BaseItem.LocalizationManager);
+ _videoProber = new FFProbeVideoInfo(
+ _logger,
+ mediaSourceManager,
+ mediaEncoder,
+ itemRepo,
+ blurayExaminer,
+ localization,
+ encodingManager,
+ config,
+ subtitleManager,
+ chapterManager,
+ libraryManager);
+ _audioProber = new FFProbeAudioInfo(mediaSourceManager, mediaEncoder, itemRepo, libraryManager);
}
public string Name => "ffprobe";
@@ -177,20 +172,7 @@ namespace MediaBrowser.Providers.MediaInfo
FetchShortcutInfo(item);
}
- var prober = new FFProbeVideoInfo(
- _logger,
- _mediaSourceManager,
- _mediaEncoder,
- _itemRepo,
- _blurayExaminer,
- _localization,
- _encodingManager,
- _config,
- _subtitleManager,
- _chapterManager,
- _libraryManager);
-
- return prober.ProbeVideo(item, options, cancellationToken);
+ return _videoProber.ProbeVideo(item, options, cancellationToken);
}
private string NormalizeStrmLine(string line)
@@ -226,9 +208,7 @@ namespace MediaBrowser.Providers.MediaInfo
FetchShortcutInfo(item);
}
- var prober = new FFProbeAudioInfo(_mediaSourceManager, _mediaEncoder, _itemRepo, _libraryManager);
-
- return prober.Probe(item, options, cancellationToken);
+ return _audioProber.Probe(item, options, cancellationToken);
}
}
}
--
cgit v1.2.3
From 6193fdea698ad4486140bc6a00a9547ab979c8f7 Mon Sep 17 00:00:00 2001
From: Ahmed Rafiq
Date: Sat, 4 Dec 2021 19:50:48 +0600
Subject: Use MimeTypes package to determine MIME type
This simplifies the code since we don't have to keep large mappings of extensions and MIME types.
We still keep the ability to override the mappings for:
- filling in entries not present in the package, for e.g. ".azw3"
- picking preferred extensions, for e.g. MimeTypes provides ".conf" as a possible extionsion for "text/plain", and while that is correct, ".txt" would be preferrable
- compatibility reasons
---
MediaBrowser.Model/MediaBrowser.Model.csproj | 4 +
MediaBrowser.Model/Net/MimeTypes.cs | 147 +++++++-------------
tests/Jellyfin.Model.Tests/Net/MimeTypesTests.cs | 164 +++++++++++++++++++++++
3 files changed, 217 insertions(+), 98 deletions(-)
create mode 100644 tests/Jellyfin.Model.Tests/Net/MimeTypesTests.cs
diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj
index 70fef5d66..b1fbe864b 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -31,6 +31,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs
index 043cee2a2..ff8d1fbae 100644
--- a/MediaBrowser.Model/Net/MimeTypes.cs
+++ b/MediaBrowser.Model/Net/MimeTypes.cs
@@ -12,6 +12,10 @@ namespace MediaBrowser.Model.Net
///
/// Class MimeTypes.
///
+ ///
+ /// http://en.wikipedia.org/wiki/Internet_media_type
+ /// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
+ /// http://www.iana.org/assignments/media-types/media-types.xhtml
public static class MimeTypes
{
///
@@ -50,81 +54,26 @@ namespace MediaBrowser.Model.Net
".wtv",
};
- // http://en.wikipedia.org/wiki/Internet_media_type
- // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
- // http://www.iana.org/assignments/media-types/media-types.xhtml
- // Add more as needed
+ ///
+ /// Used for extensions not in or to override them.
+ ///
private static readonly Dictionary _mimeTypeLookup = new Dictionary(StringComparer.OrdinalIgnoreCase)
{
// Type application
- { ".7z", "application/x-7z-compressed" },
- { ".azw", "application/vnd.amazon.ebook" },
{ ".azw3", "application/vnd.amazon.ebook" },
- { ".cbz", "application/x-cbz" },
- { ".cbr", "application/epub+zip" },
- { ".eot", "application/vnd.ms-fontobject" },
- { ".epub", "application/epub+zip" },
- { ".js", "application/x-javascript" },
- { ".json", "application/json" },
- { ".m3u8", "application/x-mpegURL" },
- { ".map", "application/x-javascript" },
- { ".mobi", "application/x-mobipocket-ebook" },
- { ".opf", "application/oebps-package+xml" },
- { ".pdf", "application/pdf" },
- { ".rar", "application/vnd.rar" },
- { ".srt", "application/x-subrip" },
- { ".ttml", "application/ttml+xml" },
- { ".wasm", "application/wasm" },
- { ".xml", "application/xml" },
- { ".zip", "application/zip" },
// Type image
- { ".bmp", "image/bmp" },
- { ".gif", "image/gif" },
- { ".ico", "image/vnd.microsoft.icon" },
- { ".jpg", "image/jpeg" },
- { ".jpeg", "image/jpeg" },
- { ".png", "image/png" },
- { ".svg", "image/svg+xml" },
- { ".svgz", "image/svg+xml" },
{ ".tbn", "image/jpeg" },
- { ".tif", "image/tiff" },
- { ".tiff", "image/tiff" },
- { ".webp", "image/webp" },
-
- // Type font
- { ".ttf", "font/ttf" },
- { ".woff", "font/woff" },
- { ".woff2", "font/woff2" },
// Type text
{ ".ass", "text/x-ssa" },
{ ".ssa", "text/x-ssa" },
- { ".css", "text/css" },
- { ".csv", "text/csv" },
{ ".edl", "text/plain" },
- { ".rtf", "text/rtf" },
- { ".txt", "text/plain" },
- { ".vtt", "text/vtt" },
+ { ".html", "text/html; charset=UTF-8" },
+ { ".htm", "text/html; charset=UTF-8" },
// Type video
- { ".3gp", "video/3gpp" },
- { ".3g2", "video/3gpp2" },
- { ".asf", "video/x-ms-asf" },
- { ".avi", "video/x-msvideo" },
- { ".flv", "video/x-flv" },
- { ".mp4", "video/mp4" },
- { ".m4s", "video/mp4" },
- { ".m4v", "video/x-m4v" },
{ ".mpegts", "video/mp2t" },
- { ".mpg", "video/mpeg" },
- { ".mkv", "video/x-matroska" },
- { ".mov", "video/quicktime" },
- { ".mpd", "video/vnd.mpeg.dash.mpd" },
- { ".ogv", "video/ogg" },
- { ".ts", "video/mp2t" },
- { ".webm", "video/webm" },
- { ".wmv", "video/x-ms-wmv" },
// Type audio
{ ".aac", "audio/aac" },
@@ -133,37 +82,47 @@ namespace MediaBrowser.Model.Net
{ ".dsf", "audio/dsf" },
{ ".dsp", "audio/dsp" },
{ ".flac", "audio/flac" },
- { ".m4a", "audio/mp4" },
{ ".m4b", "audio/m4b" },
- { ".mid", "audio/midi" },
- { ".midi", "audio/midi" },
{ ".mp3", "audio/mpeg" },
- { ".oga", "audio/ogg" },
- { ".ogg", "audio/ogg" },
- { ".opus", "audio/ogg" },
{ ".vorbis", "audio/vorbis" },
- { ".wav", "audio/wav" },
{ ".webma", "audio/webm" },
- { ".wma", "audio/x-ms-wma" },
{ ".wv", "audio/x-wavpack" },
{ ".xsp", "audio/xsp" },
};
- private static readonly Dictionary _extensionLookup = CreateExtensionLookup();
-
- private static Dictionary CreateExtensionLookup()
+ private static readonly Dictionary _extensionLookup = new Dictionary(StringComparer.OrdinalIgnoreCase)
{
- var dict = _mimeTypeLookup
- .GroupBy(i => i.Value)
- .ToDictionary(x => x.Key, x => x.First().Key, StringComparer.OrdinalIgnoreCase);
+ // Type application
+ { "application/x-cbz", ".cbz" },
+ { "application/x-javascript", ".js" },
+ { "application/xml", ".xml" },
+ { "application/x-mpegURL", ".m3u8" },
+
+ // Type audio
+ { "audio/aac", ".aac" },
+ { "audio/ac3", ".ac3" },
+ { "audio/dsf", ".dsf" },
+ { "audio/dsp", ".dsp" },
+ { "audio/flac", ".flac" },
+ { "audio/m4b", ".m4b" },
+ { "audio/vorbis", ".vorbis" },
+ { "audio/x-ape", ".ape" },
+ { "audio/xsp", ".xsp" },
+ { "audio/x-wavpack", ".wv" },
- dict["image/jpg"] = ".jpg";
- dict["image/x-png"] = ".png";
+ // Type image
+ { "image/jpg", ".jpg" },
+ { "image/x-png", ".png" },
- dict["audio/x-aac"] = ".aac";
+ // Type text
+ { "text/plain", ".txt" },
+ { "text/rtf", ".rtf" },
+ { "text/x-ssa", ".ssa" },
- return dict;
- }
+ // Type video
+ { "video/vnd.mpeg.dash.mpd", ".mpd" },
+ { "video/x-matroska", ".mkv" },
+ };
public static string GetMimeType(string path) => GetMimeType(path, "application/octet-stream");
@@ -188,29 +147,15 @@ namespace MediaBrowser.Model.Net
return result;
}
- // Catch-all for all video types that don't require specific mime types
- if (_videoFileExtensions.Contains(ext))
- {
- return string.Concat("video/", ext.AsSpan(1));
- }
-
- // Type text
- if (string.Equals(ext, ".html", StringComparison.OrdinalIgnoreCase)
- || string.Equals(ext, ".htm", StringComparison.OrdinalIgnoreCase))
- {
- return "text/html; charset=UTF-8";
- }
-
- if (string.Equals(ext, ".log", StringComparison.OrdinalIgnoreCase)
- || string.Equals(ext, ".srt", StringComparison.OrdinalIgnoreCase))
+ if (Model.MimeTypes.TryGetMimeType(filename, out var mimeType))
{
- return "text/plain";
+ return mimeType;
}
- // Misc
- if (string.Equals(ext, ".dll", StringComparison.OrdinalIgnoreCase))
+ // Catch-all for all video types that don't require specific mime types
+ if (_videoFileExtensions.Contains(ext))
{
- return "application/octet-stream";
+ return string.Concat("video/", ext.AsSpan(1));
}
return defaultValue;
@@ -231,6 +176,12 @@ namespace MediaBrowser.Model.Net
return result;
}
+ var extensions = Model.MimeTypes.GetMimeTypeExtensions(mimeType);
+ if (extensions.Any())
+ {
+ return "." + extensions.First();
+ }
+
return null;
}
}
diff --git a/tests/Jellyfin.Model.Tests/Net/MimeTypesTests.cs b/tests/Jellyfin.Model.Tests/Net/MimeTypesTests.cs
new file mode 100644
index 000000000..b82607bf0
--- /dev/null
+++ b/tests/Jellyfin.Model.Tests/Net/MimeTypesTests.cs
@@ -0,0 +1,164 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MediaBrowser.Model.Net;
+using Xunit;
+
+namespace Jellyfin.Model.Tests.Net
+{
+ public class MimeTypesTests
+ {
+ [Theory]
+ [InlineData(".dll", "application/octet-stream")]
+ [InlineData(".log", "text/plain")]
+ [InlineData(".srt", "application/x-subrip")]
+ [InlineData(".html", "text/html; charset=UTF-8")]
+ [InlineData(".htm", "text/html; charset=UTF-8")]
+ [InlineData(".7z", "application/x-7z-compressed")]
+ [InlineData(".azw", "application/vnd.amazon.ebook")]
+ [InlineData(".azw3", "application/vnd.amazon.ebook")]
+ [InlineData(".eot", "application/vnd.ms-fontobject")]
+ [InlineData(".epub", "application/epub+zip")]
+ [InlineData(".json", "application/json")]
+ [InlineData(".mobi", "application/x-mobipocket-ebook")]
+ [InlineData(".opf", "application/oebps-package+xml")]
+ [InlineData(".pdf", "application/pdf")]
+ [InlineData(".rar", "application/vnd.rar")]
+ [InlineData(".ttml", "application/ttml+xml")]
+ [InlineData(".wasm", "application/wasm")]
+ [InlineData(".xml", "application/xml")]
+ [InlineData(".zip", "application/zip")]
+ [InlineData(".bmp", "image/bmp")]
+ [InlineData(".gif", "image/gif")]
+ [InlineData(".ico", "image/vnd.microsoft.icon")]
+ [InlineData(".jpg", "image/jpeg")]
+ [InlineData(".jpeg", "image/jpeg")]
+ [InlineData(".png", "image/png")]
+ [InlineData(".svg", "image/svg+xml")]
+ [InlineData(".svgz", "image/svg+xml")]
+ [InlineData(".tbn", "image/jpeg")]
+ [InlineData(".tif", "image/tiff")]
+ [InlineData(".tiff", "image/tiff")]
+ [InlineData(".webp", "image/webp")]
+ [InlineData(".ttf", "font/ttf")]
+ [InlineData(".woff", "font/woff")]
+ [InlineData(".woff2", "font/woff2")]
+ [InlineData(".ass", "text/x-ssa")]
+ [InlineData(".ssa", "text/x-ssa")]
+ [InlineData(".css", "text/css")]
+ [InlineData(".csv", "text/csv")]
+ [InlineData(".edl", "text/plain")]
+ [InlineData(".txt", "text/plain")]
+ [InlineData(".vtt", "text/vtt")]
+ [InlineData(".3gp", "video/3gpp")]
+ [InlineData(".3g2", "video/3gpp2")]
+ [InlineData(".asf", "video/x-ms-asf")]
+ [InlineData(".avi", "video/x-msvideo")]
+ [InlineData(".flv", "video/x-flv")]
+ [InlineData(".mp4", "video/mp4")]
+ [InlineData(".m4v", "video/x-m4v")]
+ [InlineData(".mpegts", "video/mp2t")]
+ [InlineData(".mpg", "video/mpeg")]
+ [InlineData(".mkv", "video/x-matroska")]
+ [InlineData(".mov", "video/quicktime")]
+ [InlineData(".ogv", "video/ogg")]
+ [InlineData(".ts", "video/mp2t")]
+ [InlineData(".webm", "video/webm")]
+ [InlineData(".wmv", "video/x-ms-wmv")]
+ [InlineData(".aac", "audio/aac")]
+ [InlineData(".ac3", "audio/ac3")]
+ [InlineData(".ape", "audio/x-ape")]
+ [InlineData(".dsf", "audio/dsf")]
+ [InlineData(".dsp", "audio/dsp")]
+ [InlineData(".flac", "audio/flac")]
+ [InlineData(".m4a", "audio/mp4")]
+ [InlineData(".m4b", "audio/m4b")]
+ [InlineData(".mid", "audio/midi")]
+ [InlineData(".midi", "audio/midi")]
+ [InlineData(".mp3", "audio/mpeg")]
+ [InlineData(".oga", "audio/ogg")]
+ [InlineData(".ogg", "audio/ogg")]
+ [InlineData(".opus", "audio/ogg")]
+ [InlineData(".vorbis", "audio/vorbis")]
+ [InlineData(".wav", "audio/wav")]
+ [InlineData(".webma", "audio/webm")]
+ [InlineData(".wma", "audio/x-ms-wma")]
+ [InlineData(".wv", "audio/x-wavpack")]
+ [InlineData(".xsp", "audio/xsp")]
+ public void GetMimeType(string input, string expectedResult)
+ {
+ Assert.Equal(expectedResult, MimeTypes.GetMimeType(input, null));
+ }
+
+ [Theory]
+ [InlineData("application/epub+zip", ".epub")]
+ [InlineData("application/json", ".json")]
+ [InlineData("application/oebps-package+xml", ".opf")]
+ [InlineData("application/pdf", ".pdf")]
+ [InlineData("application/ttml+xml", ".ttml")]
+ [InlineData("application/vnd.amazon.ebook", ".azw")]
+ [InlineData("application/vnd.ms-fontobject", ".eot")]
+ [InlineData("application/vnd.rar", ".rar")]
+ [InlineData("application/wasm", ".wasm")]
+ [InlineData("application/x-7z-compressed", ".7z")]
+ [InlineData("application/x-cbz", ".cbz")]
+ [InlineData("application/x-javascript", ".js")]
+ [InlineData("application/x-mobipocket-ebook", ".mobi")]
+ [InlineData("application/x-mpegURL", ".m3u8")]
+ [InlineData("application/x-subrip", ".srt")]
+ [InlineData("application/xml", ".xml")]
+ [InlineData("application/zip", ".zip")]
+ [InlineData("audio/aac", ".aac")]
+ [InlineData("audio/ac3", ".ac3")]
+ [InlineData("audio/dsf", ".dsf")]
+ [InlineData("audio/dsp", ".dsp")]
+ [InlineData("audio/flac", ".flac")]
+ [InlineData("audio/m4b", ".m4b")]
+ [InlineData("audio/mp4", ".m4a")]
+ [InlineData("audio/vorbis", ".vorbis")]
+ [InlineData("audio/wav", ".wav")]
+ [InlineData("audio/x-aac", ".aac")]
+ [InlineData("audio/x-ape", ".ape")]
+ [InlineData("audio/x-ms-wma", ".wma")]
+ [InlineData("audio/x-wavpack", ".wv")]
+ [InlineData("audio/xsp", ".xsp")]
+ [InlineData("font/ttf", ".ttf")]
+ [InlineData("font/woff", ".woff")]
+ [InlineData("font/woff2", ".woff2")]
+ [InlineData("image/bmp", ".bmp")]
+ [InlineData("image/gif", ".gif")]
+ [InlineData("image/jpg", ".jpg")]
+ [InlineData("image/png", ".png")]
+ [InlineData("image/svg+xml", ".svg")]
+ [InlineData("image/tiff", ".tif")]
+ [InlineData("image/vnd.microsoft.icon", ".ico")]
+ [InlineData("image/webp", ".webp")]
+ [InlineData("image/x-png", ".png")]
+ [InlineData("text/css", ".css")]
+ [InlineData("text/csv", ".csv")]
+ [InlineData("text/plain", ".txt")]
+ [InlineData("text/rtf", ".rtf")]
+ [InlineData("text/vtt", ".vtt")]
+ [InlineData("text/x-ssa", ".ssa")]
+ [InlineData("video/3gpp", ".3gp")]
+ [InlineData("video/3gpp2", ".3g2")]
+ [InlineData("video/mp2t", ".ts")]
+ [InlineData("video/mp4", ".mp4")]
+ [InlineData("video/ogg", ".ogv")]
+ [InlineData("video/quicktime", ".mov")]
+ [InlineData("video/vnd.mpeg.dash.mpd", ".mpd")]
+ [InlineData("video/webm", ".webm")]
+ [InlineData("video/x-flv", ".flv")]
+ [InlineData("video/x-m4v", ".m4v")]
+ [InlineData("video/x-matroska", ".mkv")]
+ [InlineData("video/x-ms-asf", ".asf")]
+ [InlineData("video/x-ms-wmv", ".wmv")]
+ [InlineData("video/x-msvideo", ".avi")]
+ public void ToExtension(string input, string expectedResult)
+ {
+ Assert.Equal(expectedResult, MimeTypes.ToExtension(input));
+ }
+ }
+}
--
cgit v1.2.3
From 40e05a7993599c43b58acb34f59ca5149dc76040 Mon Sep 17 00:00:00 2001
From: Ahmed Rafiq
Date: Sat, 4 Dec 2021 21:06:51 +0600
Subject: Update documentation
---
MediaBrowser.Model/Net/MimeTypes.cs | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs
index ff8d1fbae..18a3f8259 100644
--- a/MediaBrowser.Model/Net/MimeTypes.cs
+++ b/MediaBrowser.Model/Net/MimeTypes.cs
@@ -13,9 +13,14 @@ namespace MediaBrowser.Model.Net
/// Class MimeTypes.
///
///
- /// http://en.wikipedia.org/wiki/Internet_media_type
- /// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
- /// http://www.iana.org/assignments/media-types/media-types.xhtml
+ ///
+ /// For more information on MIME types:
+ ///
+ /// http://en.wikipedia.org/wiki/Internet_media_type
+ /// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
+ /// http://www.iana.org/assignments/media-types/media-types.xhtml
+ ///
+ ///
public static class MimeTypes
{
///
--
cgit v1.2.3
From 0e491025aec8ef11acf86b189b5e16692fb8d4a6 Mon Sep 17 00:00:00 2001
From: Ahmed Rafiq
Date: Sat, 4 Dec 2021 21:13:18 +0600
Subject: Refactor MimeTypes.ToExtension()
Co-authored-by: Cody Robibero
---
MediaBrowser.Model/Net/MimeTypes.cs | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs
index 18a3f8259..506e8e9d6 100644
--- a/MediaBrowser.Model/Net/MimeTypes.cs
+++ b/MediaBrowser.Model/Net/MimeTypes.cs
@@ -181,13 +181,8 @@ namespace MediaBrowser.Model.Net
return result;
}
- var extensions = Model.MimeTypes.GetMimeTypeExtensions(mimeType);
- if (extensions.Any())
- {
- return "." + extensions.First();
- }
-
- return null;
+ var extension = Model.MimeTypes.GetMimeTypeExtensions(mimeType).FirstOrDefault();
+ return string.IsNullOrEmpty(extension) ? null : "." + extension;
}
}
}
--
cgit v1.2.3
From fa6f6515a6874a5fca4267c50e6c597a2042ad96 Mon Sep 17 00:00:00 2001
From: Ahmed Rafiq
Date: Sat, 4 Dec 2021 21:14:16 +0600
Subject: Update unit test name
Co-authored-by: Claus Vium
---
tests/Jellyfin.Model.Tests/Net/MimeTypesTests.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Jellyfin.Model.Tests/Net/MimeTypesTests.cs b/tests/Jellyfin.Model.Tests/Net/MimeTypesTests.cs
index b82607bf0..637424e27 100644
--- a/tests/Jellyfin.Model.Tests/Net/MimeTypesTests.cs
+++ b/tests/Jellyfin.Model.Tests/Net/MimeTypesTests.cs
@@ -87,7 +87,7 @@ namespace Jellyfin.Model.Tests.Net
[InlineData(".wma", "audio/x-ms-wma")]
[InlineData(".wv", "audio/x-wavpack")]
[InlineData(".xsp", "audio/xsp")]
- public void GetMimeType(string input, string expectedResult)
+ public void GetMimeType_Valid_ReturnsCorrectResult(string input, string expectedResult)
{
Assert.Equal(expectedResult, MimeTypes.GetMimeType(input, null));
}
--
cgit v1.2.3
From cf75f99f0e4d765cc7dfa928b3a508121f538db4 Mon Sep 17 00:00:00 2001
From: Ahmed Rafiq
Date: Sat, 4 Dec 2021 21:14:52 +0600
Subject: Update unit test name
Co-authored-by: Claus Vium
---
tests/Jellyfin.Model.Tests/Net/MimeTypesTests.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Jellyfin.Model.Tests/Net/MimeTypesTests.cs b/tests/Jellyfin.Model.Tests/Net/MimeTypesTests.cs
index 637424e27..55050cc95 100644
--- a/tests/Jellyfin.Model.Tests/Net/MimeTypesTests.cs
+++ b/tests/Jellyfin.Model.Tests/Net/MimeTypesTests.cs
@@ -156,7 +156,7 @@ namespace Jellyfin.Model.Tests.Net
[InlineData("video/x-ms-asf", ".asf")]
[InlineData("video/x-ms-wmv", ".wmv")]
[InlineData("video/x-msvideo", ".avi")]
- public void ToExtension(string input, string expectedResult)
+ public void ToExtension_Valid_ReturnsCorrectResult(string input, string expectedResult)
{
Assert.Equal(expectedResult, MimeTypes.ToExtension(input));
}
--
cgit v1.2.3
From 46543ead27e65bf3bd689883795660da07e99c47 Mon Sep 17 00:00:00 2001
From: archon eleven
Date: Mon, 6 Dec 2021 08:45:36 +0000
Subject: Translated using Weblate (Malay) Translation: Jellyfin/Jellyfin
Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ms/
---
.../Localization/Core/ms.json | 34 +++++++++++-----------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/ms.json b/Emby.Server.Implementations/Localization/Core/ms.json
index 4dcb99293..94ee389d7 100644
--- a/Emby.Server.Implementations/Localization/Core/ms.json
+++ b/Emby.Server.Implementations/Localization/Core/ms.json
@@ -37,7 +37,7 @@
"MessageNamedServerConfigurationUpdatedWithValue": "Konfigurasi pelayan di bahagian {0} telah dikemas kini",
"MessageServerConfigurationUpdated": "Konfigurasi pelayan telah dikemas kini",
"MixedContent": "Kandungan campuran",
- "Movies": "Filem",
+ "Movies": "Filem-filem",
"Music": "Muzik",
"MusicVideos": "",
"NameInstallFailed": "{0} pemasangan gagal",
@@ -53,23 +53,23 @@
"NotificationOptionNewLibraryContent": "Kandungan baru telah ditambah",
"NotificationOptionPluginError": "Kegagalan plugin",
"NotificationOptionPluginInstalled": "Plugin telah dipasang",
- "NotificationOptionPluginUninstalled": "Plugin uninstalled",
- "NotificationOptionPluginUpdateInstalled": "Plugin update installed",
+ "NotificationOptionPluginUninstalled": "Plugin telah dinyahpasang",
+ "NotificationOptionPluginUpdateInstalled": "Kemaskini plugin telah dipasang",
"NotificationOptionServerRestartRequired": "Server restart required",
- "NotificationOptionTaskFailed": "Scheduled task failure",
- "NotificationOptionUserLockedOut": "User locked out",
- "NotificationOptionVideoPlayback": "Video playback started",
+ "NotificationOptionTaskFailed": "Kegagalan tugas berjadual",
+ "NotificationOptionUserLockedOut": "Pengguna telah dikunci",
+ "NotificationOptionVideoPlayback": "Ulangmain video bermula",
"NotificationOptionVideoPlaybackStopped": "Ulangmain video dihentikan",
"Photos": "Gambar-gambar",
"Playlists": "Senarai main",
"Plugin": "Plugin",
- "PluginInstalledWithName": "{0} was installed",
- "PluginUninstalledWithName": "{0} was uninstalled",
- "PluginUpdatedWithName": "{0} was updated",
+ "PluginInstalledWithName": "{0} telah dipasang",
+ "PluginUninstalledWithName": "{0} telah dinyahpasang",
+ "PluginUpdatedWithName": "{0} telah dikemaskini",
"ProviderValue": "Provider: {0}",
"ScheduledTaskFailedWithName": "{0} gagal",
"ScheduledTaskStartedWithName": "{0} bermula",
- "ServerNameNeedsToBeRestarted": "{0} needs to be restarted",
+ "ServerNameNeedsToBeRestarted": "{0} perlu di ulangmula",
"Shows": "Series",
"Songs": "Lagu-lagu",
"StartupEmbyServerIsLoading": "Pelayan Jellyfin sedang dimuatkan. Sila cuba sebentar lagi.",
@@ -77,19 +77,19 @@
"SubtitleDownloadFailureFromForItem": "Muat turun sarikata gagal dari {0} untuk {1}",
"Sync": "Sync",
"System": "Sistem",
- "TvShows": "TV Shows",
+ "TvShows": "Tayangan TV",
"User": "User",
- "UserCreatedWithName": "User {0} has been created",
- "UserDeletedWithName": "User {0} has been deleted",
- "UserDownloadingItemWithValues": "{0} is downloading {1}",
+ "UserCreatedWithName": "Pengguna {0} telah diwujudkan",
+ "UserDeletedWithName": "Pengguna {0} telah dipadamkan",
+ "UserDownloadingItemWithValues": "{0} sedang memuat turun {1}",
"UserLockedOutWithName": "Pengguna {0} telah dikunci",
"UserOfflineFromDevice": "{0} telah terputus dari {1}",
"UserOnlineFromDevice": "{0} berada dalam talian dari {1}",
"UserPasswordChangedWithName": "Kata laluan telah ditukar bagi pengguna {0}",
"UserPolicyUpdatedWithName": "Dasar pengguna telah dikemas kini untuk {0}",
- "UserStartedPlayingItemWithValues": "{0} is playing {1} on {2}",
- "UserStoppedPlayingItemWithValues": "{0} has finished playing {1} on {2}",
- "ValueHasBeenAddedToLibrary": "{0} has been added to your media library",
+ "UserStartedPlayingItemWithValues": "{0} sedang dimainkan {1} pada {2}",
+ "UserStoppedPlayingItemWithValues": "{0} telah tamat dimainkan {1} pada {2}",
+ "ValueHasBeenAddedToLibrary": "{0} telah ditambah ke media library anda",
"ValueSpecialEpisodeName": "Khas - {0}",
"VersionNumber": "Versi {0}",
"TaskCleanActivityLog": "Log Aktiviti Bersih",
--
cgit v1.2.3
From 838adaea48cf9e1434524b509c03dc3cdff0520e Mon Sep 17 00:00:00 2001
From: Mehyar
Date: Sun, 5 Dec 2021 16:44:04 +0000
Subject: Translated using Weblate (Arabic) Translation: Jellyfin/Jellyfin
Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ar/
---
Emby.Server.Implementations/Localization/Core/ar.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Emby.Server.Implementations/Localization/Core/ar.json b/Emby.Server.Implementations/Localization/Core/ar.json
index a83a453b4..570d600fc 100644
--- a/Emby.Server.Implementations/Localization/Core/ar.json
+++ b/Emby.Server.Implementations/Localization/Core/ar.json
@@ -11,7 +11,7 @@
"Collections": "التجميعات",
"DeviceOfflineWithName": "قُطِع الاتصال ب{0}",
"DeviceOnlineWithName": "{0} متصل",
- "FailedLoginAttemptWithUserName": "عملية تسجيل الدخول فشلت من {0}",
+ "FailedLoginAttemptWithUserName": "محاولة تسجيل الدخول فشلت من {0}",
"Favorites": "مفضلات",
"Folders": "المجلدات",
"Genres": "التضنيفات",
--
cgit v1.2.3
From bd48b74d5bec29c6163c0d0a09018b6eaadbebfa Mon Sep 17 00:00:00 2001
From: oxixes
Date: Sun, 5 Dec 2021 03:50:45 +0000
Subject: Translated using Weblate (Spanish) Translation: Jellyfin/Jellyfin
Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/es/
---
Emby.Server.Implementations/Localization/Core/es.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/es.json b/Emby.Server.Implementations/Localization/Core/es.json
index d3d9d2703..f8c69712e 100644
--- a/Emby.Server.Implementations/Localization/Core/es.json
+++ b/Emby.Server.Implementations/Localization/Core/es.json
@@ -15,8 +15,8 @@
"Favorites": "Favoritos",
"Folders": "Carpetas",
"Genres": "Géneros",
- "HeaderAlbumArtists": "Artista del álbum",
- "HeaderContinueWatching": "Continuar viendo",
+ "HeaderAlbumArtists": "Artistas del álbum",
+ "HeaderContinueWatching": "Seguir viendo",
"HeaderFavoriteAlbums": "Álbumes favoritos",
"HeaderFavoriteArtists": "Artistas favoritos",
"HeaderFavoriteEpisodes": "Episodios favoritos",
--
cgit v1.2.3
From 60f4d70cc5e1326bcead2717da47da98ebf73696 Mon Sep 17 00:00:00 2001
From: Bas Goos
Date: Sat, 4 Dec 2021 14:32:55 +0000
Subject: Translated using Weblate (Dutch) Translation: Jellyfin/Jellyfin
Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/nl/
---
Emby.Server.Implementations/Localization/Core/nl.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Emby.Server.Implementations/Localization/Core/nl.json b/Emby.Server.Implementations/Localization/Core/nl.json
index 79f921bcb..9d512dea1 100644
--- a/Emby.Server.Implementations/Localization/Core/nl.json
+++ b/Emby.Server.Implementations/Localization/Core/nl.json
@@ -15,7 +15,7 @@
"Favorites": "Favorieten",
"Folders": "Mappen",
"Genres": "Genres",
- "HeaderAlbumArtists": "Artiests Album",
+ "HeaderAlbumArtists": "Album Artiesten",
"HeaderContinueWatching": "Kijken hervatten",
"HeaderFavoriteAlbums": "Favoriete albums",
"HeaderFavoriteArtists": "Favoriete artiesten",
--
cgit v1.2.3
From 9d387c542a6b5e7c513de247362df01da3d1fed4 Mon Sep 17 00:00:00 2001
From: mio2
Date: Sun, 5 Dec 2021 16:44:14 +0000
Subject: Translated using Weblate (Japanese) Translation: Jellyfin/Jellyfin
Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ja/
---
Emby.Server.Implementations/Localization/Core/ja.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/ja.json b/Emby.Server.Implementations/Localization/Core/ja.json
index c689bc58a..7f41561ec 100644
--- a/Emby.Server.Implementations/Localization/Core/ja.json
+++ b/Emby.Server.Implementations/Localization/Core/ja.json
@@ -11,11 +11,11 @@
"Collections": "コレクション",
"DeviceOfflineWithName": "{0} が切断されました",
"DeviceOnlineWithName": "{0} が接続されました",
- "FailedLoginAttemptWithUserName": "ログインを試行しましたが {0}によって失敗しました",
+ "FailedLoginAttemptWithUserName": "ログインを試行しましたが {0} によって失敗しました",
"Favorites": "お気に入り",
"Folders": "フォルダー",
"Genres": "ジャンル",
- "HeaderAlbumArtists": "アーティストのアルバム",
+ "HeaderAlbumArtists": "アルバムアーティスト",
"HeaderContinueWatching": "視聴を続ける",
"HeaderFavoriteAlbums": "お気に入りのアルバム",
"HeaderFavoriteArtists": "お気に入りのアーティスト",
--
cgit v1.2.3
From 2d77c729f2c2de42c428d3b7c2564ed721a862ea Mon Sep 17 00:00:00 2001
From: mikixd586
Date: Sat, 4 Dec 2021 07:52:17 +0000
Subject: Translated using Weblate (Serbian) Translation: Jellyfin/Jellyfin
Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/sr/
---
Emby.Server.Implementations/Localization/Core/sr.json | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/sr.json b/Emby.Server.Implementations/Localization/Core/sr.json
index 2d6f3d53d..e31208e80 100644
--- a/Emby.Server.Implementations/Localization/Core/sr.json
+++ b/Emby.Server.Implementations/Localization/Core/sr.json
@@ -64,7 +64,7 @@
"ItemRemovedWithName": "{0} уклоњено из библиотеке",
"ItemAddedWithName": "{0} додато у библиотеку",
"Inherit": "Наследи",
- "HomeVideos": "Кућни видео",
+ "HomeVideos": "Кућни Видео",
"HeaderRecordingGroups": "Групе снимања",
"HeaderNextUp": "Следи",
"HeaderLiveTV": "ТВ уживо",
@@ -117,5 +117,6 @@
"TaskCleanActivityLog": "Очисти историју активности",
"Undefined": "Недефинисано",
"Forced": "Принудно",
- "Default": "Подразумевано"
+ "Default": "Подразумевано",
+ "TaskOptimizeDatabase": "Оптимизуј датабазу"
}
--
cgit v1.2.3
From 5eff80fb8cb36ad6a7e22a090bcf6cc0a2ceeaea Mon Sep 17 00:00:00 2001
From: WWWesten
Date: Sat, 4 Dec 2021 18:56:50 +0000
Subject: Translated using Weblate (Macedonian) Translation: Jellyfin/Jellyfin
Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/mk/
---
Emby.Server.Implementations/Localization/Core/mk.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Emby.Server.Implementations/Localization/Core/mk.json b/Emby.Server.Implementations/Localization/Core/mk.json
index 6baedcb2d..d7839be57 100644
--- a/Emby.Server.Implementations/Localization/Core/mk.json
+++ b/Emby.Server.Implementations/Localization/Core/mk.json
@@ -5,7 +5,7 @@
"PluginUninstalledWithName": "{0} беше успешно деинсталирано",
"PluginInstalledWithName": "{0} беше успешно инсталирано",
"Plugin": "Додатоци",
- "Playlists": "Листи",
+ "Playlists": "Плејлисти",
"Photos": "Слики",
"NotificationOptionVideoPlaybackStopped": "Видео стопирано",
"NotificationOptionVideoPlayback": "Видео пуштено",
--
cgit v1.2.3
From 9b71bf8cfec4d7685057f4c5035edc72f8a8eb34 Mon Sep 17 00:00:00 2001
From: WWWesten
Date: Sat, 4 Dec 2021 18:54:17 +0000
Subject: Translated using Weblate (Nepali) Translation: Jellyfin/Jellyfin
Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ne/
---
Emby.Server.Implementations/Localization/Core/ne.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Emby.Server.Implementations/Localization/Core/ne.json b/Emby.Server.Implementations/Localization/Core/ne.json
index 8e820d40c..8584fc065 100644
--- a/Emby.Server.Implementations/Localization/Core/ne.json
+++ b/Emby.Server.Implementations/Localization/Core/ne.json
@@ -69,7 +69,7 @@
"UserDeletedWithName": "प्रयोगकर्ता {0} हटाइएको छ",
"UserCreatedWithName": "प्रयोगकर्ता {0} सिर्जना गरिएको छ",
"User": "प्रयोगकर्ता",
- "PluginInstalledWithName": "",
+ "PluginInstalledWithName": "{0} सभएको थियो",
"StartupEmbyServerIsLoading": "Jellyfin सर्भर लोड हुँदैछ। कृपया छिट्टै फेरि प्रयास गर्नुहोस्।",
"Songs": "गीतहरू",
"Shows": "शोहरू",
--
cgit v1.2.3
From b9b39592237de51be64dec11271f93268c3a45e2 Mon Sep 17 00:00:00 2001
From: WWWesten
Date: Fri, 3 Dec 2021 09:36:27 +0000
Subject: Translated using Weblate (Punjabi) Translation: Jellyfin/Jellyfin
Translate-URL:
https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/pa/
---
Emby.Server.Implementations/Localization/Core/pa.json | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/Emby.Server.Implementations/Localization/Core/pa.json b/Emby.Server.Implementations/Localization/Core/pa.json
index d1db09232..4ac57b630 100644
--- a/Emby.Server.Implementations/Localization/Core/pa.json
+++ b/Emby.Server.Implementations/Localization/Core/pa.json
@@ -24,7 +24,7 @@
"TasksLibraryCategory": "ਲਾਇਬ੍ਰੇਰੀ",
"TasksMaintenanceCategory": "ਰੱਖ-ਰਖਾਅ",
"VersionNumber": "ਵਰਜਨ {0}",
- "ValueSpecialEpisodeName": "ਵਿਸ਼ੇਸ਼ - {0}",
+ "ValueSpecialEpisodeName": "ਖਾਸ - {0}",
"ValueHasBeenAddedToLibrary": "{0} ਤੁਹਾਡੀ ਮੀਡੀਆ ਲਾਇਬ੍ਰੇਰੀ ਵਿੱਚ ਸ਼ਾਮਲ ਕੀਤਾ ਗਿਆ ਹੈ",
"UserStoppedPlayingItemWithValues": "{0} ਨੇ {2} 'ਤੇ {1} ਖੇਡਣਾ ਪੂਰਾ ਕਰ ਲਿਆ ਹੈ",
"UserStartedPlayingItemWithValues": "{0} {2} 'ਤੇ {1} ਖੇਡ ਰਿਹਾ ਹੈ",
@@ -43,8 +43,8 @@
"Sync": "ਸਿੰਕ",
"SubtitleDownloadFailureFromForItem": "ਉਪਸਿਰਲੇਖ {1} ਲਈ {0} ਤੋਂ ਡਾ toਨਲੋਡ ਕਰਨ ਵਿੱਚ ਅਸਫਲ ਰਹੇ",
"StartupEmbyServerIsLoading": "ਜੈਲੀਫਿਨ ਸਰਵਰ ਲੋਡ ਹੋ ਰਿਹਾ ਹੈ. ਕਿਰਪਾ ਕਰਕੇ ਜਲਦੀ ਹੀ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ.",
- "Songs": "ਗਾਣੇ",
- "Shows": "ਸ਼ੋਅਜ਼",
+ "Songs": "ਗਾਣੇਂ",
+ "Shows": "ਸ਼ੋਅ",
"ServerNameNeedsToBeRestarted": "{0} ਮੁੜ ਚਾਲੂ ਕਰਨ ਦੀ ਲੋੜ ਹੈ",
"ScheduledTaskStartedWithName": "{0} ਸ਼ੁਰੂ ਹੋਇਆ",
"ScheduledTaskFailedWithName": "{0} ਅਸਫਲ",
@@ -53,7 +53,7 @@
"PluginUninstalledWithName": "{0} ਅਣਇੰਸਟੌਲ ਕੀਤਾ ਗਿਆ ਸੀ",
"PluginInstalledWithName": "{0} ਲਗਾਇਆ ਗਿਆ ਸੀ",
"Plugin": "ਪਲੱਗਇਨ",
- "Playlists": "ਪਲੇਲਿਸਟਸ",
+ "Playlists": "ਪਲੇਸੂਚੀਆਂ",
"Photos": "ਫੋਟੋਆਂ",
"NotificationOptionVideoPlaybackStopped": "ਵੀਡੀਓ ਪਲੇਬੈਕ ਰੋਕਿਆ ਗਿਆ",
"NotificationOptionVideoPlayback": "ਵੀਡੀਓ ਪਲੇਬੈਕ ਸ਼ੁਰੂ ਹੋਇਆ",
@@ -102,13 +102,13 @@
"HeaderAlbumArtists": "ਐਲਬਮ ਕਲਾਕਾਰ",
"Genres": "ਸ਼ੈਲੀਆਂ",
"Forced": "ਮਜਬੂਰ",
- "Folders": "ਫੋਲਡਰ",
+ "Folders": "ਫੋਲਡਰਸ",
"Favorites": "ਮਨਪਸੰਦ",
"FailedLoginAttemptWithUserName": "ਤੋਂ ਲਾਗਇਨ ਕੋਸ਼ਿਸ਼ ਫੇਲ ਹੋਈ {0}",
"DeviceOnlineWithName": "{0} ਜੁੜਿਆ ਹੋਇਆ ਹੈ",
"DeviceOfflineWithName": "{0} ਡਿਸਕਨੈਕਟ ਹੋ ਗਿਆ ਹੈ",
- "Default": "ਮੂਲ",
- "Collections": "ਸੰਗ੍ਰਹਿ",
+ "Default": "ਡਿਫੌਲਟ",
+ "Collections": "ਸੰਗ੍ਰਹਿਣ",
"ChapterNameValue": "ਅਧਿਆਇ {0}",
"Channels": "ਚੈਨਲ",
"CameraImageUploadedFrom": "ਤੋਂ ਇੱਕ ਨਵਾਂ ਕੈਮਰਾ ਚਿੱਤਰ ਅਪਲੋਡ ਕੀਤਾ ਗਿਆ ਹੈ {0}",
--
cgit v1.2.3
From 29095ab390b3ed92224510679d7d26b71e978f29 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 6 Dec 2021 12:01:19 +0000
Subject: Bump BDInfo from 0.7.6.1 to 0.7.6.2
Bumps [BDInfo](https://github.com/jellyfin/BDInfo) from 0.7.6.1 to 0.7.6.2.
- [Release notes](https://github.com/jellyfin/BDInfo/releases)
- [Commits](https://github.com/jellyfin/BDInfo/commits)
---
updated-dependencies:
- dependency-name: BDInfo
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj b/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj
index 6bb8bcdab..4b65dab70 100644
--- a/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj
+++ b/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj
@@ -22,7 +22,7 @@
-
+
--
cgit v1.2.3
From c4c7d7431fc96d769d30e46f921d0b151f619afc Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 6 Dec 2021 13:29:10 +0000
Subject: Bump libse from 3.6.2 to 3.6.4
Bumps [libse](https://github.com/SubtitleEdit/subtitleedit) from 3.6.2 to 3.6.4.
- [Release notes](https://github.com/SubtitleEdit/subtitleedit/releases)
- [Changelog](https://github.com/SubtitleEdit/subtitleedit/blob/master/Changelog.txt)
- [Commits](https://github.com/SubtitleEdit/subtitleedit/compare/3.6.2...3.6.4)
---
updated-dependencies:
- dependency-name: libse
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj b/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj
index 4b65dab70..9f6d8e7fe 100644
--- a/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj
+++ b/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj
@@ -23,7 +23,7 @@
-
+
--
cgit v1.2.3
From 3176a4ddd956a16f95b14ccedf2f6aa344019ab9 Mon Sep 17 00:00:00 2001
From: matthiasdv
Date: Mon, 6 Dec 2021 22:40:00 +0100
Subject: add more hardening to systemd service
---
debian/jellyfin.service | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/debian/jellyfin.service b/debian/jellyfin.service
index e215a8536..071f949dd 100644
--- a/debian/jellyfin.service
+++ b/debian/jellyfin.service
@@ -13,7 +13,20 @@ TimeoutSec = 15
NoNewPrivileges=true
SystemCallArchitectures=native
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
-ProtectKernelModules=True
+RestrictNamespaces=true
+RestrictRealtime=true
+RestrictSUIDSGID=true
+ProtectClock=true
+ProtectControlGroups=true
+ProtectHostname=true
+ProtectKernelLogs=true
+ProtectKernelModules=true
+ProtectKernelTunables=true
+LockPersonality=true
+PrivateTmp=true
+PrivateDevices=false
+PrivateUsers=true
+RemoveIPC=true
SystemCallFilter=~@clock
SystemCallFilter=~@aio
SystemCallFilter=~@chown
--
cgit v1.2.3
From a327b43ab7faceadb555890c41f103008fc00737 Mon Sep 17 00:00:00 2001
From: Claus Vium
Date: Tue, 7 Dec 2021 20:28:51 +0100
Subject: Update MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs
---
MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs | 1 -
1 file changed, 1 deletion(-)
diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs b/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs
index 8445a12aa..fc59e410f 100644
--- a/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs
+++ b/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs
@@ -45,7 +45,6 @@ namespace MediaBrowser.Providers.MediaInfo
private readonly FFProbeAudioInfo _audioProber;
private readonly Task _cachedTask = Task.FromResult(ItemUpdateType.None);
- private readonly NamingOptions _namingOptions;
public FFProbeProvider(
ILogger logger,
--
cgit v1.2.3