mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 20:44:00 +02:00
NextAiring sorting is not as drunk anymore
This commit is contained in:
@@ -20,18 +20,6 @@ define(
|
||||
pageSize: 1000
|
||||
},
|
||||
|
||||
sorters: {
|
||||
nextAiring: function (model) {
|
||||
var nextAiring = model.get('nextAiring');
|
||||
|
||||
if (!nextAiring) {
|
||||
return Number.MAX_VALUE;
|
||||
}
|
||||
|
||||
return Moment(nextAiring).unix();
|
||||
}
|
||||
},
|
||||
|
||||
mode: 'client',
|
||||
|
||||
save: function () {
|
||||
@@ -57,6 +45,17 @@ define(
|
||||
});
|
||||
|
||||
return proxy.save();
|
||||
},
|
||||
|
||||
//Sorters
|
||||
nextAiring: function (model, attr) {
|
||||
var nextAiring = model.get(attr);
|
||||
|
||||
if (!nextAiring) {
|
||||
return Number.MAX_VALUE;
|
||||
}
|
||||
|
||||
return Moment(nextAiring).unix();
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user