From 3877f96b098a699730020ba7bd660528cbb9187b Mon Sep 17 00:00:00 2001
From: CodeDevMLH <145071728+CodeDevMLH@users.noreply.github.com>
Date: Mon, 9 Feb 2026 02:39:42 +0100
Subject: [PATCH] Add sorting options for Production Year and Critic Rating;
remove Date Created sorting
---
.../Configuration/configPage.html | 3 ++-
.../Web/mediaBarEnhanced.js | 12 ++++++++----
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/Jellyfin.Plugin.MediaBarEnhanced/Configuration/configPage.html b/Jellyfin.Plugin.MediaBarEnhanced/Configuration/configPage.html
index d4e298d..58111cf 100644
--- a/Jellyfin.Plugin.MediaBarEnhanced/Configuration/configPage.html
+++ b/Jellyfin.Plugin.MediaBarEnhanced/Configuration/configPage.html
@@ -281,7 +281,8 @@
-
+
+
diff --git a/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js b/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js
index 68adc20..efe0ecd 100644
--- a/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js
+++ b/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js
@@ -484,14 +484,18 @@ const SlideUtils = {
let valA, valB;
switch (sortBy) {
- case 'DateCreated':
- valA = new Date(a.DateCreated).getTime();
- valB = new Date(b.DateCreated).getTime();
- break;
case 'PremiereDate':
valA = new Date(a.PremiereDate).getTime();
valB = new Date(b.PremiereDate).getTime();
break;
+ case 'ProductionYear':
+ valA = a.ProductionYear || 0;
+ valB = b.ProductionYear || 0;
+ break;
+ case 'CriticRating':
+ valA = a.CriticRating || 0;
+ valB = b.CriticRating || 0;
+ break;
case 'CommunityRating':
valA = a.CommunityRating || 0;
valB = b.CommunityRating || 0;