1
0
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:
Mark McDowall 2013-08-21 21:30:26 -07:00
parent 0208ae8347
commit a00587dbd4
2 changed files with 10 additions and 6 deletions

View File

@ -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';
}

View File

@ -20,7 +20,7 @@ define(
var end = Moment(start).add('minutes', runtime);
this.model.set({
end: end
end: end.toISOString()
})
},