mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
end added to EpisodeModel
This commit is contained in:
@@ -24,17 +24,23 @@ define(['app'], function () {
|
||||
|
||||
return start.format('{h}.{mm}{tt}');
|
||||
},
|
||||
end : function () {
|
||||
var start = Date.create(this.get('airDate'));
|
||||
var runtime = this.get('series').runtime;
|
||||
|
||||
return start.addMinutes(runtime);
|
||||
},
|
||||
statusLevel : function () {
|
||||
var status = this.get('status');
|
||||
var episodeFileId = this.get('episodeFileId');
|
||||
var currentTime = Date.create();
|
||||
var start = Date.create(this.get('start'));
|
||||
var start = Date.create(this.get('airDate'));
|
||||
var end = Date.create(this.get('end'));
|
||||
|
||||
if (currentTime.isBetween(start, end)) {
|
||||
return 'warning';
|
||||
}
|
||||
|
||||
if (start.isBefore(currentTime) || status === 'Missing') {
|
||||
if (start.isBefore(currentTime) && episodeFileId === 0) {
|
||||
return 'danger';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user