From f0bec46e5511ff85f1ef6ada7f501945049835f9 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Tue, 14 Sep 2021 16:27:12 +0100 Subject: [PATCH] Add size sortability to deleted items by using `<0` for filter instead of `=0`. --- gui/slick/interfaces/default/history.tmpl | 2 +- gui/slick/js/history.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gui/slick/interfaces/default/history.tmpl b/gui/slick/interfaces/default/history.tmpl index fa37bbc..ade9737 100644 --- a/gui/slick/interfaces/default/history.tmpl +++ b/gui/slick/interfaces/default/history.tmpl @@ -397,7 +397,7 @@
  • Event Date/Age, or Played: >7 and <60 (between 7d and 60d) , >1 (played more than once)
  • Label (Profile): emby or kodi , !kodi and !plex , emby user2 , emby user" (single end quote excludes user2)
  • Quality: sd or dl , blu
  • -
  • Size: =0 (deleted media) >321000000 (files greater than byte size)
  • +
  • Size: <0 (deleted media) >321000000 (files greater than byte size)
  • diff --git a/gui/slick/js/history.js b/gui/slick/js/history.js index 1589ea0..bc51d84 100644 --- a/gui/slick/js/history.js +++ b/gui/slick/js/history.js @@ -68,9 +68,8 @@ $(document).ready(function() { return $(node).find('span[data-sort]').attr('data-sort'); }, 5: function(node) { - return !!$(node).siblings('.tvShow').eq(0).find('.strike-deleted').length - ? 0 - : $(node).find('span[data-sort]').attr('data-sort'); + var value = parseInt($(node).find('span[data-sort]').attr('data-sort'), 10); + return !!$(node).siblings('.tvShow').eq(0).find('.strike-deleted').length ? 0 - value : value; }, 6: function (node) { return $(node).find('input:checked').length;