diff --git a/sites/magentatv.at/magentatv.at.channels.xml b/sites/magentatv.at/magentatv.at.channels.xml index 6e725854..0c13d156 100644 --- a/sites/magentatv.at/magentatv.at.channels.xml +++ b/sites/magentatv.at/magentatv.at.channels.xml @@ -4,78 +4,87 @@ 1-2-3.tv 13th Street HD 3sat + Al Jazeera ARD-alpha ARTE Deutsch ATV ATV 2 - Al Jazeera Auto Motor und Sport - BBC Entertainment Europe - BBC World News Europe Baby TV + BBC Entertainment Europe + BBC World News Europe Bergblick Bibel TV - Bloomberg - Blue Hustler Europe + Bloomberg + Blue Hustler Europe Bon Gusto Boomerang - CCTV 4 Europe - CGTN - CNBC - CNN Cartoon Network - Club MTV + CCTV 4 Europe + CGTN + Club MTV + CNBC + CNN COMEDY CENTRAL Crime + Investigation - DMAX Austria Das Erste DELUXE MUSIC Disney Channel Deutschland - Duna TV + DMAX Austria + Duna TV E! Europe eSPORTS1 HD euronews (D) Eurosport 1 Germany + + Eurosport Turkey Evil Angel TV Extreme Sports Channel - Fashion TV - Film Klub + Fashion TV + Film Klub Fix&Foxi - France 24 (en francais) + France 24 (en francais) GEO TV HD GoTV Gute Laune TV + Habertürk + Hayat TV + Heimatkanal + History Germany HOME & GARDEN TV HD HR Fernsehen - HRT TV 1 + HRT TV 1 HSE HSE Extra HSE Trend - Habertürk - Hayat TV - Heimatkanal - Hustler TV Europe - KIKA + HT 1 Innviertel + Hustler TV Europe Kabel Eins Austria Kabel Eins Classics Kabel Eins Doku Austria + KIKA Kinowelt TV HD + Klasik TV Krone TV - MTV 00s - MTV 80s - MTV 90s - MTV - MTV Hits Europe - MTV Live HD + K-TV Melodie TV Motorvision + MTV + MTV 00s + MTV 80s + MTV 90s + MTV Hits Europe + MTV Live HD N24 Doku - N-TV Austria NatGeo HD National Geographic Wild HD - Nick.Jr. Nick HD + Nick.Jr. Nitro Austria + N-TV Austria + Oe24 TV + Okto TV + One ORF 1 ORF 2 Burgenland ORF 2 Europe @@ -89,14 +98,11 @@ ORF 2 Wien ORF III ORF Sport + - Oe24 TV - Okto TV - One Phoenix - Pink Extra - Pink Film - Pink Music - Pink Plus + Pink Extra + Pink Film + Pink Music + Pink Plus ProSieben Austria ProSieben FUN HD ProSieben Maxx Austria @@ -106,24 +112,22 @@ QVC Style Deutschland QVC ZWEI R9 + Rai Due + Rai Tre + Rai Uno RBB Berlin + RiC + Romance TV RTL Austria RTL Crime Deutschland RTL Living Deutschland RTL Passion Deutschland - RTLup RTL Zwei Austria + RTLup RTR Planeta - Rai Uno - Rai Due - Rai Tre - RiC - Romance TV - SR Fernsehen HD - SWR Fernsehen RP - SAT.1 emotions Sat. 1 Gold Österreich Sat. 1 Österreich + SAT.1 emotions Schau TV Servus TV Österreich Sixx Austria @@ -133,8 +137,8 @@ Sky Cinema Classics Sky Cinema Family Sky Cinema Fun - Sky Cinema Premieren HD Sky Cinema Premieren +24 + Sky Cinema Premieren HD Sky Cinema Special HD Sky Cinema Thriller HD Sky Comedy HD @@ -143,9 +147,14 @@ Sky Krimi HD Sky Nature HD Sky One HD + Sky Replay + Sky Showcase + Sky Sport 1 HD Sky Sport 10 HD Sky Sport 11 HD - Sky Sport 1 HD + Sky Sport 12 HD + Sky Sport 13 HD + Sky Sport 14 HD Sky Sport 2 HD Sky Sport 3 HD Sky Sport 4 HD @@ -161,8 +170,8 @@ Sky Sport Austria 5 Sky Sport Austria 6 Sky Sport Austria 7 - Sky Sport Bundesliga 10 HD Sky Sport Bundesliga 1 HD + Sky Sport Bundesliga 10 HD Sky Sport Bundesliga 2 HD Sky Sport Bundesliga 3 HD Sky Sport Bundesliga 4 HD @@ -172,33 +181,37 @@ Sky Sport Bundesliga 8 HD Sky Sport Bundesliga 9 HD Sky Sport F1 HD + Sky Sport Golf Sky Sport News HD + Sky Sport Premier League Spiegel Geschichte Spiegel TV Wissen HD Sport 1 Sport 1+ SPORTDIGITAL FUSSBALL + SR Fernsehen HD Stingray All Day Party! Stingray Classic R&B Stingray Classic Rock Super RTL Austria + SWR Fernsehen RP SYFY HD - TLC Austria - TRT World - TV5MONDE Europe - TV Polonia tagesschau24 HD Tele 5 Tirol TV - Toxic TV + TLC Austria + Toxic TV + TRT World + TV Polonia + TV5MONDE Europe Universal TV HD - Vesti + Vesti Volksmusik TV Vox Austria W24 - WDR Fernsehen Köln Warner TV Comedy HD Warner TV Serie + WDR Fernsehen Köln ZDF ZDF Info ZDF Neo diff --git a/sites/magentatv.at/magentatv.at.config.js b/sites/magentatv.at/magentatv.at.config.js index 2295d91d..6e768fce 100644 --- a/sites/magentatv.at/magentatv.at.config.js +++ b/sites/magentatv.at/magentatv.at.config.js @@ -12,8 +12,8 @@ module.exports = { ttl: 60 * 60 * 1000 // 1 hour } }, - url: function ({ date, channel }) { - return `${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date.format('YYYYMMDDHHmmss')}` + url: function ({ date }) { + return `${API_STATIC_ENDPOINT}/de/events/segments/${date.format('YYYYMMDDHHmmss')}` }, async parser({ content, channel, date }) { let programs = [] @@ -21,7 +21,7 @@ module.exports = { if (!items.length) return programs const promises = [ axios.get( - `${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date + `${API_STATIC_ENDPOINT}/de/events/segments/${date .add(6, 'h') .format('YYYYMMDDHHmmss')}`, { @@ -29,7 +29,7 @@ module.exports = { } ), axios.get( - `${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date + `${API_STATIC_ENDPOINT}/de/events/segments/${date .add(12, 'h') .format('YYYYMMDDHHmmss')}`, { @@ -37,7 +37,7 @@ module.exports = { } ), axios.get( - `${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date + `${API_STATIC_ENDPOINT}/de/events/segments/${date .add(18, 'h') .format('YYYYMMDDHHmmss')}`, { @@ -59,11 +59,12 @@ module.exports = { .catch(console.error) for (let item of items) { - const detail = await loadProgramDetails(item, channel) + const detail = await loadProgramDetails(item) programs.push({ title: item.title, sub_title: detail.episodeName, description: detail.longDescription, + date: detail.productionDate, category: detail.genres, actors: detail.actors, directors: detail.directors, @@ -93,9 +94,9 @@ module.exports = { } } -async function loadProgramDetails(item, channel) { +async function loadProgramDetails(item) { if (!item.id) return {} - const url = `${API_PROD_ENDPOINT}/replayEvent/${item.id}?returnLinearContent=true&language=${channel.lang}` + const url = `${API_PROD_ENDPOINT}/replayEvent/${item.id}?returnLinearContent=true` const data = await axios .get(url) .then(r => r.data) diff --git a/sites/magentatv.at/magentatv.at.test.js b/sites/magentatv.at/magentatv.at.test.js index 9744a035..8785663c 100644 --- a/sites/magentatv.at/magentatv.at.test.js +++ b/sites/magentatv.at/magentatv.at.test.js @@ -24,7 +24,7 @@ const channel = { } it('can generate valid url', () => { - expect(url({ date, channel })).toBe(`${API_STATIC_ENDPOINT}/de/events/segments/20221030000000`) + expect(url({ date })).toBe(`${API_STATIC_ENDPOINT}/de/events/segments/20221030000000`) }) it('can parse response', async () => { @@ -45,7 +45,7 @@ it('can parse response', async () => { }) } else if ( url === - `${API_PROD_ENDPOINT}/replayEvent/crid:~~2F~~2Fgn.tv~~2F2236391~~2FEP019388320252,imi:af4af994f29354e64878101c0612b17999d0c1a3?returnLinearContent=true&language=de` + `${API_PROD_ENDPOINT}/replayEvent/crid:~~2F~~2Fgn.tv~~2F2236391~~2FEP019388320252,imi:af4af994f29354e64878101c0612b17999d0c1a3?returnLinearContent=true` ) { return Promise.resolve({ data: JSON.parse(fs.readFileSync(path.resolve(__dirname, '__data__/program.json'))) @@ -69,6 +69,7 @@ it('can parse response', async () => { sub_title: 'Mutterinstinkt', description: 'Patty Branson wird von einem Jungen in einem Park angegriffen und von diesem verfolgt. Der Junge wurde von Michelle Osborne engagiert, die vorgibt, die leibliche Mutter des Mädchens zu sein. Doch ist dies tatsächlich die Wahrheit?', + date: '2004', category: ['Drama-Serie', 'Krimi Drama', 'Action', 'Thriller'], actors: [ 'Christopher Meloni',