diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/lib/activitypub/videos/shared/abstract-builder.ts | 2 | ||||
-rw-r--r-- | server/lib/activitypub/videos/shared/object-to-model-attributes.ts | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/activitypub/videos/shared/abstract-builder.ts b/server/lib/activitypub/videos/shared/abstract-builder.ts index f995fe637..788223b48 100644 --- a/server/lib/activitypub/videos/shared/abstract-builder.ts +++ b/server/lib/activitypub/videos/shared/abstract-builder.ts | |||
@@ -119,7 +119,7 @@ export abstract class APVideoAbstractBuilder { | |||
119 | } | 119 | } |
120 | 120 | ||
121 | protected async setStreamingPlaylists (video: MVideoFullLight, t: Transaction) { | 121 | protected async setStreamingPlaylists (video: MVideoFullLight, t: Transaction) { |
122 | const streamingPlaylistAttributes = getStreamingPlaylistAttributesFromObject(video, this.videoObject, video.VideoFiles || []) | 122 | const streamingPlaylistAttributes = getStreamingPlaylistAttributesFromObject(video, this.videoObject) |
123 | const newStreamingPlaylists = streamingPlaylistAttributes.map(a => new VideoStreamingPlaylistModel(a)) | 123 | const newStreamingPlaylists = streamingPlaylistAttributes.map(a => new VideoStreamingPlaylistModel(a)) |
124 | 124 | ||
125 | // Remove video playlists that do not exist anymore | 125 | // Remove video playlists that do not exist anymore |
diff --git a/server/lib/activitypub/videos/shared/object-to-model-attributes.ts b/server/lib/activitypub/videos/shared/object-to-model-attributes.ts index 50ca4e673..1e1479869 100644 --- a/server/lib/activitypub/videos/shared/object-to-model-attributes.ts +++ b/server/lib/activitypub/videos/shared/object-to-model-attributes.ts | |||
@@ -11,7 +11,7 @@ import { VideoCaptionModel } from '@server/models/video/video-caption' | |||
11 | import { VideoFileModel } from '@server/models/video/video-file' | 11 | import { VideoFileModel } from '@server/models/video/video-file' |
12 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' | 12 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' |
13 | import { FilteredModelAttributes } from '@server/types' | 13 | import { FilteredModelAttributes } from '@server/types' |
14 | import { isStreamingPlaylist, MChannelId, MStreamingPlaylistVideo, MVideo, MVideoFile, MVideoId } from '@server/types/models' | 14 | import { isStreamingPlaylist, MChannelId, MStreamingPlaylistVideo, MVideo, MVideoId } from '@server/types/models' |
15 | import { | 15 | import { |
16 | ActivityHashTagObject, | 16 | ActivityHashTagObject, |
17 | ActivityMagnetUrlObject, | 17 | ActivityMagnetUrlObject, |
@@ -110,7 +110,7 @@ function getFileAttributesFromUrl ( | |||
110 | return attributes | 110 | return attributes |
111 | } | 111 | } |
112 | 112 | ||
113 | function getStreamingPlaylistAttributesFromObject (video: MVideoId, videoObject: VideoObject, videoFiles: MVideoFile[]) { | 113 | function getStreamingPlaylistAttributesFromObject (video: MVideoId, videoObject: VideoObject) { |
114 | const playlistUrls = videoObject.url.filter(u => isAPStreamingPlaylistUrlObject(u)) as ActivityPlaylistUrlObject[] | 114 | const playlistUrls = videoObject.url.filter(u => isAPStreamingPlaylistUrlObject(u)) as ActivityPlaylistUrlObject[] |
115 | if (playlistUrls.length === 0) return [] | 115 | if (playlistUrls.length === 0) return [] |
116 | 116 | ||
@@ -118,7 +118,7 @@ function getStreamingPlaylistAttributesFromObject (video: MVideoId, videoObject: | |||
118 | for (const playlistUrlObject of playlistUrls) { | 118 | for (const playlistUrlObject of playlistUrls) { |
119 | const segmentsSha256UrlObject = playlistUrlObject.tag.find(isAPPlaylistSegmentHashesUrlObject) | 119 | const segmentsSha256UrlObject = playlistUrlObject.tag.find(isAPPlaylistSegmentHashesUrlObject) |
120 | 120 | ||
121 | let files: unknown[] = playlistUrlObject.tag.filter(u => isAPVideoUrlObject(u)) as ActivityVideoUrlObject[] | 121 | const files: unknown[] = playlistUrlObject.tag.filter(u => isAPVideoUrlObject(u)) as ActivityVideoUrlObject[] |
122 | 122 | ||
123 | if (!segmentsSha256UrlObject) { | 123 | if (!segmentsSha256UrlObject) { |
124 | logger.warn('No segment sha256 URL found in AP playlist object.', { playlistUrl: playlistUrlObject }) | 124 | logger.warn('No segment sha256 URL found in AP playlist object.', { playlistUrl: playlistUrlObject }) |