diff options
| -rw-r--r-- | Emby.Naming/Video/VideoListResolver.cs | 6 | ||||
| -rw-r--r-- | Jellyfin.Api/Models/SessionDtos/ClientCapabilitiesDto.cs | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/Emby.Naming/Video/VideoListResolver.cs b/Emby.Naming/Video/VideoListResolver.cs index 5f83355c8..fd1677473 100644 --- a/Emby.Naming/Video/VideoListResolver.cs +++ b/Emby.Naming/Video/VideoListResolver.cs @@ -227,7 +227,11 @@ namespace Emby.Naming.Video testFilename = cleanName.ToString(); } - testFilename = testFilename.Substring(folderName.Length).Trim(); + if (folderName.Length <= testFilename.Length) + { + testFilename = testFilename.Substring(folderName.Length).Trim(); + } + return string.IsNullOrEmpty(testFilename) || testFilename[0].Equals('-') || testFilename[0].Equals('_') diff --git a/Jellyfin.Api/Models/SessionDtos/ClientCapabilitiesDto.cs b/Jellyfin.Api/Models/SessionDtos/ClientCapabilitiesDto.cs index ac1259ef2..e58095536 100644 --- a/Jellyfin.Api/Models/SessionDtos/ClientCapabilitiesDto.cs +++ b/Jellyfin.Api/Models/SessionDtos/ClientCapabilitiesDto.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; +using System.Text.Json.Serialization; using MediaBrowser.Common.Json.Converters; using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Session; -using Newtonsoft.Json; namespace Jellyfin.Api.Models.SessionDtos { @@ -15,6 +15,7 @@ namespace Jellyfin.Api.Models.SessionDtos /// <summary> /// Gets or sets the list of playable media types. /// </summary> + [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))] public IReadOnlyList<string> PlayableMediaTypes { get; set; } = Array.Empty<string>(); /// <summary> |
