X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Fvideos%2Fshared%2Fabstract-builder.ts;h=f299ba4fd736b6530893feae9d9b6cb49cf45958;hb=7e98a7df7d04e19ba67163a86c7b876d78d76839;hp=f995fe637a385c1fa8f960f7d198b34a3639280f;hpb=421ff4618da64f0849353383f690a014024c40da;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/videos/shared/abstract-builder.ts b/server/lib/activitypub/videos/shared/abstract-builder.ts index f995fe637..f299ba4fd 100644 --- a/server/lib/activitypub/videos/shared/abstract-builder.ts +++ b/server/lib/activitypub/videos/shared/abstract-builder.ts @@ -1,5 +1,4 @@ import { Transaction } from 'sequelize/types' -import { checkUrlsSameHost } from '@server/helpers/activitypub' import { deleteAllModels, filterNonExistingModels } from '@server/helpers/database-utils' import { logger, LoggerTagsFn } from '@server/helpers/logger' import { updatePlaceholderThumbnail, updateVideoMiniatureFromUrl } from '@server/lib/thumbnail' @@ -11,6 +10,7 @@ import { VideoStreamingPlaylistModel } from '@server/models/video/video-streamin import { MStreamingPlaylistFilesVideo, MThumbnail, MVideoCaption, MVideoFile, MVideoFullLight, MVideoThumbnail } from '@server/types/models' import { ActivityTagObject, ThumbnailType, VideoObject, VideoStreamingPlaylistType } from '@shared/models' import { getOrCreateAPActor } from '../../actors' +import { checkUrlsSameHost } from '../../url' import { getCaptionAttributesFromObject, getFileAttributesFromUrl, @@ -119,7 +119,7 @@ export abstract class APVideoAbstractBuilder { } protected async setStreamingPlaylists (video: MVideoFullLight, t: Transaction) { - const streamingPlaylistAttributes = getStreamingPlaylistAttributesFromObject(video, this.videoObject, video.VideoFiles || []) + const streamingPlaylistAttributes = getStreamingPlaylistAttributesFromObject(video, this.videoObject) const newStreamingPlaylists = streamingPlaylistAttributes.map(a => new VideoStreamingPlaylistModel(a)) // Remove video playlists that do not exist anymore