[PR #12859] Order using production year when premiere date is not available #13397

Open
opened 2026-02-07 07:12:14 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/12859
Author: @yutongluo
Created: 10/21/2024
Status: 🔄 Open

Base: masterHead: use-year-when-premieredate-null


📝 Commits (1)

  • 8c63f6b order using production year when premiere date is not available

📊 Changes

2 files changed (+2 additions, -1 deletions)

View changed files

📝 CONTRIBUTORS.md (+1 -0)
📝 Emby.Server.Implementations/Data/SqliteItemRepository.cs (+1 -1)

📄 Description

Changes

Add coalesce clause to use production year to sort when premiere date is not available. Behavior is as follows

  • Use Premiere Date if not null
  • else use date(ProductionYear||'-01-01')
  • if ProductionYear is also null, date will return null since '-01-01' is invalid, and sort will be using NULL (expected behavior)

Could not find where to add a test, if folks more familiar could help point it out that'd be great.

Issues

#12101


🔄 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/12859 **Author:** [@yutongluo](https://github.com/yutongluo) **Created:** 10/21/2024 **Status:** 🔄 Open **Base:** `master` ← **Head:** `use-year-when-premieredate-null` --- ### 📝 Commits (1) - [`8c63f6b`](https://github.com/jellyfin/jellyfin/commit/8c63f6bf06ea86ce4e364998dded1fcb413dc628) order using production year when premiere date is not available ### 📊 Changes **2 files changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `CONTRIBUTORS.md` (+1 -0) 📝 `Emby.Server.Implementations/Data/SqliteItemRepository.cs` (+1 -1) </details> ### 📄 Description <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> **Changes** <!-- Describe your changes here in 1-5 sentences. --> Add coalesce clause to use production year to sort when premiere date is not available. Behavior is as follows - Use Premiere Date if not null - else use `date(ProductionYear||'-01-01')` - if `ProductionYear` is also null, date will return null since '-01-01' is invalid, and sort will be using NULL (expected behavior) Could not find where to add a test, if folks more familiar could help point it out that'd be great. **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # --> #12101 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 07:12:14 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#13397