From 37a44fc915eef2140e22ceb96aba6b6eb2509007 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 17 Jun 2021 16:02:38 +0200 Subject: Add ability to search playlists --- server/lib/job-queue/handlers/activitypub-http-fetcher.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'server/lib/job-queue/handlers') diff --git a/server/lib/job-queue/handlers/activitypub-http-fetcher.ts b/server/lib/job-queue/handlers/activitypub-http-fetcher.ts index 04b25f955..ab9675cae 100644 --- a/server/lib/job-queue/handlers/activitypub-http-fetcher.ts +++ b/server/lib/job-queue/handlers/activitypub-http-fetcher.ts @@ -1,12 +1,11 @@ import * as Bull from 'bull' import { ActivitypubHttpFetcherPayload, FetchType } from '@shared/models' import { logger } from '../../../helpers/logger' -import { AccountModel } from '../../../models/account/account' import { AccountVideoRateModel } from '../../../models/account/account-video-rate' import { VideoModel } from '../../../models/video/video' import { VideoCommentModel } from '../../../models/video/video-comment' import { VideoShareModel } from '../../../models/video/video-share' -import { MAccountDefault, MVideoFullLight } from '../../../types/models' +import { MVideoFullLight } from '../../../types/models' import { crawlCollectionPage } from '../../activitypub/crawl' import { createAccountPlaylists } from '../../activitypub/playlists' import { processActivities } from '../../activitypub/process' @@ -22,16 +21,13 @@ async function processActivityPubHttpFetcher (job: Bull.Job) { let video: MVideoFullLight if (payload.videoId) video = await VideoModel.loadAndPopulateAccountAndServerAndTags(payload.videoId) - let account: MAccountDefault - if (payload.accountId) account = await AccountModel.load(payload.accountId) - const fetcherType: { [ id in FetchType ]: (items: any[]) => Promise } = { 'activity': items => processActivities(items, { outboxUrl: payload.uri, fromFetch: true }), 'video-likes': items => createRates(items, video, 'like'), 'video-dislikes': items => createRates(items, video, 'dislike'), 'video-shares': items => addVideoShares(items, video), 'video-comments': items => addVideoComments(items), - 'account-playlists': items => createAccountPlaylists(items, account) + 'account-playlists': items => createAccountPlaylists(items) } const cleanerType: { [ id in FetchType ]?: (crawlStartDate: Date) => Promise } = { -- cgit v1.2.3