Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 21 additions & 12 deletions src/app/components/MediaLoader/configs/liveRadio.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import filterForBlockType from '#lib/utilities/blockHandlers';
import {
LiveRadioBlock,
LiveRadioHeadingBlock,
LiveRadioParagraphBlock,
LiveRadioVersionBlock,
// LiveRadioHeadingBlock,
// LiveRadioParagraphBlock,
// LiveRadioVersionBlock,
} from '#app/models/types/media';
import { ConfigBuilderProps, ConfigBuilderReturnProps } from '../types';
import AUDIO_UI_CONFIG from './constants';
Expand All @@ -15,31 +15,40 @@
const { model: liveRadioBlocks }: LiveRadioBlock =
filterForBlockType(blocks, 'liveRadio') ?? {};

const headingBlock: LiveRadioHeadingBlock =
filterForBlockType(liveRadioBlocks, 'heading') ?? {};
// const headingBlock: LiveRadioHeadingBlock =
// filterForBlockType(liveRadioBlocks, 'heading') ?? {};

const paragraphBlock: LiveRadioParagraphBlock =
filterForBlockType(liveRadioBlocks, 'paragraph') ?? {};
// const paragraphBlock: LiveRadioParagraphBlock =
// filterForBlockType(liveRadioBlocks, 'paragraph') ?? {};

const liveRadioMetadataBlock: LiveRadioVersionBlock =
filterForBlockType(liveRadioBlocks, 'version') ?? {};
// const liveRadioMetadataBlock: LiveRadioVersionBlock =
// filterForBlockType(liveRadioBlocks, 'version') ?? {};

return {
playerConfig: {
...basePlayerConfig,
autoplay: false,
playlistObject: {
title: headingBlock?.text ?? '',
// json?.data?.curations?.[0]?.mediaCollection?.[0]?.model?.overtypedTitle; -- Probs this
// json?.data?.curations?.[0]?.mediaCollection?.[0]?.model?.title;
// json?.data?.curations?.[0]?.title;
title: liveRadioBlocks.overtypedTitle ?? '',

Check failure on line 35 in src/app/components/MediaLoader/configs/liveRadio.ts

View workflow job for this annotation

GitHub Actions / cypress-run (22.x)

Property 'overtypedTitle' does not exist on type '[LiveRadioHeadingBlock, LiveRadioParagraphBlock, LiveRadioVersionBlock]'.

Check failure on line 35 in src/app/components/MediaLoader/configs/liveRadio.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Property 'overtypedTitle' does not exist on type '[LiveRadioHeadingBlock, LiveRadioParagraphBlock, LiveRadioVersionBlock]'.

Check failure on line 35 in src/app/components/MediaLoader/configs/liveRadio.ts

View workflow job for this annotation

GitHub Actions / cypress-run (22.x)

Property 'overtypedTitle' does not exist on type '[LiveRadioHeadingBlock, LiveRadioParagraphBlock, LiveRadioVersionBlock]'.

Check failure on line 35 in src/app/components/MediaLoader/configs/liveRadio.ts

View workflow job for this annotation

GitHub Actions / cypress-run (22.x)

Property 'overtypedTitle' does not exist on type '[LiveRadioHeadingBlock, LiveRadioParagraphBlock, LiveRadioVersionBlock]'.
items: [
{
kind: 'radioProgramme',
live: true,
serviceID: liveRadioMetadataBlock?.externalId,
// json?.data?.curations?.[0]?.mediaCollection?.[0]?.model?.masterbrand.id
serviceID: liveRadioBlocks?.masterbrand?.id ?? '',

Check failure on line 41 in src/app/components/MediaLoader/configs/liveRadio.ts

View workflow job for this annotation

GitHub Actions / cypress-run (22.x)

Property 'masterbrand' does not exist on type '[LiveRadioHeadingBlock, LiveRadioParagraphBlock, LiveRadioVersionBlock]'.

Check failure on line 41 in src/app/components/MediaLoader/configs/liveRadio.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Property 'masterbrand' does not exist on type '[LiveRadioHeadingBlock, LiveRadioParagraphBlock, LiveRadioVersionBlock]'.

Check failure on line 41 in src/app/components/MediaLoader/configs/liveRadio.ts

View workflow job for this annotation

GitHub Actions / cypress-run (22.x)

Property 'masterbrand' does not exist on type '[LiveRadioHeadingBlock, LiveRadioParagraphBlock, LiveRadioVersionBlock]'.

Check failure on line 41 in src/app/components/MediaLoader/configs/liveRadio.ts

View workflow job for this annotation

GitHub Actions / cypress-run (22.x)

Property 'masterbrand' does not exist on type '[LiveRadioHeadingBlock, LiveRadioParagraphBlock, LiveRadioVersionBlock]'.
},
],
liveRewind: true,
simulcast: true,
summary: paragraphBlock?.text ?? '',
// Don't see a direct equivalent afrique radio has Infos, musique et sports
// Closest equivalent is synopses
// json?.data?.curations?.[0]?.mediaCollection?.[0]?.model?.synopses?.short;
// json?.data?.curations?.[0]?.mediaCollection?.[0]?.model?.synopses?.medium;
// json?.data?.curations?.[0]?.mediaCollection?.[0]?.model?.synopses?.long;
summary: liveRadioBlocks?.synopses?.long ?? '',

Check failure on line 51 in src/app/components/MediaLoader/configs/liveRadio.ts

View workflow job for this annotation

GitHub Actions / cypress-run (22.x)

Property 'synopses' does not exist on type '[LiveRadioHeadingBlock, LiveRadioParagraphBlock, LiveRadioVersionBlock]'.

Check failure on line 51 in src/app/components/MediaLoader/configs/liveRadio.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Property 'synopses' does not exist on type '[LiveRadioHeadingBlock, LiveRadioParagraphBlock, LiveRadioVersionBlock]'.

Check failure on line 51 in src/app/components/MediaLoader/configs/liveRadio.ts

View workflow job for this annotation

GitHub Actions / cypress-run (22.x)

Property 'synopses' does not exist on type '[LiveRadioHeadingBlock, LiveRadioParagraphBlock, LiveRadioVersionBlock]'.

Check failure on line 51 in src/app/components/MediaLoader/configs/liveRadio.ts

View workflow job for this annotation

GitHub Actions / cypress-run (22.x)

Property 'synopses' does not exist on type '[LiveRadioHeadingBlock, LiveRadioParagraphBlock, LiveRadioVersionBlock]'.
},
ui: {
...basePlayerConfig.ui,
Expand Down
Loading