From e065015d6daf39b9f4a95c7783f3af9cde56d69e Mon Sep 17 00:00:00 2001 From: Francisco Ernesto Planas Pestana Date: Wed, 25 Mar 2026 14:07:53 +0000 Subject: Fix #16308: Community ratings not updating after changing .nfo file. When "replace all metadata" was issued on a film, with the Web metadata scrapers and "save to local metadata" disabled, after changing the .nfo file, 'Community rating' was not updated in the server, remaining the cached value. Fixed by changing the flag on the 'MergeData' call (line 809 - MetadataService.cs) to use the option defined by the user and not the erroneous absolute 'false' value. Also, in the .nfo parser an option for 'communityrating' was added along with value conformity verifiers. Validation tests were added. --- .../Parsers/MovieNfoParserTests.cs | 43 ++++++++++++++++++++++ .../Test Data/CommunityRating.nfo | 5 +++ .../Test Data/CommunityRating_Comma.nfo | 5 +++ .../Test Data/CommunityRating_OutOfRange.nfo | 5 +++ 4 files changed, 58 insertions(+) create mode 100644 tests/Jellyfin.XbmcMetadata.Tests/Test Data/CommunityRating.nfo create mode 100644 tests/Jellyfin.XbmcMetadata.Tests/Test Data/CommunityRating_Comma.nfo create mode 100644 tests/Jellyfin.XbmcMetadata.Tests/Test Data/CommunityRating_OutOfRange.nfo (limited to 'tests') diff --git a/tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs b/tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs index 1e8652f4b9..4142831c31 100644 --- a/tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs +++ b/tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs @@ -294,5 +294,48 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers // Verify that the lowercase "tmdbcol" is NOT in the provider IDs Assert.False(item.ProviderIds.ContainsKey("tmdbcol")); } + + [Fact] + public void Parse_CommunityRating_ValidRating_Success() + { + var result = new MetadataResult