aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/playlist.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub/playlist.ts')
-rw-r--r--server/lib/activitypub/playlist.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/activitypub/playlist.ts b/server/lib/activitypub/playlist.ts
index 7166c68a6..8fe6e79f2 100644
--- a/server/lib/activitypub/playlist.ts
+++ b/server/lib/activitypub/playlist.ts
@@ -18,7 +18,7 @@ import { FilteredModelAttributes } from '../../types/sequelize'
18import { createPlaylistMiniatureFromUrl } from '../thumbnail' 18import { createPlaylistMiniatureFromUrl } from '../thumbnail'
19import { getOrCreateActorAndServerAndModel } from './actor' 19import { getOrCreateActorAndServerAndModel } from './actor'
20import { crawlCollectionPage } from './crawl' 20import { crawlCollectionPage } from './crawl'
21import { getOrCreateVideoAndAccountAndChannel } from './videos' 21import { getOrCreateAPVideo } from './videos'
22 22
23function playlistObjectToDBAttributes (playlistObject: PlaylistObject, byAccount: MAccountId, to: string[]) { 23function playlistObjectToDBAttributes (playlistObject: PlaylistObject, byAccount: MAccountId, to: string[]) {
24 const privacy = to.includes(ACTIVITY_PUB.PUBLIC) 24 const privacy = to.includes(ACTIVITY_PUB.PUBLIC)
@@ -169,7 +169,7 @@ async function resetVideoPlaylistElements (elementUrls: string[], playlist: MVid
169 throw new Error(`Playlist element url ${elementUrl} host is different from the AP object id ${body.id}`) 169 throw new Error(`Playlist element url ${elementUrl} host is different from the AP object id ${body.id}`)
170 } 170 }
171 171
172 const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: { id: body.url }, fetchType: 'only-video' }) 172 const { video } = await getOrCreateAPVideo({ videoObject: { id: body.url }, fetchType: 'only-video' })
173 173
174 elementsToCreate.push(playlistElementObjectToDBAttributes(body, playlist, video)) 174 elementsToCreate.push(playlistElementObjectToDBAttributes(body, playlist, video))
175 } catch (err) { 175 } catch (err) {