mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 06:45:19 -07:00
Fix sorting of unkown release date.
This commit is contained in:
parent
5e8b617625
commit
92e9dc6ee1
2 changed files with 12 additions and 1 deletions
|
@ -8,7 +8,7 @@ module.exports = TemplatedCell.extend({
|
||||||
"July", "August", "September", "October", "November", "December"
|
"July", "August", "September", "October", "November", "December"
|
||||||
];
|
];
|
||||||
|
|
||||||
this.$el.html("To be announced");
|
this.$el.html("");
|
||||||
|
|
||||||
if (this.model.get("inCinemas")) {
|
if (this.model.get("inCinemas")) {
|
||||||
var cinemasDate = new Date(this.model.get("inCinemas"));
|
var cinemasDate = new Date(this.model.get("inCinemas"));
|
||||||
|
|
|
@ -100,7 +100,18 @@ var Collection = PageableCollection.extend({
|
||||||
return percentOfEpisodes + episodeCount / 1000000;
|
return percentOfEpisodes + episodeCount / 1000000;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
inCinemas : {
|
||||||
|
|
||||||
|
sortValue : function(model, attr) {
|
||||||
|
var monthNames = ["January", "February", "March", "April", "May", "June",
|
||||||
|
"July", "August", "September", "October", "November", "December"
|
||||||
|
];
|
||||||
|
if (model.get("inCinemas")) {
|
||||||
|
return model.get("inCinemas");
|
||||||
|
}
|
||||||
|
return "2100-01-01";
|
||||||
|
}
|
||||||
|
},
|
||||||
path : {
|
path : {
|
||||||
sortValue : function(model) {
|
sortValue : function(model) {
|
||||||
var path = model.get('path');
|
var path = model.get('path');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue