From fc2668d587c041312deaae9fd47cf7a6f6f34681 Mon Sep 17 00:00:00 2001 From: Conventional Changelog Action Date: Thu, 18 Jan 2024 14:13:39 +0000 Subject: [PATCH 1/2] chore(release): v5.1.0 --- CHANGELOG.md | 25 +++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72d3deda7..a226dd35c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,28 @@ +## [5.1.0](https://github.com/jwplayer/ott-web-app/compare/v5.0.0...v5.1.0) (2024-01-18) + + +### Features + +* add user_id and profile_id for CDN analytics ([114150e](https://github.com/jwplayer/ott-web-app/commit/114150e6cdd8aaf436c06df30ea785f458b641f0)) +* add user_id and profile_id for CDN analytics ([0bacf37](https://github.com/jwplayer/ott-web-app/commit/0bacf37998904278b46bca17d6029f054150fc51)) +* cdn analytics code cleanup ([aeef40f](https://github.com/jwplayer/ott-web-app/commit/aeef40f6f375783cd0820fd27154b616570d3cf0)) +* cdn analytics code cleanup ([d92937d](https://github.com/jwplayer/ott-web-app/commit/d92937da7592c580df8230a4c1ee2fad3765ff55)) +* **epg:** fix live channel casing ([43c487c](https://github.com/jwplayer/ott-web-app/commit/43c487ca72bfdbf5977e6f873f3505fe5bf6011a)) +* **epg:** use getNamedModule ([0394daf](https://github.com/jwplayer/ott-web-app/commit/0394daf6ce8d73103aee5f5667a98fa089325569)) +* **project:** add view nexa epg provider ([9a71457](https://github.com/jwplayer/ott-web-app/commit/9a71457ae51dec38538e5b5ac719426250d3cae4)) +* **project:** change content type default schemas ([e100384](https://github.com/jwplayer/ott-web-app/commit/e1003844da97ba97618ed46e9eba076e49a6159c)) +* **project:** change the way of DI ([4154488](https://github.com/jwplayer/ott-web-app/commit/4154488dbe0e157ea92434382cc5d2d646cdd2bb)) +* **project:** review comments ([3359612](https://github.com/jwplayer/ott-web-app/commit/3359612cd029858a2ea3f596d23cfc835bda2fc8)) + + +### Bug Fixes + +* **epg:** check lower case, log error ([be774d4](https://github.com/jwplayer/ott-web-app/commit/be774d47780a238800796caf22700c3e4ce7c28f)) +* fix e2e test ([ba1e0de](https://github.com/jwplayer/ott-web-app/commit/ba1e0de5b60c8a5bfed1e52bacaf15d977b69894)) +* missing getState on useConfigStore under updateCardDetails ([#433](https://github.com/jwplayer/ott-web-app/issues/433)) ([ce32908](https://github.com/jwplayer/ott-web-app/commit/ce329084bf8565c475ea37e04006aaa08766c255)) +* place consents in appropriate section ([6281640](https://github.com/jwplayer/ott-web-app/commit/6281640fc4fb0f6f7b3b56cc34749465348cc7a2)) +* transform url to lowerCase ([68d31c4](https://github.com/jwplayer/ott-web-app/commit/68d31c46df3b5999f8bee79ed269e597b30993bf)) + ## [5.0.0](https://github.com/jwplayer/ott-web-app/compare/v4.31.1...v5.0.0) (2024-01-11) diff --git a/package.json b/package.json index 9ed6dfdd2..73deb7e56 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jw-ott-webapp", - "version": "5.0.0", + "version": "5.1.0", "main": "index.js", "repository": "https://github.com/jwplayer/ott-web-app.git", "author": "JW Player", From 066971ab03a074d65e74746642a90ecce108b042 Mon Sep 17 00:00:00 2001 From: Anton Lantukh Date: Thu, 18 Jan 2024 16:55:36 +0100 Subject: [PATCH 2/2] fix(epg): fix repeatable keys for demo + empty service --- src/stores/EpgController.ts | 11 ++++++----- test-e2e/tests/live_channel_test.ts | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/stores/EpgController.ts b/src/stores/EpgController.ts index bc1783437..8bb30f219 100644 --- a/src/stores/EpgController.ts +++ b/src/stores/EpgController.ts @@ -34,8 +34,9 @@ export default class EpgController { const utcStartDate = new Date(Date.UTC(startDate.getUTCFullYear(), startDate.getUTCMonth(), startDate.getUTCDate())); const daysDelta = differenceInDays(today, utcStartDate); - return programs.map((program) => ({ + return programs.map((program, idx) => ({ ...program, + id: `${program.id}_${idx}`, startTime: addDays(new Date(program.startTime), daysDelta).toJSON(), endTime: addDays(new Date(program.endTime), daysDelta).toJSON(), })); @@ -54,7 +55,7 @@ export default class EpgController { const transformResults = await Promise.allSettled( data.map((program) => epgService - .transformProgram(program) + ?.transformProgram(program) // This quiets promise resolution errors in the console .catch((error) => { logDev(error); @@ -78,7 +79,7 @@ export default class EpgController { getSchedule = async (item: PlaylistItem) => { const epgService = this.getEpgService(item); - const schedule = await epgService.fetchSchedule(item); + const schedule = await epgService?.fetchSchedule(item); const programs = await this.parseSchedule(schedule, item); const catchupHours = item.catchupHours && parseInt(item.catchupHours); @@ -95,8 +96,8 @@ export default class EpgController { }; getEpgService = (item: PlaylistItem) => { - const scheduleType = item?.scheduleType || EPG_TYPE.jwp; - const service = getNamedModule(EpgService, scheduleType?.toLowerCase()); + const scheduleType = item?.scheduleType?.toLocaleLowerCase() || EPG_TYPE.jwp; + const service = getNamedModule(EpgService, scheduleType, false); if (!service) { console.error(`No epg service was added for the ${scheduleType} schedule type`); diff --git a/test-e2e/tests/live_channel_test.ts b/test-e2e/tests/live_channel_test.ts index 855c40562..3b6e56d78 100644 --- a/test-e2e/tests/live_channel_test.ts +++ b/test-e2e/tests/live_channel_test.ts @@ -41,8 +41,8 @@ const shelfContainerLocator = locate({ css: 'div[role="row"]' }); const shelfLocator = locate({ css: 'div[role="cell"]' }).inside(shelfContainerLocator); const epgContainerLocator = locate({ css: 'div[data-testid="container"]' }); -const makeEpgProgramLocator = (id: string) => locate({ css: `div[data-testid="${id}"]` }).inside(epgContainerLocator); -const makeEpgChannelLocator = (id: string) => locate({ css: `div[data-testid="${id}"]` }).inside(epgContainerLocator); +const makeEpgProgramLocator = (id: string) => locate({ css: `div[data-testid*="${id}"]` }).inside(epgContainerLocator); +const makeEpgChannelLocator = (id: string) => locate({ css: `div[data-testid*="${id}"]` }).inside(epgContainerLocator); const channel1Locator = makeEpgChannelLocator(channel1Id); const channel2Locator = makeEpgChannelLocator(channel2Id);