diff options
39 files changed, 167 insertions, 58 deletions
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 98acd4449..8daaae4d9 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -148,6 +148,7 @@ - [xosdy](https://github.com/xosdy) - [XVicarious](https://github.com/XVicarious) - [YouKnowBlom](https://github.com/YouKnowBlom) + - [ZachPhelan](https://github.com/ZachPhelan) - [KristupasSavickas](https://github.com/KristupasSavickas) - [Pusta](https://github.com/pusta) - [nielsvanvelzen](https://github.com/nielsvanvelzen) diff --git a/Dockerfile b/Dockerfile index 5ca233b8f..219b95893 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,7 +31,7 @@ ARG LEVEL_ZERO_VERSION=1.3.22549 # mesa-va-drivers: needed for AMD VAAPI. Mesa >= 20.1 is required for HEVC transcoding. # curl: healthcheck RUN apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates gnupg wget apt-transport-https curl \ + && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates gnupg wget curl \ && wget -O - https://repo.jellyfin.org/jellyfin_team.gpg.key | apt-key add - \ && echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/$( awk -F'=' '/^ID=/{ print $NF }' /etc/os-release ) $( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release ) main" | tee /etc/apt/sources.list.d/jellyfin.list \ && apt-get update \ @@ -53,7 +53,7 @@ RUN apt-get update \ && dpkg -i *.deb \ && cd .. \ && rm -rf intel-compute-runtime \ - && apt-get remove gnupg wget apt-transport-https -y \ + && apt-get remove gnupg wget -y \ && apt-get clean autoclean -y \ && apt-get autoremove -y \ && rm -rf /var/lib/apt/lists/* \ diff --git a/Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs b/Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs index 48ab8b57d..ae8c8a39b 100644 --- a/Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs +++ b/Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs @@ -3,7 +3,7 @@ namespace Emby.Naming.AudioBook /// <summary> /// Data object for passing result of audiobook part/chapter extraction. /// </summary> - public struct AudioBookFilePathParserResult + public record struct AudioBookFilePathParserResult { /// <summary> /// Gets or sets optional number of path extracted from audiobook filename. diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 2753cf177..065309688 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -995,7 +995,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV } } - throw new Exception("Tuner not found."); + throw new ResourceNotFoundException("Tuner not found."); } public async Task<List<MediaSourceInfo>> GetChannelStreamMediaSources(string channelId, CancellationToken cancellationToken) diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs index 6e0559841..08534de59 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs @@ -13,6 +13,7 @@ using System.Threading; using System.Threading.Tasks; using Jellyfin.Extensions; using Jellyfin.Extensions.Json; +using MediaBrowser.Common; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller; using MediaBrowser.Controller.Configuration; @@ -297,7 +298,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV else { _taskCompletionSource.TrySetException( - new Exception( + new FfmpegException( string.Format( CultureInfo.InvariantCulture, "Recording for {0} failed. Exit code {1}", diff --git a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index ffa0d9b6a..4311db28d 100644 --- a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -20,6 +20,7 @@ using Emby.Server.Implementations.LiveTv.Listings.SchedulesDirectDtos; using Jellyfin.Extensions; using Jellyfin.Extensions.Json; using MediaBrowser.Common.Net; +using MediaBrowser.Controller.Authentication; using MediaBrowser.Controller.LiveTv; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; @@ -591,13 +592,10 @@ namespace Emby.Server.Implementations.LiveTv.Listings } catch (HttpRequestException ex) { - if (ex.StatusCode.HasValue) + if (ex.StatusCode.HasValue && ex.StatusCode.Value == HttpStatusCode.BadRequest) { - if ((int)ex.StatusCode.Value == 400) - { - _tokens.Clear(); - _lastErrorResponse = DateTime.UtcNow; - } + _tokens.Clear(); + _lastErrorResponse = DateTime.UtcNow; } throw; @@ -662,7 +660,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings return root.Token; } - throw new Exception("Could not authenticate with Schedules Direct Error: " + root.Message); + throw new AuthenticationException("Could not authenticate with Schedules Direct Error: " + root.Message); } private async Task AddLineupToAccount(ListingsProviderInfo info, CancellationToken cancellationToken) @@ -697,7 +695,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings if (string.IsNullOrEmpty(token)) { - throw new Exception("token required"); + throw new ArgumentException("token required"); } _logger.LogInformation("Headends on account "); @@ -768,14 +766,14 @@ namespace Emby.Server.Implementations.LiveTv.Listings var listingsId = info.ListingsId; if (string.IsNullOrEmpty(listingsId)) { - throw new Exception("ListingsId required"); + throw new ArgumentException("ListingsId required"); } var token = await GetToken(info, cancellationToken).ConfigureAwait(false); if (string.IsNullOrEmpty(token)) { - throw new Exception("token required"); + throw new ArgumentException("token required"); } using var options = new HttpRequestMessage(HttpMethod.Get, ApiUrl + "/lineups/" + listingsId); diff --git a/Emby.Server.Implementations/Localization/Core/mk.json b/Emby.Server.Implementations/Localization/Core/mk.json index 3483a7f0c..cbccad87f 100644 --- a/Emby.Server.Implementations/Localization/Core/mk.json +++ b/Emby.Server.Implementations/Localization/Core/mk.json @@ -64,7 +64,7 @@ "CameraImageUploadedFrom": "Нова слика од камера беше поставена од {0}", "Books": "Книги", "AuthenticationSucceededWithUserName": "{0} успешно поврзан", - "Artists": "Изведувач", + "Artists": "Изведувачи", "Application": "Апликација", "AppDeviceValues": "Апликација: {0}, Уред: {1}", "Albums": "Албуми", diff --git a/Emby.Server.Implementations/Localization/Core/zh-HK.json b/Emby.Server.Implementations/Localization/Core/zh-HK.json index ac74da67d..6c8bf7627 100644 --- a/Emby.Server.Implementations/Localization/Core/zh-HK.json +++ b/Emby.Server.Implementations/Localization/Core/zh-HK.json @@ -120,5 +120,8 @@ "Default": "預設", "TaskOptimizeDatabaseDescription": "壓縮數據庫並截斷可用空間。在掃描媒體庫或執行其他數據庫的修改後運行此任務可能會提高性能。", "TaskOptimizeDatabase": "最佳化數據庫", - "TaskCleanActivityLogDescription": "刪除早於設定時間的日誌記錄。" + "TaskCleanActivityLogDescription": "刪除早於設定時間的日誌記錄。", + "TaskKeyframeExtractorDescription": "提取關鍵格以創建更準確的HLS播放列表。次指示可能用時很長。", + "TaskKeyframeExtractor": "關鍵幀提取器", + "External": "外部" } diff --git a/Emby.Server.Implementations/Localization/Ratings/fi.csv b/Emby.Server.Implementations/Localization/Ratings/fi.csv new file mode 100644 index 000000000..782785890 --- /dev/null +++ b/Emby.Server.Implementations/Localization/Ratings/fi.csv @@ -0,0 +1,10 @@ +FI-S,1 +FI-T,1 +FI-7,4 +FI-12,5 +FI-16,8 +FI-18,9 +FI-K7,4 +FI-K12,5 +FI-K16,8 +FI-K18,9 diff --git a/Emby.Server.Implementations/Localization/Ratings/no.csv b/Emby.Server.Implementations/Localization/Ratings/no.csv new file mode 100644 index 000000000..127407be8 --- /dev/null +++ b/Emby.Server.Implementations/Localization/Ratings/no.csv @@ -0,0 +1,6 @@ +NO-A,1 +NO-6,3 +NO-9,4 +NO-12,5 +NO-15,8 +NO-18,9 diff --git a/Emby.Server.Implementations/Localization/Ratings/se.csv b/Emby.Server.Implementations/Localization/Ratings/se.csv new file mode 100644 index 000000000..1443c07df --- /dev/null +++ b/Emby.Server.Implementations/Localization/Ratings/se.csv @@ -0,0 +1,5 @@ +SE-Btl,1 +SE-Barntillåten,1 +SE-7,3 +SE-11,5 +SE-15,8 diff --git a/Emby.Server.Implementations/Net/UdpSocket.cs b/Emby.Server.Implementations/Net/UdpSocket.cs index bbbca4fc0..2c20daa57 100644 --- a/Emby.Server.Implementations/Net/UdpSocket.cs +++ b/Emby.Server.Implementations/Net/UdpSocket.cs @@ -96,7 +96,7 @@ namespace Emby.Server.Implementations.Net } else { - tcs.TrySetException(new Exception("SocketError: " + e.SocketError)); + tcs.TrySetException(new SocketException((int)e.SocketError)); } } } @@ -114,7 +114,7 @@ namespace Emby.Server.Implementations.Net } else { - tcs.TrySetException(new Exception("SocketError: " + e.SocketError)); + tcs.TrySetException(new SocketException((int)e.SocketError)); } } } diff --git a/Jellyfin.Api/BaseJellyfinApiController.cs b/Jellyfin.Api/BaseJellyfinApiController.cs index 59d6b7513..0c63d24b7 100644 --- a/Jellyfin.Api/BaseJellyfinApiController.cs +++ b/Jellyfin.Api/BaseJellyfinApiController.cs @@ -1,4 +1,6 @@ +using System.Collections.Generic; using System.Net.Mime; +using Jellyfin.Api.Results; using Jellyfin.Extensions.Json; using Microsoft.AspNetCore.Mvc; @@ -15,5 +17,40 @@ namespace Jellyfin.Api JsonDefaults.PascalCaseMediaType)] public class BaseJellyfinApiController : ControllerBase { + /// <summary> + /// Create a new <see cref="OkResult{T}"/>. + /// </summary> + /// <param name="value">The value to return.</param> + /// <typeparam name="T">The type to return.</typeparam> + /// <returns>The <see cref="ActionResult{T}"/>.</returns> + protected ActionResult<IEnumerable<T>> Ok<T>(List<T> value) + => new OkResult<IEnumerable<T>>(value); + + /// <summary> + /// Create a new <see cref="OkResult{T}"/>. + /// </summary> + /// <param name="value">The value to return.</param> + /// <typeparam name="T">The type to return.</typeparam> + /// <returns>The <see cref="ActionResult{T}"/>.</returns> + protected ActionResult<IEnumerable<T>> Ok<T>(IReadOnlyList<T> value) + => new OkResult<IEnumerable<T>>(value); + + /// <summary> + /// Create a new <see cref="OkResult{T}"/>. + /// </summary> + /// <param name="value">The value to return.</param> + /// <typeparam name="T">The type to return.</typeparam> + /// <returns>The <see cref="ActionResult{T}"/>.</returns> + protected ActionResult<IEnumerable<T>> Ok<T>(IEnumerable<T>? value) + => new OkResult<IEnumerable<T>?>(value); + + /// <summary> + /// Create a new <see cref="OkResult{T}"/>. + /// </summary> + /// <param name="value">The value to return.</param> + /// <typeparam name="T">The type to return.</typeparam> + /// <returns>The <see cref="ActionResult{T}"/>.</returns> + protected ActionResult<T> Ok<T>(T value) + => new OkResult<T>(value); } } diff --git a/Jellyfin.Api/Controllers/ConfigurationController.cs b/Jellyfin.Api/Controllers/ConfigurationController.cs index 464fadc06..bbe163312 100644 --- a/Jellyfin.Api/Controllers/ConfigurationController.cs +++ b/Jellyfin.Api/Controllers/ConfigurationController.cs @@ -2,7 +2,6 @@ using System; using System.ComponentModel.DataAnnotations; using System.Net.Mime; using System.Text.Json; -using System.Threading.Tasks; using Jellyfin.Api.Attributes; using Jellyfin.Api.Constants; using Jellyfin.Api.Models.ConfigurationDtos; diff --git a/Jellyfin.Api/Controllers/DlnaServerController.cs b/Jellyfin.Api/Controllers/DlnaServerController.cs index 401c0197a..8859d6020 100644 --- a/Jellyfin.Api/Controllers/DlnaServerController.cs +++ b/Jellyfin.Api/Controllers/DlnaServerController.cs @@ -54,7 +54,7 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status503ServiceUnavailable)] [Produces(MediaTypeNames.Text.Xml)] [ProducesFile(MediaTypeNames.Text.Xml)] - public ActionResult GetDescriptionXml([FromRoute, Required] string serverId) + public ActionResult<string> GetDescriptionXml([FromRoute, Required] string serverId) { var url = GetAbsoluteUri(); var serverAddress = url.Substring(0, url.IndexOf("/dlna/", StringComparison.OrdinalIgnoreCase)); @@ -77,7 +77,7 @@ namespace Jellyfin.Api.Controllers [Produces(MediaTypeNames.Text.Xml)] [ProducesFile(MediaTypeNames.Text.Xml)] [SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "serverId", Justification = "Required for DLNA")] - public ActionResult GetContentDirectory([FromRoute, Required] string serverId) + public ActionResult<string> GetContentDirectory([FromRoute, Required] string serverId) { return Ok(_contentDirectory.GetServiceXml()); } @@ -97,7 +97,7 @@ namespace Jellyfin.Api.Controllers [Produces(MediaTypeNames.Text.Xml)] [ProducesFile(MediaTypeNames.Text.Xml)] [SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "serverId", Justification = "Required for DLNA")] - public ActionResult GetMediaReceiverRegistrar([FromRoute, Required] string serverId) + public ActionResult<string> GetMediaReceiverRegistrar([FromRoute, Required] string serverId) { return Ok(_mediaReceiverRegistrar.GetServiceXml()); } @@ -117,7 +117,7 @@ namespace Jellyfin.Api.Controllers [Produces(MediaTypeNames.Text.Xml)] [ProducesFile(MediaTypeNames.Text.Xml)] [SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "serverId", Justification = "Required for DLNA")] - public ActionResult GetConnectionManager([FromRoute, Required] string serverId) + public ActionResult<string> GetConnectionManager([FromRoute, Required] string serverId) { return Ok(_connectionManager.GetServiceXml()); } diff --git a/Jellyfin.Api/Controllers/MediaInfoController.cs b/Jellyfin.Api/Controllers/MediaInfoController.cs index 75df18204..d2852ed01 100644 --- a/Jellyfin.Api/Controllers/MediaInfoController.cs +++ b/Jellyfin.Api/Controllers/MediaInfoController.cs @@ -12,7 +12,6 @@ using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Devices; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Net; -using MediaBrowser.Model.Dlna; using MediaBrowser.Model.MediaInfo; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; diff --git a/Jellyfin.Api/Controllers/MoviesController.cs b/Jellyfin.Api/Controllers/MoviesController.cs index 420dd9923..466944704 100644 --- a/Jellyfin.Api/Controllers/MoviesController.cs +++ b/Jellyfin.Api/Controllers/MoviesController.cs @@ -170,7 +170,7 @@ namespace Jellyfin.Api.Controllers } } - return Ok(categories.OrderBy(i => i.RecommendationType)); + return Ok(categories.OrderBy(i => i.RecommendationType).AsEnumerable()); } private IEnumerable<RecommendationDto> GetWithDirector( diff --git a/Jellyfin.Api/Controllers/UserLibraryController.cs b/Jellyfin.Api/Controllers/UserLibraryController.cs index e45f9b58c..940fa27a7 100644 --- a/Jellyfin.Api/Controllers/UserLibraryController.cs +++ b/Jellyfin.Api/Controllers/UserLibraryController.cs @@ -8,7 +8,6 @@ using Jellyfin.Api.Constants; using Jellyfin.Api.Extensions; using Jellyfin.Api.ModelBinders; using Jellyfin.Data.Enums; -using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Audio; @@ -234,7 +233,8 @@ namespace Jellyfin.Api.Controllers var dtoOptions = new DtoOptions().AddClientFields(Request); return Ok(item - .GetExtras(BaseItem.DisplayExtraTypes) + .GetExtras() + .Where(i => i.ExtraType.HasValue && BaseItem.DisplayExtraTypes.Contains(i.ExtraType.Value)) .Select(i => _dtoService.GetBaseItemDto(i, dtoOptions, user, item))); } diff --git a/Jellyfin.Api/Controllers/UserViewsController.cs b/Jellyfin.Api/Controllers/UserViewsController.cs index 5cc8c906f..04732ccf2 100644 --- a/Jellyfin.Api/Controllers/UserViewsController.cs +++ b/Jellyfin.Api/Controllers/UserViewsController.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Globalization; using System.Linq; -using System.Threading.Tasks; using Jellyfin.Api.Constants; using Jellyfin.Api.Extensions; using Jellyfin.Api.ModelBinders; @@ -11,9 +10,7 @@ using Jellyfin.Api.Models.UserViewDtos; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.Net; using MediaBrowser.Model.Dto; -using MediaBrowser.Model.Entities; using MediaBrowser.Model.Library; using MediaBrowser.Model.Querying; using Microsoft.AspNetCore.Authorization; @@ -32,7 +29,6 @@ namespace Jellyfin.Api.Controllers private readonly IUserManager _userManager; private readonly IUserViewManager _userViewManager; private readonly IDtoService _dtoService; - private readonly IAuthorizationContext _authContext; private readonly ILibraryManager _libraryManager; /// <summary> @@ -41,19 +37,16 @@ namespace Jellyfin.Api.Controllers /// <param name="userManager">Instance of the <see cref="IUserManager"/> interface.</param> /// <param name="userViewManager">Instance of the <see cref="IUserViewManager"/> interface.</param> /// <param name="dtoService">Instance of the <see cref="IDtoService"/> interface.</param> - /// <param name="authContext">Instance of the <see cref="IAuthorizationContext"/> interface.</param> /// <param name="libraryManager">Instance of the <see cref="ILibraryManager"/> interface.</param> public UserViewsController( IUserManager userManager, IUserViewManager userViewManager, IDtoService dtoService, - IAuthorizationContext authContext, ILibraryManager libraryManager) { _userManager = userManager; _userViewManager = userViewManager; _dtoService = dtoService; - _authContext = authContext; _libraryManager = libraryManager; } @@ -138,7 +131,8 @@ namespace Jellyfin.Api.Controllers Name = i.Name, Id = i.Id.ToString("N", CultureInfo.InvariantCulture) }) - .OrderBy(i => i.Name)); + .OrderBy(i => i.Name) + .AsEnumerable()); } } } diff --git a/Jellyfin.Api/Results/OkResultOfT.cs b/Jellyfin.Api/Results/OkResultOfT.cs new file mode 100644 index 000000000..f60cbbcee --- /dev/null +++ b/Jellyfin.Api/Results/OkResultOfT.cs @@ -0,0 +1,21 @@ +#pragma warning disable SA1649 // File name should match type name. + +using Microsoft.AspNetCore.Mvc; + +namespace Jellyfin.Api.Results; + +/// <summary> +/// Ok result with type specified. +/// </summary> +/// <typeparam name="T">The type to return.</typeparam> +public class OkResult<T> : OkObjectResult +{ + /// <summary> + /// Initializes a new instance of the <see cref="OkResult{T}"/> class. + /// </summary> + /// <param name="value">The value to return.</param> + public OkResult(T value) + : base(value) + { + } +} diff --git a/Jellyfin.Server/Jellyfin.Server.csproj b/Jellyfin.Server/Jellyfin.Server.csproj index 4474a6d12..a0845a0a8 100644 --- a/Jellyfin.Server/Jellyfin.Server.csproj +++ b/Jellyfin.Server/Jellyfin.Server.csproj @@ -45,7 +45,7 @@ <PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" /> <PackageReference Include="Serilog.Settings.Configuration" Version="3.3.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" /> - <PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" /> + <PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" /> <PackageReference Include="Serilog.Sinks.File" Version="5.0.0" /> <PackageReference Include="Serilog.Sinks.Graylog" Version="2.3.0" /> <PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.1" /> diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 5cee6ce40..9461b01e3 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -2616,7 +2616,8 @@ namespace MediaBrowser.Controller.Entities return ExtraIds .Select(LibraryManager.GetItemById) .Where(i => i != null) - .Where(i => i.ExtraType.HasValue && extraTypes.Contains(i.ExtraType.Value)); + .Where(i => i.ExtraType.HasValue && extraTypes.Contains(i.ExtraType.Value)) + .OrderBy(i => i.SortName); } public virtual long GetRunTimeTicksForPlayState() diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 17e410fe1..1d1077716 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -256,6 +256,21 @@ namespace MediaBrowser.Controller.MediaEncoding return string.Empty; } + /// <summary> + /// Gets the referer param. + /// </summary> + /// <param name="state">The state.</param> + /// <returns>System.String.</returns> + public string GetRefererParam(EncodingJobInfo state) + { + if (state.RemoteHttpHeaders.TryGetValue("Referer", out string referer)) + { + return "-referer \"" + referer + "\""; + } + + return string.Empty; + } + public static string GetInputFormat(string container) { if (string.IsNullOrEmpty(container)) @@ -5001,6 +5016,15 @@ namespace MediaBrowser.Controller.MediaEncoding inputModifier = inputModifier.Trim(); + var refererParam = GetRefererParam(state); + + if (!string.IsNullOrEmpty(refererParam)) + { + inputModifier += " " + refererParam; + } + + inputModifier = inputModifier.Trim(); + inputModifier += " " + GetFastSeekCommandLineParameter(state, encodingOptions, segmentContainer); inputModifier = inputModifier.Trim(); diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs index 811194d8d..6cae7f558 100644 --- a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs +++ b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs @@ -48,13 +48,24 @@ namespace MediaBrowser.MediaEncoding.Probing "As/Hi Soundworks", "Au/Ra", "Bremer/McCoy", + "b/bqスタヂオ", + "DOV/S", + "DJ'TEKINA//SOMETHING", + "IX/ON", + "J-CORE SLi//CER", + "M(a/u)SH", + "Kaoru/Brilliance", + "signum/ii", + "Richiter(LORB/DUGEM DI BARAT)", "이달의 소녀 1/3", "R!N / Gemie", "LOONA 1/3", "LOONA / yyxy", "LOONA / ODD EYE CIRCLE", "K/DA", - "22/7" + "22/7", + "諭吉佳作/men", + "//dARTH nULL" }; public MediaInfo GetMediaInfo(InternalMediaInfoResult data, VideoType? videoType, bool isAudio, string path, MediaProtocol protocol) @@ -22,7 +22,7 @@ <a href="https://hub.docker.com/r/jellyfin/jellyfin"> <img alt="Docker Pull Count" src="https://img.shields.io/docker/pulls/jellyfin/jellyfin.svg"/> </a> -</br> +<br/> <a href="https://opencollective.com/jellyfin"> <img alt="Donate" src="https://img.shields.io/opencollective/all/jellyfin.svg?label=backers"/> </a> @@ -36,13 +36,10 @@ <img alt="Join our Subreddit" src="https://img.shields.io/badge/reddit-r%2Fjellyfin-%23FF5700.svg"/> </a> <a href="https://github.com/jellyfin/jellyfin/releases.atom"> -<img alt="Release RSS Feed"" src="https://img.shields.io/badge/rss-releases-ffa500?logo=rss" /> +<img alt="Release RSS Feed" src="https://img.shields.io/badge/rss-releases-ffa500?logo=rss" /> </a> <a href="https://github.com/jellyfin/jellyfin/commits/master.atom"> -<img alt="Master Commits RSS Feed"" src="https://img.shields.io/badge/rss-commits-ffa500?logo=rss" /> -</a> -<a href="https://lgtm.com/projects/g/jellyfin/jellyfin/alerts/"> -<img alt="Total LGTM alerts" src="https://img.shields.io/lgtm/alerts/g/jellyfin/jellyfin.svg?logo=lgtm&logoWidth=18"/> +<img alt="Master Commits RSS Feed" src="https://img.shields.io/badge/rss-commits-ffa500?logo=rss" /> </a> </p> diff --git a/deployment/Dockerfile.debian.amd64 b/deployment/Dockerfile.debian.amd64 index daba0eb7d..c7bb5f768 100644 --- a/deployment/Dockerfile.debian.amd64 +++ b/deployment/Dockerfile.debian.amd64 @@ -12,7 +12,7 @@ ENV IS_DOCKER=YES # Prepare Debian build environment RUN apt-get update -yqq \ && apt-get install -yqq --no-install-recommends \ - apt-transport-https debhelper gnupg devscripts build-essential mmv \ + debhelper gnupg devscripts build-essential mmv \ libcurl4-openssl-dev libfontconfig1-dev libfreetype6-dev libssl-dev \ libssl1.1 liblttng-ust0 diff --git a/deployment/Dockerfile.debian.arm64 b/deployment/Dockerfile.debian.arm64 index db4e7f817..a0ca9b3f3 100644 --- a/deployment/Dockerfile.debian.arm64 +++ b/deployment/Dockerfile.debian.arm64 @@ -12,7 +12,7 @@ ENV IS_DOCKER=YES # Prepare Debian build environment RUN apt-get update -yqq \ && apt-get install -yqq --no-install-recommends \ - apt-transport-https debhelper gnupg devscripts build-essential mmv + debhelper gnupg devscripts build-essential mmv # Prepare the cross-toolchain RUN dpkg --add-architecture arm64 \ diff --git a/deployment/Dockerfile.debian.armhf b/deployment/Dockerfile.debian.armhf index 9b008e7fb..42a55ebfe 100644 --- a/deployment/Dockerfile.debian.armhf +++ b/deployment/Dockerfile.debian.armhf @@ -12,7 +12,7 @@ ENV IS_DOCKER=YES # Prepare Debian build environment RUN apt-get update -yqq \ && apt-get install -yqq --no-install-recommends \ - apt-transport-https debhelper gnupg devscripts build-essential mmv + debhelper gnupg devscripts build-essential mmv # Prepare the cross-toolchain RUN dpkg --add-architecture armhf \ diff --git a/deployment/Dockerfile.linux.amd64 b/deployment/Dockerfile.linux.amd64 index 2c7e41cac..14b580d11 100644 --- a/deployment/Dockerfile.linux.amd64 +++ b/deployment/Dockerfile.linux.amd64 @@ -12,7 +12,7 @@ ENV IS_DOCKER=YES # Prepare Debian build environment RUN apt-get update -yqq \ && apt-get install -yqq --no-install-recommends \ - apt-transport-https debhelper gnupg devscripts unzip \ + debhelper gnupg devscripts unzip \ mmv libcurl4-openssl-dev libfontconfig1-dev \ libfreetype6-dev libssl-dev libssl1.1 liblttng-ust0 diff --git a/deployment/Dockerfile.linux.amd64-musl b/deployment/Dockerfile.linux.amd64-musl index e903cf1d3..672c3f269 100644 --- a/deployment/Dockerfile.linux.amd64-musl +++ b/deployment/Dockerfile.linux.amd64-musl @@ -12,7 +12,7 @@ ENV IS_DOCKER=YES # Prepare Debian build environment RUN apt-get update -yqq \ && apt-get install -yqq --no-install-recommends \ - apt-transport-https debhelper gnupg devscripts unzip \ + debhelper gnupg devscripts unzip \ mmv libcurl4-openssl-dev libfontconfig1-dev \ libfreetype6-dev libssl-dev libssl1.1 liblttng-ust0 diff --git a/deployment/Dockerfile.linux.arm64 b/deployment/Dockerfile.linux.arm64 index 0dd3c5e4e..f2a178be3 100644 --- a/deployment/Dockerfile.linux.arm64 +++ b/deployment/Dockerfile.linux.arm64 @@ -12,7 +12,7 @@ ENV IS_DOCKER=YES # Prepare Debian build environment RUN apt-get update -yqq \ && apt-get install -yqq --no-install-recommends \ - apt-transport-https debhelper gnupg devscripts unzip \ + debhelper gnupg devscripts unzip \ mmv libcurl4-openssl-dev libfontconfig1-dev \ libfreetype6-dev libssl-dev libssl1.1 liblttng-ust0 diff --git a/deployment/Dockerfile.linux.armhf b/deployment/Dockerfile.linux.armhf index 16a8218e1..025716f45 100644 --- a/deployment/Dockerfile.linux.armhf +++ b/deployment/Dockerfile.linux.armhf @@ -12,7 +12,7 @@ ENV IS_DOCKER=YES # Prepare Debian build environment RUN apt-get update -yqq \ && apt-get install -yqq --no-install-recommends \ - apt-transport-https debhelper gnupg devscripts unzip \ + debhelper gnupg devscripts unzip \ mmv libcurl4-openssl-dev libfontconfig1-dev \ libfreetype6-dev libssl-dev libssl1.1 liblttng-ust0 diff --git a/deployment/Dockerfile.macos b/deployment/Dockerfile.macos index 699ab2d40..f63dc2906 100644 --- a/deployment/Dockerfile.macos +++ b/deployment/Dockerfile.macos @@ -12,7 +12,7 @@ ENV IS_DOCKER=YES # Prepare Debian build environment RUN apt-get update -yqq \ && apt-get install -yqq --no-install-recommends \ - apt-transport-https debhelper gnupg devscripts \ + debhelper gnupg devscripts \ mmv libcurl4-openssl-dev libfontconfig1-dev \ libfreetype6-dev libssl-dev libssl1.1 liblttng-ust0 diff --git a/deployment/Dockerfile.portable b/deployment/Dockerfile.portable index b567d7bce..e48e2d41a 100644 --- a/deployment/Dockerfile.portable +++ b/deployment/Dockerfile.portable @@ -11,7 +11,7 @@ ENV IS_DOCKER=YES # Prepare Debian build environment RUN apt-get update -yqq \ && apt-get install -yqq --no-install-recommends \ - apt-transport-https debhelper gnupg devscripts \ + debhelper gnupg devscripts \ mmv libcurl4-openssl-dev libfontconfig1-dev \ libfreetype6-dev libssl-dev libssl1.1 liblttng-ust0 diff --git a/deployment/Dockerfile.ubuntu.amd64 b/deployment/Dockerfile.ubuntu.amd64 index 313a3e5cb..7863d1313 100644 --- a/deployment/Dockerfile.ubuntu.amd64 +++ b/deployment/Dockerfile.ubuntu.amd64 @@ -12,7 +12,7 @@ ENV IS_DOCKER=YES # Prepare Debian build environment RUN apt-get update -yqq \ && apt-get install -yqq --no-install-recommends \ - apt-transport-https debhelper gnupg wget ca-certificates devscripts \ + debhelper gnupg wget ca-certificates devscripts \ mmv build-essential libcurl4-openssl-dev libfontconfig1-dev \ libfreetype6-dev libssl-dev libssl1.1 liblttng-ust0 diff --git a/deployment/Dockerfile.ubuntu.arm64 b/deployment/Dockerfile.ubuntu.arm64 index 693ee7c27..206caea11 100644 --- a/deployment/Dockerfile.ubuntu.arm64 +++ b/deployment/Dockerfile.ubuntu.arm64 @@ -12,7 +12,7 @@ ENV IS_DOCKER=YES # Prepare Debian build environment RUN apt-get update -yqq \ && apt-get install -yqq --no-install-recommends \ - apt-transport-https debhelper gnupg wget ca-certificates devscripts \ + debhelper gnupg wget ca-certificates devscripts \ mmv build-essential lsb-release # Install dotnet repository diff --git a/deployment/Dockerfile.ubuntu.armhf b/deployment/Dockerfile.ubuntu.armhf index e7765a5b2..5bd1a5638 100644 --- a/deployment/Dockerfile.ubuntu.armhf +++ b/deployment/Dockerfile.ubuntu.armhf @@ -12,7 +12,7 @@ ENV IS_DOCKER=YES # Prepare Debian build environment RUN apt-get update -yqq \ && apt-get install -yqq --no-install-recommends \ - apt-transport-https debhelper gnupg wget ca-certificates devscripts \ + debhelper gnupg wget ca-certificates devscripts \ mmv build-essential lsb-release # Install dotnet repository diff --git a/deployment/Dockerfile.windows.amd64 b/deployment/Dockerfile.windows.amd64 index b9543a7c9..655300d47 100644 --- a/deployment/Dockerfile.windows.amd64 +++ b/deployment/Dockerfile.windows.amd64 @@ -11,7 +11,7 @@ ENV IS_DOCKER=YES # Prepare Debian build environment RUN apt-get update -yqq \ && apt-get install -yqq --no-install-recommends \ - apt-transport-https debhelper gnupg devscripts unzip \ + debhelper gnupg devscripts unzip \ mmv libcurl4-openssl-dev libfontconfig1-dev \ libfreetype6-dev libssl-dev libssl1.1 liblttng-ust0 zip diff --git a/jellyfin.ruleset b/jellyfin.ruleset index 1c834de82..5ac5f4923 100644 --- a/jellyfin.ruleset +++ b/jellyfin.ruleset @@ -84,6 +84,8 @@ <!-- error on CA2016: Forward the CancellationToken parameter to methods that take one or pass in 'CancellationToken.None' explicitly to indicate intentionally not propagating the token --> <Rule Id="CA2016" Action="Error" /> + <!-- error on CA2201: Exception type System.Exception is not sufficiently specific --> + <Rule Id="CA2201" Action="Error" /> <!-- error on CA2215: Dispose methods should call base class dispose --> <Rule Id="CA2215" Action="Error" /> <!-- error on CA2254: Template should be a static expression --> |
