podverse-parser 5.1.4-alpha.0 → 5.1.5-alpha.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"feed.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/feed/feed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,IAAI,EAA+B,MAAM,cAAc,CAAC;AAOjE,eAAO,MAAM,gBAAgB,GAAU,KAAK,MAAM,EAAE,kBAAkB,MAAM,KAAG,OAAO,CAAC,IAAI,CA8B1F,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAU,MAAM,IAAI,KAAG,OAAO,CAAC,UAAU,CAsCzE,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAA;AAED,eAAO,MAAM,gBAAgB,GAC3B,YAAY,UAAU,EACtB,MAAM,IAAI,EACV,UAAS,uBAA4B,KACpC,OAAO,CAAC,IAAI,CAad,CAAC"}
1
+ {"version":3,"file":"feed.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/feed/feed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,IAAI,EAA+B,MAAM,cAAc,CAAC;AAOjE,eAAO,MAAM,gBAAgB,GAAU,KAAK,MAAM,EAAE,kBAAkB,MAAM,KAAG,OAAO,CAAC,IAAI,CAiC1F,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAU,MAAM,IAAI,KAAG,OAAO,CAAC,UAAU,CAsCzE,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAA;AAED,eAAO,MAAM,gBAAgB,GAC3B,YAAY,UAAU,EACtB,MAAM,IAAI,EACV,UAAS,uBAA4B,KACpC,OAAO,CAAC,IAAI,CAad,CAAC"}
@@ -20,9 +20,12 @@ const _request_1 = require("../../_request");
20
20
  const handleGetRSSFeed = (url, podcast_index_id) => __awaiter(void 0, void 0, void 0, function* () {
21
21
  timerManager_1.timerManager.start('handleGetRSSFeed');
22
22
  const feedService = new podverse_orm_1.FeedService();
23
- let feed = yield feedService.getByUrlAndPodcastIndexId({ url, podcast_index_id });
23
+ let feed = yield feedService.getByUrlAndPodcastIndexId({
24
+ url,
25
+ podcast_index_id
26
+ });
24
27
  if (!feed) {
25
- feed = yield feedService.getByPodcastIndexId({ podcast_index_id });
28
+ feed = yield feedService.getByPodcastIndexId(podcast_index_id);
26
29
  if (feed) {
27
30
  feed.url = url;
28
31
  yield feedService.update(feed.id, { url });
@@ -52,17 +52,17 @@ const parseRSSFeedAndSaveToDatabase = (url_1, podcast_index_id_1, ...args_1) =>
52
52
  loggerService_1.loggerService.info(`parseRSSFeedAndSaveToDatabase url: ${url} podcast_index_id: ${podcast_index_id}`);
53
53
  feed = yield (0, feed_1.handleGetRSSFeed)(url, podcast_index_id);
54
54
  if (!(0, podverse_orm_1.checkIfFeedFlagStatusShouldParse)(feed.feed_flag_status.id)) {
55
- throw new Error(`parseRSSFeedAndSaveToDatabase: feed_flag_status.status is not Active or AlwaysAllow for ${feed.id} ${feed.channel.podcast_index_id} ${feed.url}`);
55
+ throw new Error(`parseRSSFeedAndSaveToDatabase: feed_flag_status.status is not Active or AlwaysAllow for ${feed.id} ${feed.podcast_index_id} ${feed.url}`);
56
56
  }
57
57
  const parsedFeed = yield (0, feed_1.handleRequestRSSFeed)(feed);
58
58
  feed = yield (0, feed_1.handleParsedFeed)(parsedFeed, feed, options);
59
59
  yield feedService.update(feed.id, { is_parsing: new Date() });
60
60
  if ((0, podverse_orm_1.checkIfSpamFeed)(parsedFeed)) {
61
61
  yield feedService.updateFlagStatus(feed, podverse_orm_1.FeedFlagStatusStatusEnum.Spam);
62
- throw new Error(`parseRSSFeedAndSaveToDatabase: feed is spam ${feed.id} ${feed.channel.podcast_index_id} ${feed.url}`);
62
+ throw new Error(`parseRSSFeedAndSaveToDatabase: feed is spam ${feed.id} ${feed.podcast_index_id} ${feed.url}`);
63
63
  }
64
64
  const channelService = new podverse_orm_1.ChannelService();
65
- channel = yield channelService.getOrCreateByPodcastIndexId({ feed, podcast_index_id });
65
+ channel = yield channelService.getOrCreateByFeed(feed);
66
66
  yield (0, channelSeason_1.handleParsedChannelSeasons)(parsedFeed, channel);
67
67
  const channelSeasonService = new podverse_orm_1.ChannelSeasonService();
68
68
  const channelSeasonIndex = yield channelSeasonService.getChannelSeasonIndex(channel);
@@ -1 +1 @@
1
- {"version":3,"file":"remoteItemParser.d.ts","sourceRoot":"","sources":["../../../src/lib/rss/remoteItemParser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EACsD,MAAM,cAAc,CAAC;AAqD3F,eAAO,MAAM,+BAA+B,GAAU,SAAS,OAAO,kBAOrE,CAAC"}
1
+ {"version":3,"file":"remoteItemParser.d.ts","sourceRoot":"","sources":["../../../src/lib/rss/remoteItemParser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EACsD,MAAM,cAAc,CAAC;AAwD3F,eAAO,MAAM,+BAA+B,GAAU,SAAS,OAAO,kBAOrE,CAAC"}
@@ -47,7 +47,10 @@ const handleRemoteItemsFeedParsing = (feedGuidsToParse) => __awaiter(void 0, voi
47
47
  }
48
48
  for (const piFeedData of piFeedDatas) {
49
49
  const feedService = new podverse_orm_1.FeedService();
50
- let feed = yield feedService.getByUrlAndPodcastIndexId({ url: piFeedData.url, podcast_index_id: piFeedData.id });
50
+ let feed = yield feedService.getByUrlAndPodcastIndexId({
51
+ url: piFeedData.url,
52
+ podcast_index_id: piFeedData.id
53
+ });
51
54
  if (!feed) {
52
55
  yield handleRequestDelay(piFeedData.url);
53
56
  loggerService_1.loggerService.info(`handleRemoteItemsFeedParsing: ${piFeedData.url} ${piFeedData.id}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "podverse-parser",
3
- "version": "5.1.4-alpha.0",
3
+ "version": "5.1.5-alpha.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,9 +18,9 @@
18
18
  "dependencies": {
19
19
  "module-alias": "^2.2.3",
20
20
  "podcast-partytime": "^4.9.1",
21
- "podverse-external-services": "^5.1.4-alpha.0",
22
- "podverse-helpers": "^5.1.4-alpha.0",
23
- "podverse-orm": "^5.1.4-alpha.0"
21
+ "podverse-external-services": "^5.1.5-alpha.0",
22
+ "podverse-helpers": "^5.1.5-alpha.0",
23
+ "podverse-orm": "^5.1.5-alpha.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@eslint/config-array": "^0.21.0",