Skip to content

Commit

Permalink
fixed the property names
Browse files Browse the repository at this point in the history
  • Loading branch information
Paxx committed May 12, 2023
1 parent f187551 commit e13f881
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions src/auto_scheduler/mrss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,22 +270,22 @@ export class MRSSAutoScheduler {
channelId: feed.channelId,
title: "LIVE EVENT",
duration: totalScheduleEventDuration,
start_time: asset.start_date,
end_time: asset.end_date,
start_time: asset.start_time,
end_time: asset.end_time,
url: asset.url,
liveUrl: feed.liveUrl,
type: ScheduleEventType.LIVE,
}));
feed.resetLiveEventCountdown();
} else {
console.log(`[${feed.channelId}]: Adding schedule event (${ScheduleEventType.VOD}): title=${asset.title}, start=${asset.start_date}, end=${asset.end_date}`);
console.log(`[${feed.channelId}]: Adding schedule event (${ScheduleEventType.VOD}): title=${asset.title}, start=${asset.start_time}, end=${asset.end_time}`);
scheduleEventsToAdd.push(new ScheduleEvent({
id: uuidv4(),
channelId: feed.channelId,
title: asset.title,
duration: totalScheduleEventDuration,
start_time: asset.start_date,
end_time: asset.start_date,
start_time: asset.start_time,
end_time: asset.start_time,
url: asset.url,
type: ScheduleEventType.VOD,
}));
Expand Down
14 changes: 7 additions & 7 deletions src/models/mrssFeedModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export interface MRSSAsset {
title: string;
url: string;
duration: number;
start_date?: number;
end_date?: number;
start_time?: number;
end_time?: number;
}

interface MRSSCache {
Expand Down Expand Up @@ -156,7 +156,7 @@ export class MRSSFeed {
// update duration
const duration = await hlsduration(new URL(asset.url));
asset.duration = Math.ceil(duration);
console.log(`Updated asset duration for ${asset.title} to ${asset.duration} | startTime=${asset.start_date} | endTime=${asset.end_date}`);
console.log(`Updated asset duration for ${asset.title} to ${asset.duration} | startTime=${asset.start_time} | endTime=${asset.end_time}`);
}
}
}
Expand All @@ -169,17 +169,17 @@ export class MRSSFeed {
cachedAsset.title = feedEntry.title;
cachedAsset.url = feedEntry.link;
cachedAsset.duration = -1;
cachedAsset.start_date = feedEntry.start_date
cachedAsset.end_date = feedEntry.start_date
cachedAsset.start_time = feedEntry.start_time
cachedAsset.end_time = feedEntry.start_time
} else {
debug("Adding new entry to cache");
this.cache.assets.push({
id: feedEntry.id,
title: feedEntry.title,
url: feedEntry.link,
duration: -1,
start_date : feedEntry.start_date,
end_date : feedEntry.end_date,
start_time : feedEntry.start_time,
end_time : feedEntry.start_time,
});
}
}
Expand Down

0 comments on commit e13f881

Please sign in to comment.