diff --git a/downloader/ard-downloader.js b/downloader/ard-downloader.js index 15f2171..7230134 100644 --- a/downloader/ard-downloader.js +++ b/downloader/ard-downloader.js @@ -48,11 +48,12 @@ exports.channelIds = [ let runningPromise = null; function parseShows(showData, showObj) { - let infoLine = showData.SPAN[1]._.trim(); + let infoLine = showData.IMG[0].SPAN[1]._.trim(); let channels = infoLine.split('|').map((s) => s.trim()); let times = channels.pop().split(/ - | /).map((s) => s.trim()); - let show = new Show(showData.B[0]); + let show = new Show(showData.IMG[0].B[0]); + show.infoUrl = 'http://programm.ard.de' + showData.$.HREF; show.startTime = moment.tz(times[0], 'HH:mm', 'Europe/Berlin'); show.endTime = moment.tz(times[1], 'HH:mm', 'Europe/Berlin'); show.fixMidnightTime(); @@ -88,7 +89,7 @@ function getAllShows(xml) { .then(data => { let showObj = {}; for (let item of data.ROOT.LI) { - parseShows(item.A[0].IMG[0], showObj); + parseShows(item.A[0], showObj); } return Promise.resolve(showObj); }); diff --git a/downloader/dw-downloader.js b/downloader/dw-downloader.js index 05d3e4d..75d3afc 100644 --- a/downloader/dw-downloader.js +++ b/downloader/dw-downloader.js @@ -8,6 +8,7 @@ exports.channelIds = ['deutsche_welle']; function parseShow(showJson, channelId) { let show = new Show(showJson.name); + show.description = showJson.programDescription; show.channel = channelId; show.subtitle = showJson.description; show.startTime = moment(showJson.startDate); diff --git a/downloader/parliament-downloader.js b/downloader/parliament-downloader.js index 7f899a2..5ad40c8 100644 --- a/downloader/parliament-downloader.js +++ b/downloader/parliament-downloader.js @@ -12,6 +12,7 @@ exports.channelIds = ['parlamentsfernsehen_1', 'parlamentsfernsehen_2']; function parseShow(showData, channelId) { let show = new Show(showData.langtitel[0]); + show.description = showData.infos[0] || null; show.channel = channelId; show.startTime = moment(showData.anfangUnix * 1000); show.endTime = moment(showData.endeUnix * 1000); diff --git a/downloader/zdf-downloader.js b/downloader/zdf-downloader.js index b6ba541..301882d 100644 --- a/downloader/zdf-downloader.js +++ b/downloader/zdf-downloader.js @@ -30,6 +30,7 @@ function getShow(json, channelId) { let show = new Show(broadcast.title); show.subtitle = broadcast.subtitle; + show.description = broadcast.text; show.channel = channelId; show.startTime = moment(broadcast.airtimeBegin); show.endTime = moment(broadcast.airtimeEnd); diff --git a/models/Show.js b/models/Show.js index f16be47..950d976 100644 --- a/models/Show.js +++ b/models/Show.js @@ -29,8 +29,10 @@ class Show { clone() { let show = new Show(this.title); + show.description = this.description; show.channel = this.channel; show.subtitle = this.subtitle; + show.infoUrl = this.infoUrl; show.startTime = this.startTime; show.endTime = this.endTime; return show;