mirror of
https://github.com/SickGear/SickGear.git
synced 2025-03-15 09:07:43 +00:00
Merge pull request #665 from JackDandy/feature/ChangeShowlistSort
Change show list second level sort criteria.
This commit is contained in:
commit
d653630a6c
3 changed files with 24 additions and 4 deletions
|
@ -45,6 +45,7 @@
|
||||||
* Remove redundant Adult Swim logos
|
* 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
|
* 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 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)
|
### 0.11.10 (2016-03-17 19:00:00 UTC)
|
||||||
|
|
|
@ -491,7 +491,7 @@
|
||||||
<input type="text" name="torrent_path" id="torrent_path" value="$sickbeard.TORRENT_PATH" class="form-control input-sm input350">
|
<input type="text" name="torrent_path" id="torrent_path" value="$sickbeard.TORRENT_PATH" class="form-control input-sm input350">
|
||||||
<p class="clear-left note">where <span id="torrent_client">the torrent client</span> will save downloaded files <span id="path_blank">(blank for client default)</span>
|
<p class="clear-left note">where <span id="torrent_client">the torrent client</span> will save downloaded files <span id="path_blank">(blank for client default)</span>
|
||||||
<span id="path_synology"> <b>note:</b> the destination has to be a shared folder for Synology DS</span>
|
<span id="path_synology"> <b>note:</b> the destination has to be a shared folder for Synology DS</span>
|
||||||
<span id="path_transmission" class="red-text"> (v2.92 and newer <em>cannot</em> be blank)</span></p>
|
<span id="path_transmission" class="grey-text"> (v2.92 and newer should <em>not</em> be blank)</span></p>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -50,9 +50,25 @@ $(document).ready(function () {
|
||||||
|
|
||||||
if (config.isPoster) {
|
if (config.isPoster) {
|
||||||
$('.container').each(function (i, obj) {
|
$('.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({
|
$(obj).isotope({
|
||||||
itemSelector: '.show-card',
|
itemSelector: '.show-card',
|
||||||
sortBy: config.posterSortby,
|
sortBy: sortCriteria,
|
||||||
sortAscending: config.posterSortdir,
|
sortAscending: config.posterSortdir,
|
||||||
layoutMode: 'masonry',
|
layoutMode: 'masonry',
|
||||||
masonry: {
|
masonry: {
|
||||||
|
@ -62,14 +78,17 @@ $(document).ready(function () {
|
||||||
},
|
},
|
||||||
getSortData: {
|
getSortData: {
|
||||||
name: function (itemElem) {
|
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');
|
return config.sortArticle ? name : name.replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1');
|
||||||
},
|
},
|
||||||
date: function (itemElem) {
|
date: function (itemElem) {
|
||||||
var date = $(itemElem).attr('data-date');
|
var date = $(itemElem).attr('data-date');
|
||||||
return date.length && parseInt(date, 10) || Number.POSITIVE_INFINITY;
|
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) {
|
progress: function (itemElem) {
|
||||||
var progress = $(itemElem).children('.sort-data').attr('data-progress');
|
var progress = $(itemElem).children('.sort-data').attr('data-progress');
|
||||||
return progress.length && parseInt(progress, 10) || Number.NEGATIVE_INFINITY;
|
return progress.length && parseInt(progress, 10) || Number.NEGATIVE_INFINITY;
|
||||||
|
|
Loading…
Reference in a new issue