From 07d773255ce9be6b3b6adc6ae7d78c3b88057200 Mon Sep 17 00:00:00 2001 From: Arkina <60531069+Arkina1234@users.noreply.github.com> Date: Thu, 7 Jul 2022 03:34:36 -0400 Subject: [PATCH 01/14] Update tvtv.us.config.js --- sites/tvtv.us/tvtv.us.config.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sites/tvtv.us/tvtv.us.config.js b/sites/tvtv.us/tvtv.us.config.js index 6767ccd2..74988ff6 100644 --- a/sites/tvtv.us/tvtv.us.config.js +++ b/sites/tvtv.us/tvtv.us.config.js @@ -55,6 +55,7 @@ module.exports = { site_id: station.id, name: stationData.name, xmltv_id: parseChannelId(stationData) + logo: parseChannelIcon(item) } break default: @@ -125,3 +126,9 @@ function parseIcon(item) { ? `https://tvtv.us/gn/i/${item.program.preferredImage.uri}` : null } + +function parseChannelIcon(item) { + return item.station.preferredImage && item.station.preferredImage.uri + ? `https://tvtv.us/gn/i/${item.station.preferredImage.uri}` + : null +} From 7c9715fa3d1120230a787bb92ead9126f82a4c36 Mon Sep 17 00:00:00 2001 From: Arkina <60531069+Arkina1234@users.noreply.github.com> Date: Thu, 7 Jul 2022 03:37:52 -0400 Subject: [PATCH 02/14] Update tvtv.us.test.js --- sites/tvtv.us/tvtv.us.test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/sites/tvtv.us/tvtv.us.test.js b/sites/tvtv.us/tvtv.us.test.js index 2153da64..a6b9ad21 100644 --- a/sites/tvtv.us/tvtv.us.test.js +++ b/sites/tvtv.us/tvtv.us.test.js @@ -12,6 +12,7 @@ const date = dayjs.utc('2022-01-17', 'YYYY-MM-DD').startOf('d') const channel = { site_id: '62670', xmltv_id: 'AMITV.ca' + logo: https://tvtv.us/gn/i/assets/s62670_ll_h15_ab.png?w=360&h=270 } it('can generate valid url', () => { From a50b2fe141a1d81c0d230386a79aadba0ed27365 Mon Sep 17 00:00:00 2001 From: Arkina <60531069+Arkina1234@users.noreply.github.com> Date: Thu, 7 Jul 2022 03:38:36 -0400 Subject: [PATCH 03/14] Update tvtv.us.test.js --- sites/tvtv.us/tvtv.us.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/tvtv.us/tvtv.us.test.js b/sites/tvtv.us/tvtv.us.test.js index a6b9ad21..197128cb 100644 --- a/sites/tvtv.us/tvtv.us.test.js +++ b/sites/tvtv.us/tvtv.us.test.js @@ -12,7 +12,7 @@ const date = dayjs.utc('2022-01-17', 'YYYY-MM-DD').startOf('d') const channel = { site_id: '62670', xmltv_id: 'AMITV.ca' - logo: https://tvtv.us/gn/i/assets/s62670_ll_h15_ab.png?w=360&h=270 + logo: 'https://tvtv.us/gn/i/assets/s62670_ll_h15_ab.png?w=360&h=270' } it('can generate valid url', () => { From 097184c100a03ca11da18839fb544872158875c0 Mon Sep 17 00:00:00 2001 From: Arkina <60531069+Arkina1234@users.noreply.github.com> Date: Thu, 7 Jul 2022 03:41:46 -0400 Subject: [PATCH 04/14] Update tvtv.us.config.js --- sites/tvtv.us/tvtv.us.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/tvtv.us/tvtv.us.config.js b/sites/tvtv.us/tvtv.us.config.js index 74988ff6..cdae5560 100644 --- a/sites/tvtv.us/tvtv.us.config.js +++ b/sites/tvtv.us/tvtv.us.config.js @@ -102,7 +102,7 @@ function parseTitle(item) { } function parseSubtitle(item) { - return item.program.episodeTitle + return item.program.episodeTitle && item.program.eventTitle } function parseDescription(item) { From 5baa5dee3df437526982b6b9a060ba6c991bdb60 Mon Sep 17 00:00:00 2001 From: Arkina <60531069+Arkina1234@users.noreply.github.com> Date: Thu, 7 Jul 2022 03:42:35 -0400 Subject: [PATCH 05/14] Update tvtv.us.test.js --- sites/tvtv.us/tvtv.us.test.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sites/tvtv.us/tvtv.us.test.js b/sites/tvtv.us/tvtv.us.test.js index 197128cb..0ddd04eb 100644 --- a/sites/tvtv.us/tvtv.us.test.js +++ b/sites/tvtv.us/tvtv.us.test.js @@ -36,6 +36,7 @@ it('can parse response', () => { stop: '2022-01-20T00:30:00.000Z', title: 'Reflect and Renew With Kevin Naidoo', sub_title: 'Empowerment', + sub_title: 'Empowerment', description: `Kevin demonstrates a meditation and yoga practice to reclaim his courage and confidence.`, category: ['Health'], season: 1, @@ -47,6 +48,7 @@ it('can parse response', () => { stop: '2022-01-20T01:00:00.000Z', title: 'Four Senses', sub_title: 'Sizzled & Seared', + sub_title: 'Sizzled & Seared', description: `Everything is sizzled and seared as chef Corbin Tomaszeski joins Christine and Carl in the kitchen.`, category: ['House/garden'], icon: 'https://tvtv.us/gn/i/assets/p10464580_b_v7_aa.jpg?w=240&h=360' From c5f8aa19761940609a5d33e2896d858e68cbb72b Mon Sep 17 00:00:00 2001 From: Arkina <60531069+Arkina1234@users.noreply.github.com> Date: Thu, 7 Jul 2022 03:47:27 -0400 Subject: [PATCH 06/14] Update tvtv.us.config.js --- sites/tvtv.us/tvtv.us.config.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sites/tvtv.us/tvtv.us.config.js b/sites/tvtv.us/tvtv.us.config.js index cdae5560..c4341623 100644 --- a/sites/tvtv.us/tvtv.us.config.js +++ b/sites/tvtv.us/tvtv.us.config.js @@ -54,14 +54,15 @@ module.exports = { channel = { site_id: station.id, name: stationData.name, - xmltv_id: parseChannelId(stationData) + xmltv_id: parseChannelId(stationData), logo: parseChannelIcon(item) } break default: channel = { site_id: station.id, - name: stationData.name + name: stationData.name, + logo: parseChannelIcon(item) } break } From d220ddc4ba4a0ee0e984b120f211cb8b49425365 Mon Sep 17 00:00:00 2001 From: Arkina <60531069+Arkina1234@users.noreply.github.com> Date: Thu, 7 Jul 2022 03:48:48 -0400 Subject: [PATCH 07/14] Update tvtv.us.test.js --- sites/tvtv.us/tvtv.us.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/tvtv.us/tvtv.us.test.js b/sites/tvtv.us/tvtv.us.test.js index 0ddd04eb..35796cde 100644 --- a/sites/tvtv.us/tvtv.us.test.js +++ b/sites/tvtv.us/tvtv.us.test.js @@ -11,7 +11,7 @@ dayjs.extend(utc) const date = dayjs.utc('2022-01-17', 'YYYY-MM-DD').startOf('d') const channel = { site_id: '62670', - xmltv_id: 'AMITV.ca' + xmltv_id: 'AMITV.ca', logo: 'https://tvtv.us/gn/i/assets/s62670_ll_h15_ab.png?w=360&h=270' } From 9c0222063fb976493d41b32a505cee523ef7db85 Mon Sep 17 00:00:00 2001 From: Arkina <60531069+Arkina1234@users.noreply.github.com> Date: Thu, 7 Jul 2022 03:50:20 -0400 Subject: [PATCH 08/14] Update tvtv.us.config.js --- sites/tvtv.us/tvtv.us.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/tvtv.us/tvtv.us.config.js b/sites/tvtv.us/tvtv.us.config.js index c4341623..c845c0f2 100644 --- a/sites/tvtv.us/tvtv.us.config.js +++ b/sites/tvtv.us/tvtv.us.config.js @@ -103,7 +103,7 @@ function parseTitle(item) { } function parseSubtitle(item) { - return item.program.episodeTitle && item.program.eventTitle + return item.program.episodeTitle } function parseDescription(item) { From 52f254634fac62c29ef30d8fea08833f8e838bac Mon Sep 17 00:00:00 2001 From: Arkina <60531069+Arkina1234@users.noreply.github.com> Date: Thu, 7 Jul 2022 03:50:54 -0400 Subject: [PATCH 09/14] Update tvtv.us.test.js --- sites/tvtv.us/tvtv.us.test.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/sites/tvtv.us/tvtv.us.test.js b/sites/tvtv.us/tvtv.us.test.js index 35796cde..c78a7f98 100644 --- a/sites/tvtv.us/tvtv.us.test.js +++ b/sites/tvtv.us/tvtv.us.test.js @@ -36,7 +36,6 @@ it('can parse response', () => { stop: '2022-01-20T00:30:00.000Z', title: 'Reflect and Renew With Kevin Naidoo', sub_title: 'Empowerment', - sub_title: 'Empowerment', description: `Kevin demonstrates a meditation and yoga practice to reclaim his courage and confidence.`, category: ['Health'], season: 1, @@ -48,7 +47,6 @@ it('can parse response', () => { stop: '2022-01-20T01:00:00.000Z', title: 'Four Senses', sub_title: 'Sizzled & Seared', - sub_title: 'Sizzled & Seared', description: `Everything is sizzled and seared as chef Corbin Tomaszeski joins Christine and Carl in the kitchen.`, category: ['House/garden'], icon: 'https://tvtv.us/gn/i/assets/p10464580_b_v7_aa.jpg?w=240&h=360' From 27f2476b6a287c770a6e625eaea615d2c79d4e1f Mon Sep 17 00:00:00 2001 From: Arkina <60531069+Arkina1234@users.noreply.github.com> Date: Thu, 7 Jul 2022 04:07:02 -0400 Subject: [PATCH 10/14] Update tvtv.us.config.js --- sites/tvtv.us/tvtv.us.config.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sites/tvtv.us/tvtv.us.config.js b/sites/tvtv.us/tvtv.us.config.js index c845c0f2..93e4482a 100644 --- a/sites/tvtv.us/tvtv.us.config.js +++ b/sites/tvtv.us/tvtv.us.config.js @@ -20,6 +20,7 @@ module.exports = { title: parseTitle(item), sub_title: parseSubtitle(item), description: parseDescription(item), + ratings: parseRating(item), category: parseCategory(item), season: parseSeason(item), episode: parseEpisode(item), @@ -122,6 +123,14 @@ function parseEpisode(item) { return item.program.episodeNum || null } +function parseRating(item) { + return { + system: item.program.ratings.body, + value: item.program.ratings.code + } +} +} + function parseIcon(item) { return item.program.preferredImage && item.program.preferredImage.uri ? `https://tvtv.us/gn/i/${item.program.preferredImage.uri}` From 7e7bcba540ece0ec020a59042d881759871e1d7f Mon Sep 17 00:00:00 2001 From: Arkina <60531069+Arkina1234@users.noreply.github.com> Date: Thu, 7 Jul 2022 04:10:09 -0400 Subject: [PATCH 11/14] Update tvtv.us.test.js --- sites/tvtv.us/tvtv.us.test.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sites/tvtv.us/tvtv.us.test.js b/sites/tvtv.us/tvtv.us.test.js index c78a7f98..2b358bd2 100644 --- a/sites/tvtv.us/tvtv.us.test.js +++ b/sites/tvtv.us/tvtv.us.test.js @@ -37,6 +37,10 @@ it('can parse response', () => { title: 'Reflect and Renew With Kevin Naidoo', sub_title: 'Empowerment', description: `Kevin demonstrates a meditation and yoga practice to reclaim his courage and confidence.`, + rating: { + system: 'USA Parental Rating', + value: 'TVG' + }, category: ['Health'], season: 1, episode: 6, @@ -48,6 +52,10 @@ it('can parse response', () => { title: 'Four Senses', sub_title: 'Sizzled & Seared', description: `Everything is sizzled and seared as chef Corbin Tomaszeski joins Christine and Carl in the kitchen.`, + rating: { + system: 'USA Parental Rating', + value: 'TVG' + }, category: ['House/garden'], icon: 'https://tvtv.us/gn/i/assets/p10464580_b_v7_aa.jpg?w=240&h=360' } From c5a6c22390b8b22658793214bfb47a62446325f3 Mon Sep 17 00:00:00 2001 From: Arkina <60531069+Arkina1234@users.noreply.github.com> Date: Thu, 7 Jul 2022 04:11:48 -0400 Subject: [PATCH 12/14] Update tvtv.us.config.js --- sites/tvtv.us/tvtv.us.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/sites/tvtv.us/tvtv.us.config.js b/sites/tvtv.us/tvtv.us.config.js index 93e4482a..c558cffb 100644 --- a/sites/tvtv.us/tvtv.us.config.js +++ b/sites/tvtv.us/tvtv.us.config.js @@ -129,7 +129,6 @@ function parseRating(item) { value: item.program.ratings.code } } -} function parseIcon(item) { return item.program.preferredImage && item.program.preferredImage.uri From f72ac1b9ba29099f429c807c4ea8f9f45ad9f717 Mon Sep 17 00:00:00 2001 From: Arkina <60531069+Arkina1234@users.noreply.github.com> Date: Thu, 7 Jul 2022 04:19:35 -0400 Subject: [PATCH 13/14] Update tvtv.us.test.js --- sites/tvtv.us/tvtv.us.test.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sites/tvtv.us/tvtv.us.test.js b/sites/tvtv.us/tvtv.us.test.js index 2b358bd2..c78a7f98 100644 --- a/sites/tvtv.us/tvtv.us.test.js +++ b/sites/tvtv.us/tvtv.us.test.js @@ -37,10 +37,6 @@ it('can parse response', () => { title: 'Reflect and Renew With Kevin Naidoo', sub_title: 'Empowerment', description: `Kevin demonstrates a meditation and yoga practice to reclaim his courage and confidence.`, - rating: { - system: 'USA Parental Rating', - value: 'TVG' - }, category: ['Health'], season: 1, episode: 6, @@ -52,10 +48,6 @@ it('can parse response', () => { title: 'Four Senses', sub_title: 'Sizzled & Seared', description: `Everything is sizzled and seared as chef Corbin Tomaszeski joins Christine and Carl in the kitchen.`, - rating: { - system: 'USA Parental Rating', - value: 'TVG' - }, category: ['House/garden'], icon: 'https://tvtv.us/gn/i/assets/p10464580_b_v7_aa.jpg?w=240&h=360' } From bc606fea8cf83c74c553c43e6ee0604cfb11ea05 Mon Sep 17 00:00:00 2001 From: Arkina <60531069+Arkina1234@users.noreply.github.com> Date: Thu, 7 Jul 2022 04:20:30 -0400 Subject: [PATCH 14/14] Update tvtv.us.config.js --- sites/tvtv.us/tvtv.us.config.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sites/tvtv.us/tvtv.us.config.js b/sites/tvtv.us/tvtv.us.config.js index c558cffb..c845c0f2 100644 --- a/sites/tvtv.us/tvtv.us.config.js +++ b/sites/tvtv.us/tvtv.us.config.js @@ -20,7 +20,6 @@ module.exports = { title: parseTitle(item), sub_title: parseSubtitle(item), description: parseDescription(item), - ratings: parseRating(item), category: parseCategory(item), season: parseSeason(item), episode: parseEpisode(item), @@ -123,13 +122,6 @@ function parseEpisode(item) { return item.program.episodeNum || null } -function parseRating(item) { - return { - system: item.program.ratings.body, - value: item.program.ratings.code - } -} - function parseIcon(item) { return item.program.preferredImage && item.program.preferredImage.uri ? `https://tvtv.us/gn/i/${item.program.preferredImage.uri}`