parsePodcast function
- JsonMap data
Parses podcast from data
.
Implementation
JsonMap parsePodcast(JsonMap data) {
final JsonMap realData;
if (data.containsKey(MTRIR)) {
realData = nav(data, [MTRIR]) as JsonMap;
} else {
realData = data;
}
return {
'title': nav(realData, TITLE_TEXT),
'channel': parseIdName(
nav(realData, [...SUBTITLE_RUNS, 0], nullIfAbsent: true) as JsonMap?,
),
'browseId': nav(realData, [...TITLE, ...NAVIGATION_BROWSE_ID]),
'podcastId': nav(realData, THUMBNAIL_OVERLAY, nullIfAbsent: true),
'thumbnails': nav(realData, THUMBNAIL_RENDERER),
};
}