aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Emby.Server.Implementations/Data/SqliteUserDataRepository.cs8
-rw-r--r--Emby.Server.Implementations/Dto/DtoService.cs62
-rw-r--r--Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs5
-rw-r--r--Emby.Server.Implementations/Library/MediaSourceManager.cs7
-rw-r--r--Emby.Server.Implementations/Localization/Core/fil.json2
-rw-r--r--Emby.Server.Implementations/Localization/Core/hr.json7
-rw-r--r--Emby.Server.Implementations/Localization/Core/ko.json7
-rw-r--r--Jellyfin.Api/Controllers/LiveTvController.cs2
-rw-r--r--Jellyfin.Api/Extensions/DtoExtensions.cs2
-rw-r--r--MediaBrowser.Controller/Dto/DtoOptions.cs2
-rw-r--r--MediaBrowser.Controller/Entities/UserItemData.cs10
-rw-r--r--MediaBrowser.Controller/Providers/MetadataResult.cs31
-rw-r--r--MediaBrowser.Model/Dto/UserItemDataDto.cs5
-rw-r--r--MediaBrowser.Model/Entities/MediaStream.cs9
-rw-r--r--MediaBrowser.Model/Querying/QueryResult.cs85
-rw-r--r--MediaBrowser.Model/Session/UserDataChangeInfo.cs6
-rw-r--r--MediaBrowser.XbmcMetadata/Providers/BaseVideoNfoProvider.cs5
-rw-r--r--tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs5
18 files changed, 123 insertions, 137 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs b/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs
index 634eaf85e..bfdcc08f4 100644
--- a/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs
@@ -333,10 +333,10 @@ namespace Emby.Server.Implementations.Data
/// <returns>The user item data.</returns>
private UserItemData ReadRow(SqliteDataReader reader)
{
- var userData = new UserItemData();
-
- userData.Key = reader[0].ToString();
- // userData.UserId = reader[1].ReadGuidFromBlob();
+ var userData = new UserItemData
+ {
+ Key = reader.GetString(0)
+ };
if (reader.TryGetDouble(2, out var rating))
{
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs
index 19902b26a..0c0ba7453 100644
--- a/Emby.Server.Implementations/Dto/DtoService.cs
+++ b/Emby.Server.Implementations/Dto/DtoService.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
#pragma warning disable CS1591
using System;
@@ -83,12 +81,12 @@ namespace Emby.Server.Implementations.Dto
private ILiveTvManager LivetvManager => _livetvManagerFactory.Value;
/// <inheritdoc />
- public IReadOnlyList<BaseItemDto> GetBaseItemDtos(IReadOnlyList<BaseItem> items, DtoOptions options, User user = null, BaseItem owner = null)
+ public IReadOnlyList<BaseItemDto> GetBaseItemDtos(IReadOnlyList<BaseItem> items, DtoOptions options, User? user = null, BaseItem? owner = null)
{
var accessibleItems = user is null ? items : items.Where(x => x.IsVisible(user)).ToList();
var returnItems = new BaseItemDto[accessibleItems.Count];
- List<(BaseItem, BaseItemDto)> programTuples = null;
- List<(BaseItemDto, LiveTvChannel)> channelTuples = null;
+ List<(BaseItem, BaseItemDto)>? programTuples = null;
+ List<(BaseItemDto, LiveTvChannel)>? channelTuples = null;
for (int index = 0; index < accessibleItems.Count; index++)
{
@@ -137,7 +135,7 @@ namespace Emby.Server.Implementations.Dto
return returnItems;
}
- public BaseItemDto GetBaseItemDto(BaseItem item, DtoOptions options, User user = null, BaseItem owner = null)
+ public BaseItemDto GetBaseItemDto(BaseItem item, DtoOptions options, User? user = null, BaseItem? owner = null)
{
var dto = GetBaseItemDtoInternal(item, options, user, owner);
if (item is LiveTvChannel tvChannel)
@@ -167,7 +165,7 @@ namespace Emby.Server.Implementations.Dto
return dto;
}
- private static IList<BaseItem> GetTaggedItems(IItemByName byName, User user, DtoOptions options)
+ private static IList<BaseItem> GetTaggedItems(IItemByName byName, User? user, DtoOptions options)
{
return byName.GetTaggedItems(
new InternalItemsQuery(user)
@@ -177,7 +175,7 @@ namespace Emby.Server.Implementations.Dto
});
}
- private BaseItemDto GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user = null, BaseItem owner = null)
+ private BaseItemDto GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User? user = null, BaseItem? owner = null)
{
var dto = new BaseItemDto
{
@@ -292,7 +290,7 @@ namespace Emby.Server.Implementations.Dto
}
var path = mediaSource.Path;
- string fileExtensionContainer = null;
+ string? fileExtensionContainer = null;
if (!string.IsNullOrEmpty(path))
{
@@ -316,7 +314,8 @@ namespace Emby.Server.Implementations.Dto
}
}
- public BaseItemDto GetItemByNameDto(BaseItem item, DtoOptions options, List<BaseItem> taggedItems, User user = null)
+ /// <inheritdoc />
+ public BaseItemDto GetItemByNameDto(BaseItem item, DtoOptions options, List<BaseItem>? taggedItems, User? user = null)
{
var dto = GetBaseItemDtoInternal(item, options, user);
@@ -486,10 +485,10 @@ namespace Emby.Server.Implementations.Dto
return images
.Select(p => GetImageCacheTag(item, p))
.Where(i => i is not null)
- .ToArray();
+ .ToArray()!; // null values got filtered out
}
- private string GetImageCacheTag(BaseItem item, ItemImageInfo image)
+ private string? GetImageCacheTag(BaseItem item, ItemImageInfo image)
{
try
{
@@ -508,7 +507,7 @@ namespace Emby.Server.Implementations.Dto
/// <param name="dto">The dto.</param>
/// <param name="item">The item.</param>
/// <param name="user">The requesting user.</param>
- private void AttachPeople(BaseItemDto dto, BaseItem item, User user = null)
+ private void AttachPeople(BaseItemDto dto, BaseItem item, User? user = null)
{
// Ordering by person type to ensure actors and artists are at the front.
// This is taking advantage of the fact that they both begin with A
@@ -552,7 +551,7 @@ namespace Emby.Server.Implementations.Dto
var list = new List<BaseItemPerson>();
- var dictionary = people.Select(p => p.Name)
+ Dictionary<string, Person> dictionary = people.Select(p => p.Name)
.Distinct(StringComparer.OrdinalIgnoreCase).Select(c =>
{
try
@@ -565,9 +564,9 @@ namespace Emby.Server.Implementations.Dto
return null;
}
}).Where(i => i is not null)
- .Where(i => user is null || i.IsVisible(user))
- .DistinctBy(x => x.Name, StringComparer.OrdinalIgnoreCase)
- .ToDictionary(i => i.Name, StringComparer.OrdinalIgnoreCase);
+ .Where(i => user is null || i!.IsVisible(user))
+ .DistinctBy(x => x!.Name, StringComparer.OrdinalIgnoreCase)
+ .ToDictionary(i => i!.Name, StringComparer.OrdinalIgnoreCase)!; // null values got filtered out
for (var i = 0; i < people.Count; i++)
{
@@ -580,7 +579,7 @@ namespace Emby.Server.Implementations.Dto
Type = person.Type
};
- if (dictionary.TryGetValue(person.Name, out Person entity))
+ if (dictionary.TryGetValue(person.Name, out Person? entity))
{
baseItemPerson.PrimaryImageTag = GetTagAndFillBlurhash(dto, entity, ImageType.Primary);
baseItemPerson.Id = entity.Id;
@@ -650,7 +649,7 @@ namespace Emby.Server.Implementations.Dto
return _libraryManager.GetGenreId(name);
}
- private string GetTagAndFillBlurhash(BaseItemDto dto, BaseItem item, ImageType imageType, int imageIndex = 0)
+ private string? GetTagAndFillBlurhash(BaseItemDto dto, BaseItem item, ImageType imageType, int imageIndex = 0)
{
var image = item.GetImageInfo(imageType, imageIndex);
if (image is not null)
@@ -661,9 +660,14 @@ namespace Emby.Server.Implementations.Dto
return null;
}
- private string GetTagAndFillBlurhash(BaseItemDto dto, BaseItem item, ItemImageInfo image)
+ private string? GetTagAndFillBlurhash(BaseItemDto dto, BaseItem item, ItemImageInfo image)
{
var tag = GetImageCacheTag(item, image);
+ if (tag is null)
+ {
+ return null;
+ }
+
if (!string.IsNullOrEmpty(image.BlurHash))
{
dto.ImageBlurHashes ??= new Dictionary<ImageType, Dictionary<string, string>>();
@@ -716,7 +720,7 @@ namespace Emby.Server.Implementations.Dto
/// <param name="item">The item.</param>
/// <param name="owner">The owner.</param>
/// <param name="options">The options.</param>
- private void AttachBasicFields(BaseItemDto dto, BaseItem item, BaseItem owner, DtoOptions options)
+ private void AttachBasicFields(BaseItemDto dto, BaseItem item, BaseItem? owner, DtoOptions options)
{
if (options.ContainsField(ItemFields.DateCreated))
{
@@ -1097,7 +1101,7 @@ namespace Emby.Server.Implementations.Dto
}
}
- BaseItem[] allExtras = null;
+ BaseItem[]? allExtras = null;
if (options.ContainsField(ItemFields.SpecialFeatureCount))
{
@@ -1134,7 +1138,7 @@ namespace Emby.Server.Implementations.Dto
dto.SeasonId = episode.SeasonId;
dto.SeriesId = episode.SeriesId;
- Series episodeSeries = null;
+ Series? episodeSeries = null;
// this block will add the series poster for episodes without a poster
// TODO maybe remove the if statement entirely
@@ -1162,8 +1166,10 @@ namespace Emby.Server.Implementations.Dto
}
// Add SeriesInfo
- if (item is Series series)
+ Series? series;
+ if (item is Series tmp)
{
+ series = tmp;
dto.AirDays = series.AirDays;
dto.AirTime = series.AirTime;
dto.Status = series.Status?.ToString();
@@ -1264,7 +1270,7 @@ namespace Emby.Server.Implementations.Dto
}
}
- private BaseItem GetImageDisplayParent(BaseItem currentItem, BaseItem originalItem)
+ private BaseItem? GetImageDisplayParent(BaseItem currentItem, BaseItem originalItem)
{
if (currentItem is MusicAlbum musicAlbum)
{
@@ -1285,7 +1291,7 @@ namespace Emby.Server.Implementations.Dto
return parent;
}
- private void AddInheritedImages(BaseItemDto dto, BaseItem item, DtoOptions options, BaseItem owner)
+ private void AddInheritedImages(BaseItemDto dto, BaseItem item, DtoOptions options, BaseItem? owner)
{
if (!item.SupportsInheritedParentImages)
{
@@ -1305,7 +1311,7 @@ namespace Emby.Server.Implementations.Dto
return;
}
- BaseItem parent = null;
+ BaseItem? parent = null;
var isFirst = true;
var imageTags = dto.ImageTags;
@@ -1378,7 +1384,7 @@ namespace Emby.Server.Implementations.Dto
}
}
- private string GetMappedPath(BaseItem item, BaseItem ownerItem)
+ private string GetMappedPath(BaseItem item, BaseItem? ownerItem)
{
var path = item.Path;
diff --git a/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs b/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs
index 957ad9c01..47f9dfbc8 100644
--- a/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs
+++ b/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Globalization;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
@@ -138,13 +137,13 @@ namespace Emby.Server.Implementations.EntryPoints
return new UserDataChangeInfo
{
- UserId = userId.ToString("N", CultureInfo.InvariantCulture),
+ UserId = userId,
UserDataList = changedItems
.DistinctBy(x => x.Id)
.Select(i =>
{
var dto = _userDataManager.GetUserDataDto(i, user);
- dto.ItemId = i.Id.ToString("N", CultureInfo.InvariantCulture);
+ dto.ItemId = i.Id;
return dto;
})
.ToArray()
diff --git a/Emby.Server.Implementations/Library/MediaSourceManager.cs b/Emby.Server.Implementations/Library/MediaSourceManager.cs
index bb22ca82f..90a01c052 100644
--- a/Emby.Server.Implementations/Library/MediaSourceManager.cs
+++ b/Emby.Server.Implementations/Library/MediaSourceManager.cs
@@ -379,7 +379,8 @@ namespace Emby.Server.Implementations.Library
private void SetDefaultSubtitleStreamIndex(MediaSourceInfo source, UserItemData userData, User user, bool allowRememberingSelection)
{
- if (userData.SubtitleStreamIndex.HasValue
+ if (userData is not null
+ && userData.SubtitleStreamIndex.HasValue
&& user.RememberSubtitleSelections
&& user.SubtitleMode != SubtitlePlaybackMode.None
&& allowRememberingSelection)
@@ -411,7 +412,7 @@ namespace Emby.Server.Implementations.Library
private void SetDefaultAudioStreamIndex(MediaSourceInfo source, UserItemData userData, User user, bool allowRememberingSelection)
{
- if (userData.AudioStreamIndex.HasValue && user.RememberAudioSelections && allowRememberingSelection)
+ if (userData is not null && userData.AudioStreamIndex.HasValue && user.RememberAudioSelections && allowRememberingSelection)
{
var index = userData.AudioStreamIndex.Value;
// Make sure the saved index is still valid
@@ -434,7 +435,7 @@ namespace Emby.Server.Implementations.Library
if (mediaType == MediaType.Video)
{
- var userData = item is null ? new UserItemData() : _userDataManager.GetUserData(user, item);
+ var userData = item is null ? null : _userDataManager.GetUserData(user, item);
var allowRememberingSelection = item is null || item.EnableRememberingTrackSelections;
diff --git a/Emby.Server.Implementations/Localization/Core/fil.json b/Emby.Server.Implementations/Localization/Core/fil.json
index 55ee1abaa..28c1d2be5 100644
--- a/Emby.Server.Implementations/Localization/Core/fil.json
+++ b/Emby.Server.Implementations/Localization/Core/fil.json
@@ -69,7 +69,7 @@
"HeaderLiveTV": "Live TV",
"HeaderFavoriteSongs": "Mga Paboritong Kanta",
"HeaderFavoriteShows": "Mga Paboritong Pelikula",
- "HeaderFavoriteEpisodes": "Mga Paboritong Episode",
+ "HeaderFavoriteEpisodes": "Mga Paboritong Yugto",
"HeaderFavoriteArtists": "Mga Paboritong Artista",
"HeaderFavoriteAlbums": "Mga Paboritong Album",
"HeaderContinueWatching": "Magpatuloy sa Panonood",
diff --git a/Emby.Server.Implementations/Localization/Core/hr.json b/Emby.Server.Implementations/Localization/Core/hr.json
index 6a5b8c561..a7dabaa19 100644
--- a/Emby.Server.Implementations/Localization/Core/hr.json
+++ b/Emby.Server.Implementations/Localization/Core/hr.json
@@ -11,7 +11,7 @@
"Collections": "Kolekcije",
"DeviceOfflineWithName": "{0} je prekinuo vezu",
"DeviceOnlineWithName": "{0} je povezan",
- "FailedLoginAttemptWithUserName": "Neuspjeli pokušaj prijave od {0}",
+ "FailedLoginAttemptWithUserName": "Neuspješan pokušaj prijave od {0}",
"Favorites": "Favoriti",
"Folders": "Mape",
"Genres": "Žanrovi",
@@ -127,5 +127,8 @@
"HearingImpaired": "Oštećen sluh",
"TaskRefreshTrickplayImages": "Generiraj Trickplay Slike",
"TaskRefreshTrickplayImagesDescription": "Kreira trickplay pretpreglede za videe u omogućenim knjižnicama.",
- "TaskAudioNormalization": "Normalizacija zvuka"
+ "TaskAudioNormalization": "Normalizacija zvuka",
+ "TaskAudioNormalizationDescription": "Skenira datoteke u potrazi za podacima o normalizaciji zvuka.",
+ "TaskCleanCollectionsAndPlaylistsDescription": "Uklanja stavke iz zbirki i popisa za reprodukciju koje više ne postoje.",
+ "TaskCleanCollectionsAndPlaylists": "Očisti zbirke i popise za reprodukciju"
}
diff --git a/Emby.Server.Implementations/Localization/Core/ko.json b/Emby.Server.Implementations/Localization/Core/ko.json
index b91889594..a739cba35 100644
--- a/Emby.Server.Implementations/Localization/Core/ko.json
+++ b/Emby.Server.Implementations/Localization/Core/ko.json
@@ -125,5 +125,10 @@
"TaskKeyframeExtractor": "키프레임 추출",
"External": "외부",
"HearingImpaired": "청각 장애",
- "TaskCleanCollectionsAndPlaylists": "컬렉션과 재생목록 정리"
+ "TaskCleanCollectionsAndPlaylists": "컬렉션과 재생목록 정리",
+ "TaskAudioNormalization": "오디오의 볼륨 수준을 일정하게 조정",
+ "TaskAudioNormalizationDescription": "오디오의 볼륨 수준을 일정하게 조정하기 위해 파일을 스캔합니다.",
+ "TaskRefreshTrickplayImages": "비디오 탐색용 미리보기 썸네일 생성",
+ "TaskRefreshTrickplayImagesDescription": "활성화된 라이브러리에서 비디오의 트릭플레이 미리보기를 생성합니다.",
+ "TaskCleanCollectionsAndPlaylistsDescription": "더 이상 존재하지 않는 컬렉션 및 재생 목록에서 항목을 제거합니다."
}
diff --git a/Jellyfin.Api/Controllers/LiveTvController.cs b/Jellyfin.Api/Controllers/LiveTvController.cs
index 0cf36f57e..6c3d01103 100644
--- a/Jellyfin.Api/Controllers/LiveTvController.cs
+++ b/Jellyfin.Api/Controllers/LiveTvController.cs
@@ -688,7 +688,7 @@ public class LiveTvController : BaseJellyfinApiController
}
}
- var dtoOptions = new DtoOptions { Fields = body.Fields }
+ var dtoOptions = new DtoOptions { Fields = body.Fields ?? [] }
.AddClientFields(User)
.AddAdditionalDtoOptions(body.EnableImages, body.EnableUserData, body.ImageTypeLimit, body.EnableImageTypes ?? []);
return await _liveTvManager.GetPrograms(query, dtoOptions, CancellationToken.None).ConfigureAwait(false);
diff --git a/Jellyfin.Api/Extensions/DtoExtensions.cs b/Jellyfin.Api/Extensions/DtoExtensions.cs
index 3d17dbda1..f52b58bab 100644
--- a/Jellyfin.Api/Extensions/DtoExtensions.cs
+++ b/Jellyfin.Api/Extensions/DtoExtensions.cs
@@ -26,8 +26,6 @@ public static class DtoExtensions
internal static DtoOptions AddClientFields(
this DtoOptions dtoOptions, ClaimsPrincipal user)
{
- dtoOptions.Fields ??= Array.Empty<ItemFields>();
-
string? client = user.GetClient();
// No client in claim
diff --git a/MediaBrowser.Controller/Dto/DtoOptions.cs b/MediaBrowser.Controller/Dto/DtoOptions.cs
index ecc833154..cb638cf90 100644
--- a/MediaBrowser.Controller/Dto/DtoOptions.cs
+++ b/MediaBrowser.Controller/Dto/DtoOptions.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Controller/Entities/UserItemData.cs b/MediaBrowser.Controller/Entities/UserItemData.cs
index ecca440f0..15bd41a9c 100644
--- a/MediaBrowser.Controller/Entities/UserItemData.cs
+++ b/MediaBrowser.Controller/Entities/UserItemData.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
#pragma warning disable CS1591
using System;
@@ -20,16 +18,10 @@ namespace MediaBrowser.Controller.Entities
private double? _rating;
/// <summary>
- /// Gets or sets the user id.
- /// </summary>
- /// <value>The user id.</value>
- public Guid UserId { get; set; }
-
- /// <summary>
/// Gets or sets the key.
/// </summary>
/// <value>The key.</value>
- public string Key { get; set; }
+ public required string Key { get; set; }
/// <summary>
/// Gets or sets the users 0-10 rating.
diff --git a/MediaBrowser.Controller/Providers/MetadataResult.cs b/MediaBrowser.Controller/Providers/MetadataResult.cs
index 952dd4870..cfff3eb14 100644
--- a/MediaBrowser.Controller/Providers/MetadataResult.cs
+++ b/MediaBrowser.Controller/Providers/MetadataResult.cs
@@ -2,9 +2,7 @@
#pragma warning disable CA1002, CA2227, CS1591
-using System;
using System.Collections.Generic;
-using System.Globalization;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Entities;
@@ -33,8 +31,6 @@ namespace MediaBrowser.Controller.Providers
set => _remoteImages = value;
}
- public List<UserItemData> UserDataList { get; set; }
-
public List<PersonInfo> People { get; set; }
public bool HasMetadata { get; set; }
@@ -68,32 +64,5 @@ namespace MediaBrowser.Controller.Providers
People.Clear();
}
}
-
- public UserItemData GetOrAddUserData(string userId)
- {
- UserDataList ??= new List<UserItemData>();
-
- UserItemData userData = null;
-
- foreach (var i in UserDataList)
- {
- if (string.Equals(userId, i.UserId.ToString("N", CultureInfo.InvariantCulture), StringComparison.OrdinalIgnoreCase))
- {
- userData = i;
- }
- }
-
- if (userData is null)
- {
- userData = new UserItemData()
- {
- UserId = new Guid(userId)
- };
-
- UserDataList.Add(userData);
- }
-
- return userData;
- }
}
}
diff --git a/MediaBrowser.Model/Dto/UserItemDataDto.cs b/MediaBrowser.Model/Dto/UserItemDataDto.cs
index adb2cd2ab..3bb45a0e0 100644
--- a/MediaBrowser.Model/Dto/UserItemDataDto.cs
+++ b/MediaBrowser.Model/Dto/UserItemDataDto.cs
@@ -1,4 +1,3 @@
-#nullable disable
using System;
namespace MediaBrowser.Model.Dto
@@ -66,12 +65,12 @@ namespace MediaBrowser.Model.Dto
/// Gets or sets the key.
/// </summary>
/// <value>The key.</value>
- public string Key { get; set; }
+ public required string Key { get; set; }
/// <summary>
/// Gets or sets the item identifier.
/// </summary>
/// <value>The item identifier.</value>
- public string ItemId { get; set; }
+ public Guid ItemId { get; set; }
}
}
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index dcb3febbd..20e011745 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -196,7 +196,7 @@ namespace MediaBrowser.Model.Entities
|| dvProfile == 8
|| dvProfile == 9))
{
- var title = "DV Profile " + dvProfile;
+ var title = "Dolby Vision Profile " + dvProfile;
if (dvBlCompatId > 0)
{
@@ -208,6 +208,7 @@ namespace MediaBrowser.Model.Entities
1 => title + " (HDR10)",
2 => title + " (SDR)",
4 => title + " (HLG)",
+ 6 => title + " (HDR10)", // Technically means Blu-ray, but practically always HDR10
_ => title
};
}
@@ -330,7 +331,11 @@ namespace MediaBrowser.Model.Entities
attributes.Add(Codec.ToUpperInvariant());
}
- if (VideoRange != VideoRange.Unknown)
+ if (VideoDoViTitle is not null)
+ {
+ attributes.Add(VideoDoViTitle);
+ }
+ else if (VideoRange != VideoRange.Unknown)
{
attributes.Add(VideoRange.ToString());
}
diff --git a/MediaBrowser.Model/Querying/QueryResult.cs b/MediaBrowser.Model/Querying/QueryResult.cs
index ea843f34c..dd0d4fbfc 100644
--- a/MediaBrowser.Model/Querying/QueryResult.cs
+++ b/MediaBrowser.Model/Querying/QueryResult.cs
@@ -1,47 +1,60 @@
-#nullable disable
-#pragma warning disable CS1591
-
using System;
using System.Collections.Generic;
-namespace MediaBrowser.Model.Querying
+namespace MediaBrowser.Model.Querying;
+
+/// <summary>
+/// Query result container.
+/// </summary>
+/// <typeparam name="T">The type of item contained in the query result.</typeparam>
+public class QueryResult<T>
{
- public class QueryResult<T>
+ /// <summary>
+ /// Initializes a new instance of the <see cref="QueryResult{T}" /> class.
+ /// </summary>
+ public QueryResult()
{
- public QueryResult()
- {
- Items = Array.Empty<T>();
- }
+ Items = Array.Empty<T>();
+ }
- public QueryResult(IReadOnlyList<T> items)
- {
- Items = items;
- TotalRecordCount = items.Count;
- }
+ /// <summary>
+ /// Initializes a new instance of the <see cref="QueryResult{T}" /> class.
+ /// </summary>
+ /// <param name="items">The list of items.</param>
+ public QueryResult(IReadOnlyList<T> items)
+ {
+ Items = items;
+ TotalRecordCount = items.Count;
+ }
- public QueryResult(int? startIndex, int? totalRecordCount, IReadOnlyList<T> items)
- {
- StartIndex = startIndex ?? 0;
- TotalRecordCount = totalRecordCount ?? items.Count;
- Items = items;
- }
+ /// <summary>
+ /// Initializes a new instance of the <see cref="QueryResult{T}" /> class.
+ /// </summary>
+ /// <param name="startIndex">The start index that was used to build the item list.</param>
+ /// <param name="totalRecordCount">The total count of items.</param>
+ /// <param name="items">The list of items.</param>
+ public QueryResult(int? startIndex, int? totalRecordCount, IReadOnlyList<T> items)
+ {
+ StartIndex = startIndex ?? 0;
+ TotalRecordCount = totalRecordCount ?? items.Count;
+ Items = items;
+ }
- /// <summary>
- /// Gets or sets the items.
- /// </summary>
- /// <value>The items.</value>
- public IReadOnlyList<T> Items { get; set; }
+ /// <summary>
+ /// Gets or sets the items.
+ /// </summary>
+ /// <value>The items.</value>
+ public IReadOnlyList<T> Items { get; set; }
- /// <summary>
- /// Gets or sets the total number of records available.
- /// </summary>
- /// <value>The total record count.</value>
- public int TotalRecordCount { get; set; }
+ /// <summary>
+ /// Gets or sets the total number of records available.
+ /// </summary>
+ /// <value>The total record count.</value>
+ public int TotalRecordCount { get; set; }
- /// <summary>
- /// Gets or sets the index of the first record in Items.
- /// </summary>
- /// <value>First record index.</value>
- public int StartIndex { get; set; }
- }
+ /// <summary>
+ /// Gets or sets the index of the first record in Items.
+ /// </summary>
+ /// <value>First record index.</value>
+ public int StartIndex { get; set; }
}
diff --git a/MediaBrowser.Model/Session/UserDataChangeInfo.cs b/MediaBrowser.Model/Session/UserDataChangeInfo.cs
index 0fd24edcc..ccd768da5 100644
--- a/MediaBrowser.Model/Session/UserDataChangeInfo.cs
+++ b/MediaBrowser.Model/Session/UserDataChangeInfo.cs
@@ -1,4 +1,4 @@
-#nullable disable
+using System;
using MediaBrowser.Model.Dto;
namespace MediaBrowser.Model.Session
@@ -12,12 +12,12 @@ namespace MediaBrowser.Model.Session
/// Gets or sets the user id.
/// </summary>
/// <value>The user id.</value>
- public string UserId { get; set; }
+ public Guid UserId { get; set; }
/// <summary>
/// Gets or sets the user data list.
/// </summary>
/// <value>The user data list.</value>
- public UserItemDataDto[] UserDataList { get; set; }
+ public required UserItemDataDto[] UserDataList { get; set; }
}
}
diff --git a/MediaBrowser.XbmcMetadata/Providers/BaseVideoNfoProvider.cs b/MediaBrowser.XbmcMetadata/Providers/BaseVideoNfoProvider.cs
index 9954424a4..85f327c93 100644
--- a/MediaBrowser.XbmcMetadata/Providers/BaseVideoNfoProvider.cs
+++ b/MediaBrowser.XbmcMetadata/Providers/BaseVideoNfoProvider.cs
@@ -54,11 +54,6 @@ namespace MediaBrowser.XbmcMetadata.Providers
result.People = tmpItem.People;
result.Images = tmpItem.Images;
result.RemoteImages = tmpItem.RemoteImages;
-
- if (tmpItem.UserDataList is not null)
- {
- result.UserDataList = tmpItem.UserDataList;
- }
}
/// <inheritdoc />
diff --git a/tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs b/tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs
index 0a153b9cc..5bc4abd06 100644
--- a/tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs
+++ b/tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs
@@ -53,7 +53,10 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers
var userData = new Mock<IUserDataManager>();
userData.Setup(x => x.GetUserData(_testUser, It.IsAny<BaseItem>()))
- .Returns(new UserItemData());
+ .Returns(new UserItemData()
+ {
+ Key = "Something"
+ });
var directoryService = new Mock<IDirectoryService>();
_localImageFileMetadata = new FileSystemMetadata()