diff options
Diffstat (limited to 'server/lib/activitypub/playlist.ts')
-rw-r--r-- | server/lib/activitypub/playlist.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/activitypub/playlist.ts b/server/lib/activitypub/playlist.ts index bd442b223..53298e968 100644 --- a/server/lib/activitypub/playlist.ts +++ b/server/lib/activitypub/playlist.ts | |||
@@ -18,6 +18,7 @@ import { createPlaylistMiniatureFromUrl } from '../thumbnail' | |||
18 | import { FilteredModelAttributes } from '../../types/sequelize' | 18 | import { FilteredModelAttributes } from '../../types/sequelize' |
19 | import { MAccountDefault, MAccountId, MVideoId } from '../../types/models' | 19 | import { MAccountDefault, MAccountId, MVideoId } from '../../types/models' |
20 | import { MVideoPlaylist, MVideoPlaylistId, MVideoPlaylistOwner } from '../../types/models/video/video-playlist' | 20 | import { MVideoPlaylist, MVideoPlaylistId, MVideoPlaylistOwner } from '../../types/models/video/video-playlist' |
21 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | ||
21 | 22 | ||
22 | function playlistObjectToDBAttributes (playlistObject: PlaylistObject, byAccount: MAccountId, to: string[]) { | 23 | function playlistObjectToDBAttributes (playlistObject: PlaylistObject, byAccount: MAccountId, to: string[]) { |
23 | const privacy = to.includes(ACTIVITY_PUB.PUBLIC) | 24 | const privacy = to.includes(ACTIVITY_PUB.PUBLIC) |
@@ -120,7 +121,7 @@ async function refreshVideoPlaylistIfNeeded (videoPlaylist: MVideoPlaylistOwner) | |||
120 | 121 | ||
121 | try { | 122 | try { |
122 | const { statusCode, playlistObject } = await fetchRemoteVideoPlaylist(videoPlaylist.url) | 123 | const { statusCode, playlistObject } = await fetchRemoteVideoPlaylist(videoPlaylist.url) |
123 | if (statusCode === 404) { | 124 | if (statusCode === HttpStatusCode.NOT_FOUND_404) { |
124 | logger.info('Cannot refresh remote video playlist %s: it does not exist anymore. Deleting it.', videoPlaylist.url) | 125 | logger.info('Cannot refresh remote video playlist %s: it does not exist anymore. Deleting it.', videoPlaylist.url) |
125 | 126 | ||
126 | await videoPlaylist.destroy() | 127 | await videoPlaylist.destroy() |