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