diff --git a/CHANGES.md b/CHANGES.md index ecdc6fa3..c3c2cb72 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -45,6 +45,7 @@ * Remove redundant Adult Swim logos * Add scene qualities WEB.h264 to SDTV, 720p.WEB.h264 to WEB DL 720p, and 1080p.WEB.h264 to WEB DL 1080p * Change improve handling when provider PiSexy is missing expected data +* Change show list second level sort criteria ### 0.11.10 (2016-03-17 19:00:00 UTC) diff --git a/gui/slick/interfaces/default/config_search.tmpl b/gui/slick/interfaces/default/config_search.tmpl index 5dd5e363..2eba60d8 100755 --- a/gui/slick/interfaces/default/config_search.tmpl +++ b/gui/slick/interfaces/default/config_search.tmpl @@ -491,7 +491,7 @@

where the torrent client will save downloaded files (blank for client default) note: the destination has to be a shared folder for Synology DS - (v2.92 and newer cannot be blank)

+ (v2.92 and newer should not be blank)

diff --git a/gui/slick/js/home.js b/gui/slick/js/home.js index 01a0ba23..9eee6006 100644 --- a/gui/slick/js/home.js +++ b/gui/slick/js/home.js @@ -50,9 +50,25 @@ $(document).ready(function () { if (config.isPoster) { $('.container').each(function (i, obj) { + var sortCriteria; + switch (config.posterSortby) { + case 'date': + sortCriteria = ['date', 'name', 'network', 'progress']; + break; + case 'network': + sortCriteria = ['network', 'name', 'date', 'progress']; + break; + case 'progress': + sortCriteria = ['progress', 'name', 'date', 'network']; + break; + default: + sortCriteria = ['name', 'date', 'network', 'progress']; + break; + } + $(obj).isotope({ itemSelector: '.show-card', - sortBy: config.posterSortby, + sortBy: sortCriteria, sortAscending: config.posterSortdir, layoutMode: 'masonry', masonry: { @@ -62,14 +78,17 @@ $(document).ready(function () { }, getSortData: { name: function (itemElem) { - var name = $(itemElem).attr('data-name') || ''; + var name = $(itemElem).attr('data-name').toLowerCase() || ''; return config.sortArticle ? name : name.replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1'); }, date: function (itemElem) { var date = $(itemElem).attr('data-date'); return date.length && parseInt(date, 10) || Number.POSITIVE_INFINITY; }, - network: '[data-network]', + network: function (itemElem) { + return $(itemElem).attr('data-network').toLowerCase() + .replace(/^(.*?)\W*[(]\w{2,3}[)]|1$/i, '$1') || ''; + }, progress: function (itemElem) { var progress = $(itemElem).children('.sort-data').attr('data-progress'); return progress.length && parseInt(progress, 10) || Number.NEGATIVE_INFINITY;