mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-05 02:22:31 +01:00
Fixed calendar on air
This commit is contained in:
parent
0208ae8347
commit
a00587dbd4
@ -55,23 +55,23 @@ define(
|
||||
_instance.collection.fetch({
|
||||
data : { start: startDate, end: endDate },
|
||||
success: function (calendarCollection) {
|
||||
_.each(calendarCollection.models, function (element) {
|
||||
calendarCollection.each(function (element) {
|
||||
var episodeTitle = element.get('title');
|
||||
var seriesTitle = element.get('series').title;
|
||||
var start = element.get('airDateUtc');
|
||||
var statusLevel = _instance.getStatusLevel(element);
|
||||
var runtime = element.get('series').runtime;
|
||||
var end = Moment(start).add('minutes', runtime);
|
||||
var end = Moment(start).add('minutes', runtime).toISOString();
|
||||
|
||||
|
||||
element.set({
|
||||
title : seriesTitle,
|
||||
episodeTitle: episodeTitle,
|
||||
start : start,
|
||||
end : end,
|
||||
allDay : false,
|
||||
statusLevel : statusLevel
|
||||
allDay : false
|
||||
});
|
||||
|
||||
element.set('statusLevel', _instance.getStatusLevel(element));
|
||||
element.set('model', element);
|
||||
});
|
||||
|
||||
@ -93,6 +93,10 @@ define(
|
||||
}
|
||||
|
||||
else if (currentTime.isAfter(start) && currentTime.isBefore(end)) {
|
||||
var s = start.toISOString();
|
||||
var e = end.toISOString();
|
||||
var c = currentTime.toISOString();
|
||||
|
||||
statusLevel = 'warning';
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ define(
|
||||
var end = Moment(start).add('minutes', runtime);
|
||||
|
||||
this.model.set({
|
||||
end: end
|
||||
end: end.toISOString()
|
||||
})
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user