podverse-parser 5.0.0-beta.1 → 5.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/lib/chapters/chapters.d.ts +3 -0
- package/dist/lib/chapters/chapters.d.ts.map +1 -0
- package/dist/lib/chapters/chapters.js +59 -0
- package/dist/lib/compat/channel.d.ts +108 -0
- package/dist/lib/compat/channel.d.ts.map +1 -0
- package/dist/lib/compat/channel.js +279 -0
- package/dist/lib/compat/chapters/chapters.d.ts +11 -0
- package/dist/lib/compat/chapters/chapters.d.ts.map +1 -0
- package/dist/lib/compat/chapters/chapters.js +16 -0
- package/dist/lib/compat/partytime/channel.d.ts +110 -0
- package/dist/lib/compat/partytime/channel.d.ts.map +1 -0
- package/dist/lib/compat/partytime/channel.js +281 -0
- package/dist/lib/compat/partytime/compatFull.d.ts +6 -0
- package/dist/lib/compat/partytime/compatFull.d.ts.map +1 -0
- package/dist/lib/compat/partytime/compatFull.js +11 -0
- package/dist/lib/compat/partytime/funding.d.ts +6 -0
- package/dist/lib/compat/partytime/funding.d.ts.map +1 -0
- package/dist/lib/compat/partytime/funding.js +10 -0
- package/dist/lib/compat/partytime/item.d.ts +146 -0
- package/dist/lib/compat/partytime/item.d.ts.map +1 -0
- package/dist/lib/compat/partytime/item.js +264 -0
- package/dist/lib/compat/partytime/liveItem.d.ts +11 -0
- package/dist/lib/compat/partytime/liveItem.d.ts.map +1 -0
- package/dist/lib/compat/partytime/liveItem.js +20 -0
- package/dist/lib/compat/partytime/value.d.ts +62 -0
- package/dist/lib/compat/partytime/value.d.ts.map +1 -0
- package/dist/lib/compat/partytime/value.js +69 -0
- package/dist/lib/rss/base/handleParsedManyData.d.ts +7 -0
- package/dist/lib/rss/base/handleParsedManyData.d.ts.map +1 -0
- package/dist/lib/rss/base/handleParsedManyData.js +21 -0
- package/dist/lib/rss/base/handleParsedOneData.d.ts +7 -0
- package/dist/lib/rss/base/handleParsedOneData.d.ts.map +1 -0
- package/dist/lib/rss/base/handleParsedOneData.js +21 -0
- package/dist/lib/rss/channel/channel.d.ts +4 -0
- package/dist/lib/rss/channel/channel.d.ts.map +1 -0
- package/dist/lib/rss/channel/channel.js +61 -0
- package/dist/lib/rss/channel/channelAbout.d.ts +4 -0
- package/dist/lib/rss/channel/channelAbout.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelAbout.js +20 -0
- package/dist/lib/rss/channel/channelChat.d.ts +4 -0
- package/dist/lib/rss/channel/channelChat.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelChat.js +21 -0
- package/dist/lib/rss/channel/channelDescription.d.ts +4 -0
- package/dist/lib/rss/channel/channelDescription.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelDescription.js +21 -0
- package/dist/lib/rss/channel/channelFunding.d.ts +4 -0
- package/dist/lib/rss/channel/channelFunding.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelFunding.js +21 -0
- package/dist/lib/rss/channel/channelImage.d.ts +4 -0
- package/dist/lib/rss/channel/channelImage.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelImage.js +21 -0
- package/dist/lib/rss/channel/channelLicense.d.ts +4 -0
- package/dist/lib/rss/channel/channelLicense.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelLicense.js +21 -0
- package/dist/lib/rss/channel/channelLocation.d.ts +4 -0
- package/dist/lib/rss/channel/channelLocation.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelLocation.js +21 -0
- package/dist/lib/rss/channel/channelPerson.d.ts +4 -0
- package/dist/lib/rss/channel/channelPerson.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelPerson.js +21 -0
- package/dist/lib/rss/channel/channelPodroll.d.ts +4 -0
- package/dist/lib/rss/channel/channelPodroll.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelPodroll.js +28 -0
- package/dist/lib/rss/channel/channelRemoteItem.d.ts +4 -0
- package/dist/lib/rss/channel/channelRemoteItem.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelRemoteItem.js +21 -0
- package/dist/lib/rss/channel/channelSeason.d.ts +4 -0
- package/dist/lib/rss/channel/channelSeason.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelSeason.js +25 -0
- package/dist/lib/rss/channel/channelSocialInteract.d.ts +4 -0
- package/dist/lib/rss/channel/channelSocialInteract.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelSocialInteract.js +21 -0
- package/dist/lib/rss/channel/channelTrailer.d.ts +4 -0
- package/dist/lib/rss/channel/channelTrailer.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelTrailer.js +36 -0
- package/dist/lib/rss/channel/channelTxt.d.ts +4 -0
- package/dist/lib/rss/channel/channelTxt.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelTxt.js +21 -0
- package/dist/lib/rss/channel/channelValue.d.ts +4 -0
- package/dist/lib/rss/channel/channelValue.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelValue.js +37 -0
- package/dist/lib/rss/feed/feed.d.ts +5 -0
- package/dist/lib/rss/feed/feed.d.ts.map +1 -0
- package/dist/lib/rss/feed/feed.js +80 -0
- package/dist/lib/rss/hash/parsedFeed.d.ts +3 -0
- package/dist/lib/rss/hash/parsedFeed.d.ts.map +1 -0
- package/dist/lib/rss/hash/parsedFeed.js +22 -0
- package/dist/lib/rss/item/item.d.ts +5 -0
- package/dist/lib/rss/item/item.d.ts.map +1 -0
- package/dist/lib/rss/item/item.js +80 -0
- package/dist/lib/rss/item/itemAbout.d.ts +4 -0
- package/dist/lib/rss/item/itemAbout.d.ts.map +1 -0
- package/dist/lib/rss/item/itemAbout.js +20 -0
- package/dist/lib/rss/item/itemChaptersFeed.d.ts +4 -0
- package/dist/lib/rss/item/itemChaptersFeed.d.ts.map +1 -0
- package/dist/lib/rss/item/itemChaptersFeed.js +21 -0
- package/dist/lib/rss/item/itemChat.d.ts +4 -0
- package/dist/lib/rss/item/itemChat.d.ts.map +1 -0
- package/dist/lib/rss/item/itemChat.js +21 -0
- package/dist/lib/rss/item/itemContentLink.d.ts +1 -0
- package/dist/lib/rss/item/itemContentLink.d.ts.map +1 -0
- package/dist/lib/rss/item/itemContentLink.js +1 -0
- package/dist/lib/rss/item/itemDescription.d.ts +4 -0
- package/dist/lib/rss/item/itemDescription.d.ts.map +1 -0
- package/dist/lib/rss/item/itemDescription.js +21 -0
- package/dist/lib/rss/item/itemEnclosure.d.ts +4 -0
- package/dist/lib/rss/item/itemEnclosure.d.ts.map +1 -0
- package/dist/lib/rss/item/itemEnclosure.js +40 -0
- package/dist/lib/rss/item/itemImage.d.ts +4 -0
- package/dist/lib/rss/item/itemImage.d.ts.map +1 -0
- package/dist/lib/rss/item/itemImage.js +21 -0
- package/dist/lib/rss/item/itemLicense.d.ts +4 -0
- package/dist/lib/rss/item/itemLicense.d.ts.map +1 -0
- package/dist/lib/rss/item/itemLicense.js +21 -0
- package/dist/lib/rss/item/itemLocation.d.ts +4 -0
- package/dist/lib/rss/item/itemLocation.d.ts.map +1 -0
- package/dist/lib/rss/item/itemLocation.js +21 -0
- package/dist/lib/rss/item/itemPerson.d.ts +4 -0
- package/dist/lib/rss/item/itemPerson.d.ts.map +1 -0
- package/dist/lib/rss/item/itemPerson.js +21 -0
- package/dist/lib/rss/item/itemSeason.d.ts +4 -0
- package/dist/lib/rss/item/itemSeason.d.ts.map +1 -0
- package/dist/lib/rss/item/itemSeason.js +30 -0
- package/dist/lib/rss/item/itemSeasonEpisode.d.ts +4 -0
- package/dist/lib/rss/item/itemSeasonEpisode.d.ts.map +1 -0
- package/dist/lib/rss/item/itemSeasonEpisode.js +21 -0
- package/dist/lib/rss/item/itemSocialInteract.d.ts +4 -0
- package/dist/lib/rss/item/itemSocialInteract.d.ts.map +1 -0
- package/dist/lib/rss/item/itemSocialInteract.js +21 -0
- package/dist/lib/rss/item/itemSoundbite.d.ts +4 -0
- package/dist/lib/rss/item/itemSoundbite.d.ts.map +1 -0
- package/dist/lib/rss/item/itemSoundbite.js +21 -0
- package/dist/lib/rss/item/itemTranscript.d.ts +4 -0
- package/dist/lib/rss/item/itemTranscript.d.ts.map +1 -0
- package/dist/lib/rss/item/itemTranscript.js +21 -0
- package/dist/lib/rss/item/itemTxt.d.ts +4 -0
- package/dist/lib/rss/item/itemTxt.d.ts.map +1 -0
- package/dist/lib/rss/item/itemTxt.js +21 -0
- package/dist/lib/rss/item/itemValue.d.ts +4 -0
- package/dist/lib/rss/item/itemValue.d.ts.map +1 -0
- package/dist/lib/rss/item/itemValue.js +65 -0
- package/dist/lib/rss/liveItem/liveItem.d.ts +4 -0
- package/dist/lib/rss/liveItem/liveItem.d.ts.map +1 -0
- package/dist/lib/rss/liveItem/liveItem.js +41 -0
- package/dist/lib/rss/parser.d.ts +4 -0
- package/dist/lib/rss/parser.d.ts.map +1 -0
- package/dist/lib/rss/parser.js +83 -0
- package/dist/module-alias-config.d.ts +2 -0
- package/dist/module-alias-config.d.ts.map +1 -0
- package/dist/module-alias-config.js +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.compatItemValueDtos = exports.compatItemTxtDtos = exports.compatItemTranscriptDtos = exports.compatItemSoundbiteDtos = exports.compatItemSocialInteractDtos = exports.compatItemSeasonEpisodeDto = exports.compatItemSeasonDto = exports.compatItemPersonDtos = exports.compatItemLocationDto = exports.compatItemLicenseDto = exports.compatItemImageDtos = exports.compatItemEnclosureDtos = exports.compatItemDescriptionDto = exports.compatItemChatDto = exports.compatItemChaptersFeedDto = exports.compatItemAboutDto = exports.compatItemDto = void 0;
|
|
4
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
5
|
+
const value_1 = require("./value");
|
|
6
|
+
const compatItemDto = (parsedItem) => ({
|
|
7
|
+
guid: parsedItem.guid || null,
|
|
8
|
+
guid_enclosure_url: parsedItem.enclosure.url,
|
|
9
|
+
pubdate: parsedItem.pubDate || null,
|
|
10
|
+
title: parsedItem.title || null
|
|
11
|
+
});
|
|
12
|
+
exports.compatItemDto = compatItemDto;
|
|
13
|
+
const compatItemAboutDto = (parsedItem) => {
|
|
14
|
+
var _a;
|
|
15
|
+
return ({
|
|
16
|
+
duration: ((_a = parsedItem.duration) === null || _a === void 0 ? void 0 : _a.toFixed(2)) || null,
|
|
17
|
+
explicit: parsedItem.explicit || false,
|
|
18
|
+
website_link_url: parsedItem.link || null,
|
|
19
|
+
item_itunes_episode_type: (0, podverse_orm_1.getItemItunesEpisodeTypeEnumValue)(parsedItem.itunesEpisodeType || 'full')
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
exports.compatItemAboutDto = compatItemAboutDto;
|
|
23
|
+
const compatItemChaptersFeedDto = (parsedItem) => {
|
|
24
|
+
var _a, _b, _c, _d;
|
|
25
|
+
if (!((_a = parsedItem.podcastChapters) === null || _a === void 0 ? void 0 : _a.url) && !((_b = parsedItem.podcastChapters) === null || _b === void 0 ? void 0 : _b.type))
|
|
26
|
+
return null;
|
|
27
|
+
return {
|
|
28
|
+
url: (_c = parsedItem.podcastChapters) === null || _c === void 0 ? void 0 : _c.url,
|
|
29
|
+
type: (_d = parsedItem.podcastChapters) === null || _d === void 0 ? void 0 : _d.type
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
exports.compatItemChaptersFeedDto = compatItemChaptersFeedDto;
|
|
33
|
+
const compatItemChatDto = (parsedItem) => {
|
|
34
|
+
if (!parsedItem.chat) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
server: parsedItem.chat.server,
|
|
39
|
+
protocol: parsedItem.chat.protocol,
|
|
40
|
+
account_id: parsedItem.chat.accountId || null,
|
|
41
|
+
space: parsedItem.chat.space || null
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
exports.compatItemChatDto = compatItemChatDto;
|
|
45
|
+
const compatItemDescriptionDto = (parsedItem) => {
|
|
46
|
+
if (!parsedItem.description) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
value: parsedItem.description
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
exports.compatItemDescriptionDto = compatItemDescriptionDto;
|
|
54
|
+
const compatItemEnclosureDtos = (parsedItem) => {
|
|
55
|
+
const dtos = [];
|
|
56
|
+
if (parsedItem.alternativeEnclosures && parsedItem.alternativeEnclosures.length > 0) {
|
|
57
|
+
for (const alternativeEnclosure of parsedItem.alternativeEnclosures) {
|
|
58
|
+
const item_enclosure = {
|
|
59
|
+
type: alternativeEnclosure.type,
|
|
60
|
+
length: alternativeEnclosure.length || null,
|
|
61
|
+
bitrate: alternativeEnclosure.bitrate || null,
|
|
62
|
+
height: alternativeEnclosure.height || null,
|
|
63
|
+
language: alternativeEnclosure.lang || null,
|
|
64
|
+
title: alternativeEnclosure.title || null,
|
|
65
|
+
rel: alternativeEnclosure.rel || null,
|
|
66
|
+
codecs: alternativeEnclosure.codecs || null,
|
|
67
|
+
item_enclosure_default: false
|
|
68
|
+
};
|
|
69
|
+
/*
|
|
70
|
+
PTDO: why am I getting this error when I don't use any?
|
|
71
|
+
src/lib/compat/partytime/item.ts:50:14 - error TS4023: Exported variable
|
|
72
|
+
'compatItemEnclosureDtos' has or is using name 'IntegrityType' from external module
|
|
73
|
+
"/podverse-parser/node_modules/podcast-partytime/dist/parser/phase/phase-3" but cannot be named.
|
|
74
|
+
*/
|
|
75
|
+
const item_enclosure_integrity = alternativeEnclosure.integrity || null;
|
|
76
|
+
const item_enclosure_sources = alternativeEnclosure.source.map(source => ({
|
|
77
|
+
uri: source.uri,
|
|
78
|
+
content_type: source.contentType
|
|
79
|
+
}));
|
|
80
|
+
const formattedDto = {
|
|
81
|
+
item_enclosure,
|
|
82
|
+
item_enclosure_integrity,
|
|
83
|
+
item_enclosure_sources
|
|
84
|
+
};
|
|
85
|
+
dtos.push(formattedDto);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return dtos;
|
|
89
|
+
};
|
|
90
|
+
exports.compatItemEnclosureDtos = compatItemEnclosureDtos;
|
|
91
|
+
const compatItemImageDtos = (parsedItem) => {
|
|
92
|
+
const dtos = [];
|
|
93
|
+
if (parsedItem.itunesImage) {
|
|
94
|
+
dtos.push({
|
|
95
|
+
url: parsedItem.itunesImage,
|
|
96
|
+
image_width_size: null
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
else if (parsedItem.image) {
|
|
100
|
+
dtos.push({
|
|
101
|
+
url: parsedItem.image,
|
|
102
|
+
image_width_size: null
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function hasWidth(image) {
|
|
106
|
+
return image.width !== undefined;
|
|
107
|
+
}
|
|
108
|
+
if (Array.isArray(parsedItem.podcastImages)) {
|
|
109
|
+
for (const image of parsedItem.podcastImages) {
|
|
110
|
+
if (image.parsed.url && hasWidth(image.parsed)) {
|
|
111
|
+
dtos.push({
|
|
112
|
+
url: image.parsed.url,
|
|
113
|
+
image_width_size: image.parsed.width
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return dtos;
|
|
119
|
+
};
|
|
120
|
+
exports.compatItemImageDtos = compatItemImageDtos;
|
|
121
|
+
const compatItemLicenseDto = (parsedItem) => {
|
|
122
|
+
var _a;
|
|
123
|
+
if (!((_a = parsedItem === null || parsedItem === void 0 ? void 0 : parsedItem.license) === null || _a === void 0 ? void 0 : _a.identifier)) {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
identifier: parsedItem.license.identifier,
|
|
128
|
+
url: parsedItem.license.url || null
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
exports.compatItemLicenseDto = compatItemLicenseDto;
|
|
132
|
+
const compatItemLocationDto = (parsedItem) => {
|
|
133
|
+
var _a, _b;
|
|
134
|
+
if (!((_a = parsedItem === null || parsedItem === void 0 ? void 0 : parsedItem.podcastLocation) === null || _a === void 0 ? void 0 : _a.geo) && !((_b = parsedItem === null || parsedItem === void 0 ? void 0 : parsedItem.podcastLocation) === null || _b === void 0 ? void 0 : _b.osm)) {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
return {
|
|
138
|
+
geo: parsedItem.podcastLocation.geo || null,
|
|
139
|
+
osm: parsedItem.podcastLocation.osm || null,
|
|
140
|
+
name: parsedItem.podcastLocation.name || null
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
exports.compatItemLocationDto = compatItemLocationDto;
|
|
144
|
+
const compatItemPersonDtos = (parsedItem) => {
|
|
145
|
+
var _a, _b;
|
|
146
|
+
const dtos = [];
|
|
147
|
+
if (Array.isArray(parsedItem.podcastPeople)) {
|
|
148
|
+
for (const p of parsedItem.podcastPeople) {
|
|
149
|
+
if (p.name) {
|
|
150
|
+
dtos.push({
|
|
151
|
+
name: p.name,
|
|
152
|
+
role: ((_a = p.role) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || null,
|
|
153
|
+
person_group: ((_b = p.group) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || 'cast',
|
|
154
|
+
img: p.img || null,
|
|
155
|
+
href: p.href || null
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return dtos;
|
|
161
|
+
};
|
|
162
|
+
exports.compatItemPersonDtos = compatItemPersonDtos;
|
|
163
|
+
const compatItemSeasonDto = (parsedItem) => {
|
|
164
|
+
var _a;
|
|
165
|
+
if (!((_a = parsedItem.podcastSeason) === null || _a === void 0 ? void 0 : _a.number)) {
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
number: parsedItem.podcastSeason.number,
|
|
170
|
+
title: parsedItem.podcastSeason.name || null
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
exports.compatItemSeasonDto = compatItemSeasonDto;
|
|
174
|
+
const compatItemSeasonEpisodeDto = (parsedItem) => {
|
|
175
|
+
if (!parsedItem.podcastEpisode) {
|
|
176
|
+
return null;
|
|
177
|
+
}
|
|
178
|
+
return {
|
|
179
|
+
display: parsedItem.podcastEpisode.display || null,
|
|
180
|
+
number: parsedItem.podcastEpisode.number
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
exports.compatItemSeasonEpisodeDto = compatItemSeasonEpisodeDto;
|
|
184
|
+
const compatItemSocialInteractDtos = (parsedItem) => {
|
|
185
|
+
var _a;
|
|
186
|
+
const dtos = [];
|
|
187
|
+
if ((_a = parsedItem === null || parsedItem === void 0 ? void 0 : parsedItem.podcastSocialInteraction) === null || _a === void 0 ? void 0 : _a.length) {
|
|
188
|
+
for (const ps of parsedItem.podcastSocialInteraction) {
|
|
189
|
+
dtos.push({
|
|
190
|
+
// PTDO: fix keys mismatch between partytime and podverse
|
|
191
|
+
protocol: ps.platform,
|
|
192
|
+
uri: ps.url,
|
|
193
|
+
account_id: ps.id || null,
|
|
194
|
+
account_url: ps.profileUrl || null,
|
|
195
|
+
priority: ps.priority || null
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return dtos;
|
|
200
|
+
};
|
|
201
|
+
exports.compatItemSocialInteractDtos = compatItemSocialInteractDtos;
|
|
202
|
+
const compatItemSoundbiteDtos = (parsedItem) => {
|
|
203
|
+
var _a;
|
|
204
|
+
const dtos = [];
|
|
205
|
+
if ((_a = parsedItem === null || parsedItem === void 0 ? void 0 : parsedItem.podcastSoundbites) === null || _a === void 0 ? void 0 : _a.length) {
|
|
206
|
+
for (const s of parsedItem.podcastSoundbites) {
|
|
207
|
+
dtos.push({
|
|
208
|
+
start_time: s.startTime.toFixed(2),
|
|
209
|
+
duration: s.duration.toFixed(2),
|
|
210
|
+
title: s.title || null
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return dtos;
|
|
215
|
+
};
|
|
216
|
+
exports.compatItemSoundbiteDtos = compatItemSoundbiteDtos;
|
|
217
|
+
const compatItemTranscriptDtos = (parsedItem) => {
|
|
218
|
+
var _a;
|
|
219
|
+
const dtos = [];
|
|
220
|
+
if ((_a = parsedItem === null || parsedItem === void 0 ? void 0 : parsedItem.podcastTranscripts) === null || _a === void 0 ? void 0 : _a.length) {
|
|
221
|
+
for (const t of parsedItem.podcastTranscripts) {
|
|
222
|
+
dtos.push({
|
|
223
|
+
url: t.url,
|
|
224
|
+
type: t.type,
|
|
225
|
+
language: t.language || null,
|
|
226
|
+
rel: t.rel || null
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return dtos;
|
|
231
|
+
};
|
|
232
|
+
exports.compatItemTranscriptDtos = compatItemTranscriptDtos;
|
|
233
|
+
const compatItemTxtDtos = (parsedItem) => {
|
|
234
|
+
var _a;
|
|
235
|
+
const dtos = [];
|
|
236
|
+
if ((_a = parsedItem === null || parsedItem === void 0 ? void 0 : parsedItem.podcastTxt) === null || _a === void 0 ? void 0 : _a.length) {
|
|
237
|
+
for (const txt of parsedItem.podcastTxt) {
|
|
238
|
+
dtos.push({
|
|
239
|
+
purpose: txt.purpose || null,
|
|
240
|
+
value: txt.value
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return dtos;
|
|
245
|
+
};
|
|
246
|
+
exports.compatItemTxtDtos = compatItemTxtDtos;
|
|
247
|
+
const compatItemValueDtos = (parsedItem) => {
|
|
248
|
+
let dtos = [];
|
|
249
|
+
if (parsedItem.value) {
|
|
250
|
+
const dto = (0, value_1.compatItemValue)(parsedItem.value);
|
|
251
|
+
const formattedDto = {
|
|
252
|
+
item_value: {
|
|
253
|
+
type: dto.type,
|
|
254
|
+
method: dto.method,
|
|
255
|
+
suggested: dto.suggested || null
|
|
256
|
+
},
|
|
257
|
+
item_value_recipients: dto.item_value_recipients,
|
|
258
|
+
item_value_time_splits: dto.item_value_time_splits
|
|
259
|
+
};
|
|
260
|
+
dtos.push(formattedDto);
|
|
261
|
+
}
|
|
262
|
+
return dtos;
|
|
263
|
+
};
|
|
264
|
+
exports.compatItemValueDtos = compatItemValueDtos;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Phase4PodcastLiveItem } from "podcast-partytime/dist/parser/phase/phase-4";
|
|
2
|
+
import { LiveItemStatusEnum } from "podverse-orm";
|
|
3
|
+
export declare const compatLiveItemsDtos: (parsedLiveItems: Phase4PodcastLiveItem[]) => {
|
|
4
|
+
liveItem: {
|
|
5
|
+
live_item_status: LiveItemStatusEnum;
|
|
6
|
+
start_time: Date;
|
|
7
|
+
end_time: Date | null;
|
|
8
|
+
};
|
|
9
|
+
item: Phase4PodcastLiveItem;
|
|
10
|
+
}[];
|
|
11
|
+
//# sourceMappingURL=liveItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liveItem.d.ts","sourceRoot":"","sources":["../../../../src/lib/compat/partytime/liveItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EAA8B,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAE9E,eAAO,MAAM,mBAAmB,oBAAqB,qBAAqB,EAAE;;;;;;;GAc3E,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.compatLiveItemsDtos = void 0;
|
|
4
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
5
|
+
const compatLiveItemsDtos = (parsedLiveItems) => {
|
|
6
|
+
var _a;
|
|
7
|
+
const dtos = [];
|
|
8
|
+
for (const parsedLiveItem of parsedLiveItems) {
|
|
9
|
+
dtos.push({
|
|
10
|
+
liveItem: {
|
|
11
|
+
live_item_status: (_a = (0, podverse_orm_1.getLiveItemStatusEnumValue)(parsedLiveItem.status)) !== null && _a !== void 0 ? _a : podverse_orm_1.LiveItemStatusEnum.Pending,
|
|
12
|
+
start_time: parsedLiveItem.start,
|
|
13
|
+
end_time: parsedLiveItem.end || null
|
|
14
|
+
},
|
|
15
|
+
item: parsedLiveItem
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return dtos;
|
|
19
|
+
};
|
|
20
|
+
exports.compatLiveItemsDtos = compatLiveItemsDtos;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Phase4Value } from "podcast-partytime";
|
|
2
|
+
export declare const compatChannelValue: (value: Phase4Value) => {
|
|
3
|
+
type: string;
|
|
4
|
+
method: string;
|
|
5
|
+
suggested: number | null;
|
|
6
|
+
channel_value_recipients: {
|
|
7
|
+
type: string;
|
|
8
|
+
address: string;
|
|
9
|
+
split: number;
|
|
10
|
+
name: string | null;
|
|
11
|
+
custom_key: string | null;
|
|
12
|
+
custom_value: string | null;
|
|
13
|
+
fee: boolean;
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
16
|
+
export declare const compatItemValue: (value: Phase4Value) => {
|
|
17
|
+
type: string;
|
|
18
|
+
method: string;
|
|
19
|
+
suggested: number | null;
|
|
20
|
+
item_value_recipients: {
|
|
21
|
+
type: string;
|
|
22
|
+
address: string;
|
|
23
|
+
split: number;
|
|
24
|
+
name: string | null;
|
|
25
|
+
custom_key: string | null;
|
|
26
|
+
custom_value: string | null;
|
|
27
|
+
fee: boolean;
|
|
28
|
+
}[];
|
|
29
|
+
item_value_time_splits: ({
|
|
30
|
+
meta: {
|
|
31
|
+
start_time: string;
|
|
32
|
+
duration: string;
|
|
33
|
+
remote_start_time: string;
|
|
34
|
+
remote_percentage: string;
|
|
35
|
+
};
|
|
36
|
+
item_value_time_splits_recipients: never[];
|
|
37
|
+
item_value_time_splits_remote_item: {
|
|
38
|
+
feed_guid: string;
|
|
39
|
+
feed_url: string | null;
|
|
40
|
+
item_guid: string | null;
|
|
41
|
+
title: null;
|
|
42
|
+
} | null;
|
|
43
|
+
} | {
|
|
44
|
+
meta: {
|
|
45
|
+
start_time: string;
|
|
46
|
+
duration: string;
|
|
47
|
+
remote_start_time: string;
|
|
48
|
+
remote_percentage: string;
|
|
49
|
+
};
|
|
50
|
+
item_value_time_splits_recipients: {
|
|
51
|
+
type: string;
|
|
52
|
+
address: string;
|
|
53
|
+
split: number;
|
|
54
|
+
name: string | null;
|
|
55
|
+
custom_key: string | null;
|
|
56
|
+
custom_value: string | null;
|
|
57
|
+
fee: boolean;
|
|
58
|
+
}[];
|
|
59
|
+
item_value_time_splits_remote_item: null;
|
|
60
|
+
})[];
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=value.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../../../src/lib/compat/partytime/value.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAwB,MAAM,mBAAmB,CAAC;AAEtE,eAAO,MAAM,kBAAkB,UAAW,WAAW;;;;;;;;;;;;;CAOpD,CAAC;AAEF,eAAO,MAAM,eAAe,UAAW,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCjD,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.compatItemValue = exports.compatChannelValue = void 0;
|
|
4
|
+
const compatChannelValue = (value) => {
|
|
5
|
+
var _a;
|
|
6
|
+
return {
|
|
7
|
+
type: value.type,
|
|
8
|
+
method: value.method,
|
|
9
|
+
suggested: parseFloat((_a = value.suggested) !== null && _a !== void 0 ? _a : '0') || null,
|
|
10
|
+
channel_value_recipients: compatValueRecipients(value.recipients)
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
exports.compatChannelValue = compatChannelValue;
|
|
14
|
+
const compatItemValue = (value) => {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
return {
|
|
17
|
+
type: value.type,
|
|
18
|
+
method: value.method,
|
|
19
|
+
suggested: parseFloat((_a = value.suggested) !== null && _a !== void 0 ? _a : '0') || null,
|
|
20
|
+
item_value_recipients: compatValueRecipients(value.recipients),
|
|
21
|
+
item_value_time_splits: ((_b = value.valueTimeSplits) === null || _b === void 0 ? void 0 : _b.map((valueTimeSplit) => {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
if (valueTimeSplit.type === 'remoteItem') {
|
|
24
|
+
return {
|
|
25
|
+
meta: {
|
|
26
|
+
start_time: valueTimeSplit.startTime.toFixed(2),
|
|
27
|
+
duration: valueTimeSplit.duration.toFixed(2),
|
|
28
|
+
remote_start_time: ((_a = valueTimeSplit.remoteStartTime) === null || _a === void 0 ? void 0 : _a.toFixed(2)) || (0).toFixed(2),
|
|
29
|
+
remote_percentage: ((_b = valueTimeSplit.remotePercentage) === null || _b === void 0 ? void 0 : _b.toFixed(2)) || (100).toFixed(2),
|
|
30
|
+
},
|
|
31
|
+
item_value_time_splits_recipients: [],
|
|
32
|
+
item_value_time_splits_remote_item: valueTimeSplit.remoteItem ? {
|
|
33
|
+
feed_guid: valueTimeSplit.remoteItem.feedGuid,
|
|
34
|
+
feed_url: valueTimeSplit.remoteItem.feedUrl || null,
|
|
35
|
+
item_guid: valueTimeSplit.remoteItem.itemGuid || null,
|
|
36
|
+
title: /* PTDO: ri.title || */ null
|
|
37
|
+
} : null
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
// else: valueTimeSplit.type === 'recipients'
|
|
42
|
+
return {
|
|
43
|
+
meta: {
|
|
44
|
+
start_time: valueTimeSplit.startTime.toFixed(2),
|
|
45
|
+
duration: valueTimeSplit.duration.toFixed(2),
|
|
46
|
+
remote_start_time: (0).toFixed(2),
|
|
47
|
+
remote_percentage: (100).toFixed(2),
|
|
48
|
+
},
|
|
49
|
+
item_value_time_splits_recipients: compatValueRecipients(valueTimeSplit.recipients),
|
|
50
|
+
item_value_time_splits_remote_item: null
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
})) || []
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
exports.compatItemValue = compatItemValue;
|
|
57
|
+
const compatValueRecipients = (recipients) => {
|
|
58
|
+
return recipients.map((recipient) => {
|
|
59
|
+
return {
|
|
60
|
+
type: recipient.type,
|
|
61
|
+
address: recipient.address,
|
|
62
|
+
split: recipient.split,
|
|
63
|
+
name: recipient.name || null,
|
|
64
|
+
custom_key: recipient.customKey || null,
|
|
65
|
+
custom_value: recipient.customValue || null,
|
|
66
|
+
fee: recipient.fee || false
|
|
67
|
+
};
|
|
68
|
+
}) || [];
|
|
69
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface Service<T, P> {
|
|
2
|
+
updateMany(parentEntity: P, dtos: Partial<T>[]): Promise<T[]>;
|
|
3
|
+
deleteAll(parentEntity: P): Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
export declare const handleParsedManyData: <T, P>(parentEntity: P, service: Service<T, P>, dtos: Partial<T>[]) => Promise<void>;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=handleParsedManyData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleParsedManyData.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/base/handleParsedManyData.ts"],"names":[],"mappings":"AAAA,UAAU,OAAO,CAAC,CAAC,EAAE,CAAC;IACpB,UAAU,CAAC,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAC9D,SAAS,CAAC,YAAY,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C;AAED,eAAO,MAAM,oBAAoB,GAAS,CAAC,EAAE,CAAC,gBAC9B,CAAC,WACN,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,QAChB,OAAO,CAAC,CAAC,CAAC,EAAE,kBAOnB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedManyData = void 0;
|
|
13
|
+
const handleParsedManyData = (parentEntity, service, dtos) => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
|
+
if (dtos.length > 0) {
|
|
15
|
+
yield service.updateMany(parentEntity, dtos);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
yield service.deleteAll(parentEntity);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
exports.handleParsedManyData = handleParsedManyData;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface Service<T, P> {
|
|
2
|
+
update(parentEntity: P, dto: Partial<T>): Promise<T>;
|
|
3
|
+
_delete?(parentEntity: P): Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
export declare const handleParsedOneData: <T, P>(parentEntity: P, service: Service<T, P>, dto: Partial<T> | null) => Promise<void>;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=handleParsedOneData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleParsedOneData.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/base/handleParsedOneData.ts"],"names":[],"mappings":"AAAA,UAAU,OAAO,CAAC,CAAC,EAAE,CAAC;IACpB,MAAM,CAAC,YAAY,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACrD,OAAO,CAAC,CAAC,YAAY,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,mBAAmB,GAAU,CAAC,EAAE,CAAC,gBAC9B,CAAC,WACN,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,OACjB,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,kBAOvB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedOneData = void 0;
|
|
13
|
+
const handleParsedOneData = (parentEntity, service, dto) => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
|
+
if (dto) {
|
|
15
|
+
yield service.update(parentEntity, dto);
|
|
16
|
+
}
|
|
17
|
+
else if (service._delete) {
|
|
18
|
+
yield service._delete(parentEntity);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
exports.handleParsedOneData = handleParsedOneData;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Channel, ChannelSeasonIndex } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedChannel: (parsedFeed: FeedObject, channel: Channel, channelSeasonIndex: ChannelSeasonIndex) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAiB,OAAO,EAAkB,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAiB1F,eAAO,MAAM,mBAAmB,eAAsB,UAAU,WAAW,OAAO,sBAAsB,kBAAkB,kBAoCzH,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedChannel = void 0;
|
|
13
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
|
+
const channelAbout_1 = require("@parser/lib/rss/channel/channelAbout");
|
|
16
|
+
const channelChat_1 = require("@parser/lib/rss/channel/channelChat");
|
|
17
|
+
const channelDescription_1 = require("@parser/lib/rss/channel/channelDescription");
|
|
18
|
+
const channelFunding_1 = require("@parser/lib/rss/channel/channelFunding");
|
|
19
|
+
const channelImage_1 = require("@parser/lib/rss/channel/channelImage");
|
|
20
|
+
const channelLicense_1 = require("@parser/lib/rss/channel/channelLicense");
|
|
21
|
+
const channelLocation_1 = require("@parser/lib/rss/channel/channelLocation");
|
|
22
|
+
const channelPerson_1 = require("@parser/lib/rss/channel/channelPerson");
|
|
23
|
+
const channelPodroll_1 = require("@parser/lib/rss/channel/channelPodroll");
|
|
24
|
+
const channelRemoteItem_1 = require("@parser/lib/rss/channel/channelRemoteItem");
|
|
25
|
+
const channelSocialInteract_1 = require("@parser/lib/rss/channel/channelSocialInteract");
|
|
26
|
+
const channelTrailer_1 = require("@parser/lib/rss/channel/channelTrailer");
|
|
27
|
+
const channelTxt_1 = require("@parser/lib/rss/channel/channelTxt");
|
|
28
|
+
const channelValue_1 = require("@parser/lib/rss/channel/channelValue");
|
|
29
|
+
const handleParsedChannel = (parsedFeed, channel, channelSeasonIndex) => __awaiter(void 0, void 0, void 0, function* () {
|
|
30
|
+
const channelService = new podverse_orm_1.ChannelService();
|
|
31
|
+
const channelDto = (0, channel_1.compatChannelDto)(parsedFeed);
|
|
32
|
+
yield channelService.update(channel.id, channelDto);
|
|
33
|
+
// TODO: add channelCategory support
|
|
34
|
+
yield podverse_orm_1.AppDataSource.manager.transaction((transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
35
|
+
yield (0, channelAbout_1.handleParsedChannelAbout)(parsedFeed, channel, transactionalEntityManager);
|
|
36
|
+
yield (0, channelChat_1.handleParsedChannelChat)(parsedFeed, channel, transactionalEntityManager);
|
|
37
|
+
yield (0, channelDescription_1.handleParsedChannelDescription)(parsedFeed, channel, transactionalEntityManager);
|
|
38
|
+
yield (0, channelFunding_1.handleParsedChannelFunding)(parsedFeed, channel, transactionalEntityManager);
|
|
39
|
+
yield (0, channelImage_1.handleParsedChannelImage)(parsedFeed, channel, transactionalEntityManager);
|
|
40
|
+
yield (0, channelLicense_1.handleParsedChannelLicense)(parsedFeed, channel, transactionalEntityManager);
|
|
41
|
+
yield (0, channelLocation_1.handleParsedChannelLocation)(parsedFeed, channel, transactionalEntityManager);
|
|
42
|
+
yield (0, channelPerson_1.handleParsedChannelPerson)(parsedFeed, channel, transactionalEntityManager);
|
|
43
|
+
yield (0, channelPodroll_1.handleParsedChannelPodroll)(parsedFeed, channel, transactionalEntityManager);
|
|
44
|
+
// PTDO: add channelPublisher support
|
|
45
|
+
// const channelPublisherService = new ChannelPublisherService();
|
|
46
|
+
// const channelPublisherRemoteItemService = new ChannelPublisherRemoteItemService();
|
|
47
|
+
// const channelPublisherRemoteItemDtos = compatChannelPublisherRemoteItemDtos(parsedFeed);
|
|
48
|
+
// if (channelPublisherRemoteItemDtos.length > 0) {
|
|
49
|
+
// const channel_publisher = await channelPublisherService.update(channel);
|
|
50
|
+
// await channelPublisherRemoteItemService.updateMany(channel_publisher, channelPodrollRemoteItemDtos);
|
|
51
|
+
// } else {
|
|
52
|
+
// await channelPublisherService.delete(channel);
|
|
53
|
+
// }
|
|
54
|
+
yield (0, channelRemoteItem_1.handleParsedChannelRemoteItem)(parsedFeed, channel, transactionalEntityManager);
|
|
55
|
+
yield (0, channelSocialInteract_1.handleParsedChannelSocialInteract)(parsedFeed, channel, transactionalEntityManager);
|
|
56
|
+
yield (0, channelTrailer_1.handleParsedChannelTrailer)(parsedFeed, channel, channelSeasonIndex, transactionalEntityManager);
|
|
57
|
+
yield (0, channelTxt_1.handleParsedChannelTxt)(parsedFeed, channel, transactionalEntityManager);
|
|
58
|
+
yield (0, channelValue_1.handleParsedChannelValue)(parsedFeed, channel, transactionalEntityManager);
|
|
59
|
+
}));
|
|
60
|
+
});
|
|
61
|
+
exports.handleParsedChannel = handleParsedChannel;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedChannelAbout: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager: EntityManager) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=channelAbout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelAbout.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelAbout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAuB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG3E,eAAO,MAAM,wBAAwB,eACvB,UAAU,WACb,OAAO,8BACY,aAAa,kBAK1C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedChannelAbout = void 0;
|
|
13
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
|
+
const handleParsedChannelAbout = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
const channelAboutService = new podverse_orm_1.ChannelAboutService(transactionalEntityManager);
|
|
17
|
+
const channelAboutDto = (0, channel_1.compatChannelAboutDto)(parsedFeed);
|
|
18
|
+
yield channelAboutService.update(channel, channelAboutDto);
|
|
19
|
+
});
|
|
20
|
+
exports.handleParsedChannelAbout = handleParsedChannelAbout;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedChannelChat: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager: EntityManager) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=channelChat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelChat.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelChat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAsB,aAAa,EAAE,MAAM,cAAc,CAAC;AAI1E,eAAO,MAAM,uBAAuB,eACtB,UAAU,WACb,OAAO,8BACY,aAAa,kBAK1C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedChannelChat = void 0;
|
|
13
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
|
+
const handleParsedOneData_1 = require("../base/handleParsedOneData");
|
|
16
|
+
const handleParsedChannelChat = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
const channelChatService = new podverse_orm_1.ChannelChatService(transactionalEntityManager);
|
|
18
|
+
const channelChatDto = (0, channel_1.compatChannelChatDto)(parsedFeed);
|
|
19
|
+
yield (0, handleParsedOneData_1.handleParsedOneData)(channel, channelChatService, channelChatDto);
|
|
20
|
+
});
|
|
21
|
+
exports.handleParsedChannelChat = handleParsedChannelChat;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedChannelDescription: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager: EntityManager) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=channelDescription.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelDescription.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelDescription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAA6B,aAAa,EAAE,MAAM,cAAc,CAAC;AAIjF,eAAO,MAAM,8BAA8B,eAC7B,UAAU,WACb,OAAO,8BACY,aAAa,kBAK1C,CAAC"}
|