diff options
| -rw-r--r-- | Emby.Server.Implementations/Localization/Core/eu.json | 120 | ||||
| -rw-r--r-- | Jellyfin.Api/Controllers/DashboardController.cs | 3 | ||||
| -rw-r--r-- | Jellyfin.Api/Controllers/UserViewsController.cs | 11 | ||||
| -rw-r--r-- | Jellyfin.Api/Jellyfin.Api.csproj | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Configuration/EncodingOptions.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Properties/AssemblyInfo.cs | 1 | ||||
| -rw-r--r-- | tests/Jellyfin.Dlna.Tests/Jellyfin.Dlna.Tests.csproj | 6 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs (renamed from tests/Jellyfin.Dlna.Tests/StreamBuilderTests.cs) | 6 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Jellyfin.Model.Tests.csproj | 7 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-AndroidPixel.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-AndroidPixel.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Chrome-NoHLS.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Chrome-NoHLS.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Chrome.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Chrome.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-DirectMedia.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-DirectMedia.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Firefox.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Firefox.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-JellyfinMediaPlayer.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-JellyfinMediaPlayer.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-LowBandwidth.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-LowBandwidth.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Null.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Null.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-RokuSSPlus.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-RokuSSPlus.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-RokuSSPlusNext.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-RokuSSPlusNext.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-SafariNext.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-SafariNext.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-TranscodeMedia.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-TranscodeMedia.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Yatse.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Yatse.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Yatse2.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Yatse2.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-av1-aac-srt-2600k.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-av1-aac-srt-2600k.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-av1-vorbis-srt-2600k.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-av1-vorbis-srt-2600k.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-aac-srt-2600k.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-aac-srt-2600k.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-ac3-srt-2600k.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-ac3-srt-2600k.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-srt-2600k.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-srt-2600k.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-vtt-2600k.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-vtt-2600k.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-srt-2600k.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-srt-2600k.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-vtt-2600k.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-vtt-2600k.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aac-srt-2600k.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aac-srt-2600k.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacDef-srt-2600k.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacDef-srt-2600k.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacExt-srt-2600k.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacExt-srt-2600k.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-srt-2600k.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-srt-2600k.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-aac-srt-15200k.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-aac-srt-15200k.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aac-srt-15200k.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aac-srt-15200k.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aacExt-srt-15200k.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aacExt-srt-15200k.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-srt-15200k.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-srt-15200k.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-raw.json (renamed from tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-raw.json) | 0 | ||||
| -rw-r--r-- | tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs | 3 |
41 files changed, 142 insertions, 19 deletions
diff --git a/Emby.Server.Implementations/Localization/Core/eu.json b/Emby.Server.Implementations/Localization/Core/eu.json new file mode 100644 index 000000000..dfedce7b3 --- /dev/null +++ b/Emby.Server.Implementations/Localization/Core/eu.json @@ -0,0 +1,120 @@ +{ + "ValueSpecialEpisodeName": "Berezia - {0}", + "Sync": "Sinkronizatu", + "Songs": "Abestiak", + "Shows": "Serieak", + "Playlists": "Erreprodukzio-zerrendak", + "Photos": "Argazkiak", + "MusicVideos": "Bideo musikalak", + "Movies": "Filmak", + "HeaderContinueWatching": "Ikusten jarraitu", + "HeaderAlbumArtists": "Albumeko artistak", + "Genres": "Generoak", + "Folders": "Karpetak", + "Favorites": "Gogokoak", + "Default": "Lehenetsia", + "Collections": "Bildumak", + "Channels": "Kanalak", + "Books": "Liburuak", + "Artists": "Artistak", + "Albums": "Albumak", + "TaskOptimizeDatabase": "Datu basea optimizatu", + "TaskDownloadMissingSubtitlesDescription": "Metadataren konfigurazioan oinarrituta falta diren azpitituluak bilatzen ditu interneten.", + "TaskDownloadMissingSubtitles": "Falta diren azpitituluak deskargatu", + "TaskRefreshChannelsDescription": "Internet kanalen informazioa eguneratu.", + "TaskRefreshChannels": "Kanalak eguneratu", + "TaskCleanTranscodeDescription": "Egun bat baino zaharragoak diren transcode fitxategiak ezabatzen ditu.", + "TaskCleanTranscode": "Transcode direktorioa garbitu", + "TaskUpdatePluginsDescription": "Automatikoki eguneratzeko konfiguratutako pluginen eguneraketak deskargatu eta instalatzen ditu.", + "TaskUpdatePlugins": "Pluginak eguneratu", + "TaskRefreshPeopleDescription": "Zure liburutegiko aktore eta zuzendarien metadata eguneratzen du.", + "TaskRefreshPeople": "Jendea eguneratu", + "TaskCleanLogsDescription": "{0} egun baino zaharragoak diren log fitxategiak ezabatzen ditu.", + "TaskCleanLogs": "Log direktorioa garbitu", + "TaskRefreshLibraryDescription": "Zure multimedia liburutegia eskaneatzen du fitxategi berriak eta metadatak eguneratzeko.", + "TaskRefreshLibrary": "Multimedia Liburutegia eskaneatu", + "TaskRefreshChapterImagesDescription": "Kapituluak dituzten bideoen miniaturak sortzen ditu.", + "TaskRefreshChapterImages": "Kapituluen irudiak erauzi", + "TaskCleanCacheDescription": "Sistemak behar ez dituen cache fitxategiak ezabatzen ditu.", + "TaskCleanCache": "Cache Directorioa garbitu", + "TaskCleanActivityLogDescription": "Konfiguratuta data baino zaharragoak diren log-ak ezabatu.", + "TaskCleanActivityLog": "Erabilera Log-a garbitu", + "TasksChannelsCategory": "Internet Kanalak", + "TasksApplicationCategory": "Aplikazioa", + "TasksLibraryCategory": "Liburutegia", + "TasksMaintenanceCategory": "Mantenua", + "VersionNumber": "Bertsioa {0}", + "ValueHasBeenAddedToLibrary": "{0} zure multimedia liburutegian gehitu da", + "UserStoppedPlayingItemWithValues": "{0}-ek {1} ikusteaz bukatu du {2}-(a)n", + "UserStartedPlayingItemWithValues": "{0} {1} ikusten ari da {2}-(a)n", + "UserPolicyUpdatedWithName": "{0} Erabiltzailearen politikak aldatu dira", + "UserPasswordChangedWithName": "{0} Erabiltzailearen pasahitza aldatu da", + "UserOnlineFromDevice": "{0} online dago {1}-tik", + "UserOfflineFromDevice": "{0} {1}-tik deskonektatu da", + "UserLockedOutWithName": "{0} Erabiltzailea blokeatu da", + "UserDownloadingItemWithValues": "{1} {0}-tik deskargatzen", + "UserDeletedWithName": "{0} Erabiltzailea ezabatu da", + "UserCreatedWithName": "{0} Erabiltzailea sortu da", + "User": "Erabiltzailea", + "Undefined": "Ezezaguna", + "TvShows": "TB showak", + "System": "Sistema", + "SubtitleDownloadFailureFromForItem": "{1}-en azpitutuluak {0} deskargatzean huts egin du", + "StartupEmbyServerIsLoading": "Jellyfin zerbitzaria kargatzen. Saiatu berriro beranduxeago.", + "ServerNameNeedsToBeRestarted": "{0} berrabiarazi behar da", + "ScheduledTaskStartedWithName": "{0} hasi da", + "ScheduledTaskFailedWithName": "{0} huts egin du", + "PluginUpdatedWithName": "{0} eguneratu da", + "PluginUninstalledWithName": "{0} desinstalatu da", + "PluginInstalledWithName": "{0} instalatu da", + "Plugin": "Plugin", + "NotificationOptionVideoPlaybackStopped": "Bideoa geldituta", + "NotificationOptionVideoPlayback": "Bideoa martxan", + "NotificationOptionUserLockedOut": "Erabiltzailea blokeatua", + "NotificationOptionTaskFailed": "Programatutako atazak huts egin du", + "NotificationOptionServerRestartRequired": "Zerbitzaria berrabiarazi behar da", + "NotificationOptionPluginUpdateInstalled": "Pluginaren eguneraketa instalatua", + "NotificationOptionPluginUninstalled": "Plugina desinstalatua", + "NotificationOptionPluginInstalled": "Plugina instalatua", + "NotificationOptionPluginError": "Pluginak huts egin du", + "NotificationOptionNewLibraryContent": "Eduki berria gehitua", + "NotificationOptionInstallationFailed": "Instalazioak huts egin du", + "NotificationOptionCameraImageUploaded": "Kamerako irudia igota", + "NotificationOptionAudioPlaybackStopped": "Audioa gelditua", + "NotificationOptionAudioPlayback": "Audioa martxan", + "NotificationOptionApplicationUpdateInstalled": "Aplikazioaren eguneraketa instalatua", + "NotificationOptionApplicationUpdateAvailable": "Aplikazioaren eguneraketa eskuragarri", + "NewVersionIsAvailable": "Jellyfin zerbitzariaren bertsio berria deskargatzeko eskuragarri dago.", + "NameSeasonUnknown": "Denboraldi ezezaguna", + "NameSeasonNumber": "{0} Denboraldia", + "NameInstallFailed": "{0} instalazioak huts egin du", + "Music": "Musika", + "MixedContent": "Denetariko edukia", + "MessageServerConfigurationUpdated": "Zerbitzariaren konfigurazioa eguneratu da", + "MessageNamedServerConfigurationUpdatedWithValue": "Zerbitzariaren konfigurazio {0} atala eguneratu da", + "MessageApplicationUpdatedTo": "Jellyfin zerbitzaria {0}-ra eguneratu da", + "MessageApplicationUpdated": "Jellyfin zerbitzaria eguneratu da", + "Latest": "Azkena", + "LabelRunningTimeValue": "Denbora martxan: {0}", + "LabelIpAddressValue": "IP helbidea: {0}", + "ItemRemovedWithName": "{0} liburutegitik ezabatu da", + "ItemAddedWithName": "{0} liburutegira gehitu da", + "HomeVideos": "Etxeko bideoak", + "HeaderNextUp": "Hurrengoa", + "HeaderLiveTV": "Zuzeneko TB", + "HeaderFavoriteSongs": "Gogoko abestiak", + "HeaderFavoriteShows": "Gogoko showak", + "HeaderFavoriteEpisodes": "Gogoko atalak", + "HeaderFavoriteArtists": "Gogoko artistak", + "HeaderFavoriteAlbums": "Gogoko albumak", + "Forced": "Behartuta", + "FailedLoginAttemptWithUserName": "Login egiten akatsa, saiatu hemen {0}", + "External": "Kanpokoa", + "DeviceOnlineWithName": "{0} konektatu da", + "DeviceOfflineWithName": "{0} deskonektatu da", + "ChapterNameValue": "{0} Kapitulua", + "CameraImageUploadedFrom": "{0}-tik kamera irudi berri bat igo da", + "AuthenticationSucceededWithUserName": "{0} ongi autentifikatu da", + "Application": "Aplikazioa", + "AppDeviceValues": "App: {0}, Gailua: {1}" +} diff --git a/Jellyfin.Api/Controllers/DashboardController.cs b/Jellyfin.Api/Controllers/DashboardController.cs index 87cb418d9..c8411f44b 100644 --- a/Jellyfin.Api/Controllers/DashboardController.cs +++ b/Jellyfin.Api/Controllers/DashboardController.cs @@ -4,10 +4,12 @@ using System.IO; using System.Linq; using System.Net.Mime; using Jellyfin.Api.Attributes; +using Jellyfin.Api.Constants; using Jellyfin.Api.Models; using MediaBrowser.Common.Plugins; using MediaBrowser.Model.Net; using MediaBrowser.Model.Plugins; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; @@ -46,6 +48,7 @@ namespace Jellyfin.Api.Controllers [HttpGet("web/ConfigurationPages")] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status404NotFound)] + [Authorize(Policy = Policies.DefaultAuthorization)] public ActionResult<IEnumerable<ConfigurationPageInfo>> GetConfigurationPages( [FromQuery] bool? enableInMainMenu) { diff --git a/Jellyfin.Api/Controllers/UserViewsController.cs b/Jellyfin.Api/Controllers/UserViewsController.cs index 04171da8a..5cc8c906f 100644 --- a/Jellyfin.Api/Controllers/UserViewsController.cs +++ b/Jellyfin.Api/Controllers/UserViewsController.cs @@ -4,6 +4,7 @@ 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; using Jellyfin.Api.Models.UserViewDtos; @@ -15,6 +16,7 @@ using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Library; using MediaBrowser.Model.Querying; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; @@ -24,6 +26,7 @@ namespace Jellyfin.Api.Controllers /// User views controller. /// </summary> [Route("")] + [Authorize(Policy = Policies.DefaultAuthorization)] public class UserViewsController : BaseJellyfinApiController { private readonly IUserManager _userManager; @@ -65,7 +68,7 @@ namespace Jellyfin.Api.Controllers /// <returns>An <see cref="OkResult"/> containing the user views.</returns> [HttpGet("Users/{userId}/Views")] [ProducesResponseType(StatusCodes.Status200OK)] - public async Task<ActionResult<QueryResult<BaseItemDto>>> GetUserViews( + public QueryResult<BaseItemDto> GetUserViews( [FromRoute, Required] Guid userId, [FromQuery] bool? includeExternalContent, [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] string[] presetViews, @@ -87,12 +90,6 @@ namespace Jellyfin.Api.Controllers query.PresetViews = presetViews; } - var app = (await _authContext.GetAuthorizationInfo(Request).ConfigureAwait(false)).Client ?? string.Empty; - if (app.IndexOf("emby rt", StringComparison.OrdinalIgnoreCase) != -1) - { - query.PresetViews = new[] { CollectionType.Movies, CollectionType.TvShows }; - } - var folders = _userViewManager.GetUserViews(query); var dtoOptions = new DtoOptions().AddClientFields(Request); diff --git a/Jellyfin.Api/Jellyfin.Api.csproj b/Jellyfin.Api/Jellyfin.Api.csproj index b0b74e7ed..7c4bc1972 100644 --- a/Jellyfin.Api/Jellyfin.Api.csproj +++ b/Jellyfin.Api/Jellyfin.Api.csproj @@ -20,7 +20,7 @@ <PackageReference Include="Microsoft.AspNetCore.Authorization" Version="6.0.3" /> <PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" /> - <PackageReference Include="Swashbuckle.AspNetCore.ReDoc" Version="6.2.3" /> + <PackageReference Include="Swashbuckle.AspNetCore.ReDoc" Version="6.3.0" /> </ItemGroup> <ItemGroup> diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs index 51917b50e..06931ac3b 100644 --- a/MediaBrowser.Model/Configuration/EncodingOptions.cs +++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs @@ -32,7 +32,7 @@ namespace MediaBrowser.Model.Configuration DeinterlaceMethod = "yadif"; EnableDecodingColorDepth10Hevc = true; EnableDecodingColorDepth10Vp9 = true; - EnableEnhancedNvdecDecoder = true; + EnableEnhancedNvdecDecoder = false; PreferSystemNativeHwDecoder = true; EnableIntelLowPowerH264HwEncoder = false; EnableIntelLowPowerHevcHwEncoder = false; diff --git a/MediaBrowser.Model/Properties/AssemblyInfo.cs b/MediaBrowser.Model/Properties/AssemblyInfo.cs index 6bf1eb0c0..e50baf604 100644 --- a/MediaBrowser.Model/Properties/AssemblyInfo.cs +++ b/MediaBrowser.Model/Properties/AssemblyInfo.cs @@ -16,7 +16,6 @@ using System.Runtime.InteropServices; [assembly: AssemblyCulture("")] [assembly: NeutralResourcesLanguage("en")] [assembly: InternalsVisibleTo("Jellyfin.Model.Tests")] -[assembly: InternalsVisibleTo("Jellyfin.Dlna.Tests")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from diff --git a/tests/Jellyfin.Dlna.Tests/Jellyfin.Dlna.Tests.csproj b/tests/Jellyfin.Dlna.Tests/Jellyfin.Dlna.Tests.csproj index 8cead4bf2..4918e2e82 100644 --- a/tests/Jellyfin.Dlna.Tests/Jellyfin.Dlna.Tests.csproj +++ b/tests/Jellyfin.Dlna.Tests/Jellyfin.Dlna.Tests.csproj @@ -14,12 +14,6 @@ <PackageReference Include="coverlet.collector" Version="3.1.2" /> </ItemGroup> - <ItemGroup> - <None Include="Test Data\**\*.*"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - </ItemGroup> - <!-- Code Analyzers --> <ItemGroup Condition=" '$(Configuration)' == 'Debug' "> <PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.3"> diff --git a/tests/Jellyfin.Dlna.Tests/StreamBuilderTests.cs b/tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs index c645ca9a6..4748f3497 100644 --- a/tests/Jellyfin.Dlna.Tests/StreamBuilderTests.cs +++ b/tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs @@ -14,7 +14,7 @@ using Microsoft.Extensions.Logging.Abstractions; using Moq; using Xunit; -namespace Jellyfin.MediaBrowser.Model.Tests +namespace Jellyfin.Model.Tests { public class StreamBuilderTests { @@ -453,8 +453,8 @@ namespace Jellyfin.MediaBrowser.Model.Tests var queryString = href.ElementAtOrDefault(1); var query = string.IsNullOrEmpty(queryString) ? System.Web.HttpUtility.ParseQueryString(queryString ?? string.Empty) : new NameValueCollection(); - var filename = System.IO.Path.GetFileNameWithoutExtension(path); - var extension = System.IO.Path.GetExtension(path); + var filename = Path.GetFileNameWithoutExtension(path); + var extension = Path.GetExtension(path); if (extension.Length > 0) { extension = extension.Substring(1); diff --git a/tests/Jellyfin.Model.Tests/Jellyfin.Model.Tests.csproj b/tests/Jellyfin.Model.Tests/Jellyfin.Model.Tests.csproj index 9da80c312..d2304d0d0 100644 --- a/tests/Jellyfin.Model.Tests/Jellyfin.Model.Tests.csproj +++ b/tests/Jellyfin.Model.Tests/Jellyfin.Model.Tests.csproj @@ -8,12 +8,19 @@ <ItemGroup> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" /> + <PackageReference Include="Moq" Version="4.17.2" /> <PackageReference Include="xunit" Version="2.4.1" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" /> <PackageReference Include="coverlet.collector" Version="3.1.2" /> <PackageReference Include="FsCheck.Xunit" Version="2.16.4" /> </ItemGroup> + <ItemGroup> + <None Include="Test Data\**\*.*"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + </ItemGroup> + <!-- Code Analyzers --> <ItemGroup Condition=" '$(Configuration)' == 'Debug' "> <PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.3"> diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-AndroidPixel.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-AndroidPixel.json index 68ce3ea4a..68ce3ea4a 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-AndroidPixel.json +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-AndroidPixel.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Chrome-NoHLS.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Chrome-NoHLS.json index 5d1f5f162..5d1f5f162 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Chrome-NoHLS.json +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Chrome-NoHLS.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Chrome.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Chrome.json index 81bb97ac8..81bb97ac8 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Chrome.json +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Chrome.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-DirectMedia.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-DirectMedia.json index d1df7341e..d1df7341e 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-DirectMedia.json +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-DirectMedia.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Firefox.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Firefox.json index 9874793d3..9874793d3 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Firefox.json +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Firefox.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-JellyfinMediaPlayer.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-JellyfinMediaPlayer.json index da9a1a4ad..da9a1a4ad 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-JellyfinMediaPlayer.json +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-JellyfinMediaPlayer.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-LowBandwidth.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-LowBandwidth.json index 82b73fb0f..82b73fb0f 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-LowBandwidth.json +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-LowBandwidth.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Null.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Null.json index d463bd896..d463bd896 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Null.json +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Null.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-RokuSSPlus.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-RokuSSPlus.json index 37b923558..37b923558 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-RokuSSPlus.json +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-RokuSSPlus.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-RokuSSPlusNext.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-RokuSSPlusNext.json index 542bf6370..542bf6370 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-RokuSSPlusNext.json +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-RokuSSPlusNext.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-SafariNext.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-SafariNext.json index 3b5a0c254..3b5a0c254 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-SafariNext.json +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-SafariNext.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-TranscodeMedia.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-TranscodeMedia.json index 9fc1ae6bb..9fc1ae6bb 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-TranscodeMedia.json +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-TranscodeMedia.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Yatse.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Yatse.json index 256c8dc2f..256c8dc2f 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Yatse.json +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Yatse.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Yatse2.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Yatse2.json index 256c8dc2f..256c8dc2f 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Yatse2.json +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Yatse2.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-av1-aac-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-av1-aac-srt-2600k.json index da185aacf..da185aacf 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-av1-aac-srt-2600k.json +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-av1-aac-srt-2600k.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-av1-vorbis-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-av1-vorbis-srt-2600k.json index 774dba32a..774dba32a 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-av1-vorbis-srt-2600k.json +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-av1-vorbis-srt-2600k.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-aac-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-aac-srt-2600k.json index 0a85a1353..0a85a1353 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-aac-srt-2600k.json +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-aac-srt-2600k.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-ac3-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-ac3-srt-2600k.json index 2b932ff52..2b932ff52 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-ac3-srt-2600k.json +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-ac3-srt-2600k.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-srt-2600k.json index 56b04b789..56b04b789 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-srt-2600k.json +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-srt-2600k.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-vtt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-vtt-2600k.json index 1ee7eade9..1ee7eade9 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-vtt-2600k.json +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-vtt-2600k.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-srt-2600k.json index 21911843d..21911843d 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-srt-2600k.json +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-srt-2600k.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-vtt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-vtt-2600k.json index 77954a31a..77954a31a 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-vtt-2600k.json +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-vtt-2600k.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aac-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aac-srt-2600k.json index 70bbb9d0d..70bbb9d0d 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aac-srt-2600k.json +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aac-srt-2600k.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacDef-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacDef-srt-2600k.json index 036e41f07..036e41f07 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacDef-srt-2600k.json +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacDef-srt-2600k.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacExt-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacExt-srt-2600k.json index b81c4597f..b81c4597f 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacExt-srt-2600k.json +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacExt-srt-2600k.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-srt-2600k.json index b71fd4a6a..b71fd4a6a 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-srt-2600k.json +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-srt-2600k.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-aac-srt-15200k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-aac-srt-15200k.json index 4c6409e7b..4c6409e7b 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-aac-srt-15200k.json +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-aac-srt-15200k.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aac-srt-15200k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aac-srt-15200k.json index 385bb7260..385bb7260 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aac-srt-15200k.json +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aac-srt-15200k.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aacExt-srt-15200k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aacExt-srt-15200k.json index fd1950bde..fd1950bde 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aacExt-srt-15200k.json +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aacExt-srt-15200k.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-srt-15200k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-srt-15200k.json index dde7c15ea..dde7c15ea 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-srt-15200k.json +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-srt-15200k.json diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-raw.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-raw.json index 9ea55b805..9ea55b805 100644 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-raw.json +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-raw.json diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs index 3396a94e5..0afb6f88d 100644 --- a/tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs +++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs @@ -14,6 +14,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers { private readonly JellyfinApplicationFactory _factory; private readonly JsonSerializerOptions _jsonOpions = JsonDefaults.Options; + private static string? _accessToken; public DashboardControllerTests(JellyfinApplicationFactory factory) { @@ -57,6 +58,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers public async Task GetConfigurationPages_NoParams_AllConfigurationPages() { var client = _factory.CreateClient(); + client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client).ConfigureAwait(false)); var response = await client.GetAsync("/web/ConfigurationPages").ConfigureAwait(false); @@ -71,6 +73,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers public async Task GetConfigurationPages_True_MainMenuConfigurationPages() { var client = _factory.CreateClient(); + client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client).ConfigureAwait(false)); var response = await client.GetAsync("/web/ConfigurationPages?enableInMainMenu=true").ConfigureAwait(false); |
