[PR #13598] [MERGED] Fix overwrite of PremierDate with a year-only value #13460

Closed
opened 2025-12-22 09:52:41 +01:00 by backuprepo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/13598
Author: @IDisposable
Created: 2/21/2025
Status: Merged
Merged: 3/1/2025
Merged by: @Bond-009

Base: release-10.10.zHead: preserve-premier-date


📝 Commits (3)

  • 93c8937 Preserve the more-specific PremierDate's month and day
  • 192ade7 PR feedback
  • 6fa9af0 Update unit test

📊 Changes

2 files changed (+16 additions, -4 deletions)

View changed files

📝 MediaBrowser.Providers/Manager/MetadataService.cs (+3 -1)
📝 tests/Jellyfin.Providers.Tests/Manager/MetadataServiceTests.cs (+13 -3)

📄 Description

When a update-metadata is processed and the information from one provider gives a full date (e.g. 2025-02-20) and another provider gives only the year (e.g. 2025-01-01), don't overwrite the date unless it's currently a year-only.

This comes up when (for example) The Audio DB has only the year, but MusicBrainz has a full date for the release date. With this change prefer the full date.

Changes
Add a test for IsYearOnlyDate, and use that in MetadataService.MergeBaseItemData to ensure we don't replace more-specific dates with less-specific ones.

Issues
Fixes #13596


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/13598 **Author:** [@IDisposable](https://github.com/IDisposable) **Created:** 2/21/2025 **Status:** ✅ Merged **Merged:** 3/1/2025 **Merged by:** [@Bond-009](https://github.com/Bond-009) **Base:** `release-10.10.z` ← **Head:** `preserve-premier-date` --- ### 📝 Commits (3) - [`93c8937`](https://github.com/jellyfin/jellyfin/commit/93c8937b20b8e83e434ec37e7df65c3922563e13) Preserve the more-specific PremierDate's month and day - [`192ade7`](https://github.com/jellyfin/jellyfin/commit/192ade7293e829d156e0dfb53c5d501aa70bf4af) PR feedback - [`6fa9af0`](https://github.com/jellyfin/jellyfin/commit/6fa9af09c8f891e7220185073370687b5d7a7937) Update unit test ### 📊 Changes **2 files changed** (+16 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `MediaBrowser.Providers/Manager/MetadataService.cs` (+3 -1) 📝 `tests/Jellyfin.Providers.Tests/Manager/MetadataServiceTests.cs` (+13 -3) </details> ### 📄 Description When a update-metadata is processed and the information from one provider gives a full date (e.g. 2025-02-20) and another provider gives only the year (e.g. 2025-01-01), don't overwrite the date unless it's currently a year-only. This comes up when (for example) The Audio DB has only the year, but MusicBrainz has a full date for the release date. With this change prefer the full date. **Changes** Add a test for IsYearOnlyDate, and use that in MetadataService.MergeBaseItemData to ensure we don't replace more-specific dates with less-specific ones. **Issues** Fixes #13596 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
backuprepo 2025-12-22 09:52:41 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#13460
No description provided.