diff options
author | Chocobozzz <me@florianbigard.com> | 2021-04-08 10:35:49 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-04-08 13:38:04 +0200 |
commit | a0eeb45f14bab539f505861cad8f5d42d9ba30cb (patch) | |
tree | 773eb5aa575c8ab870b9c84f686e6062aa58d9fd /server/lib/activitypub | |
parent | ca873292899c9a822a236556993916d98da14913 (diff) | |
download | PeerTube-a0eeb45f14bab539f505861cad8f5d42d9ba30cb.tar.gz PeerTube-a0eeb45f14bab539f505861cad8f5d42d9ba30cb.tar.zst PeerTube-a0eeb45f14bab539f505861cad8f5d42d9ba30cb.zip |
Update data in DB when regenerate thumbnails
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r-- | server/lib/activitypub/videos.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts index d484edd36..492b97b9e 100644 --- a/server/lib/activitypub/videos.ts +++ b/server/lib/activitypub/videos.ts | |||
@@ -3,6 +3,7 @@ import { maxBy, minBy } from 'lodash' | |||
3 | import * as magnetUtil from 'magnet-uri' | 3 | import * as magnetUtil from 'magnet-uri' |
4 | import { basename, join } from 'path' | 4 | import { basename, join } from 'path' |
5 | import { Transaction } from 'sequelize/types' | 5 | import { Transaction } from 'sequelize/types' |
6 | import { ActorImageModel } from '@server/models/account/actor-image' | ||
6 | import { TrackerModel } from '@server/models/server/tracker' | 7 | import { TrackerModel } from '@server/models/server/tracker' |
7 | import { VideoLiveModel } from '@server/models/video/video-live' | 8 | import { VideoLiveModel } from '@server/models/video/video-live' |
8 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | 9 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' |
@@ -899,7 +900,7 @@ function getPreviewFromIcons (videoObject: VideoObject) { | |||
899 | function getPreviewUrl (previewIcon: ActivityIconObject, video: MVideoWithHost) { | 900 | function getPreviewUrl (previewIcon: ActivityIconObject, video: MVideoWithHost) { |
900 | return previewIcon | 901 | return previewIcon |
901 | ? previewIcon.url | 902 | ? previewIcon.url |
902 | : buildRemoteVideoBaseUrl(video, join(LAZY_STATIC_PATHS.PREVIEWS, video.generatePreviewName())) | 903 | : buildRemoteVideoBaseUrl(video, join(LAZY_STATIC_PATHS.PREVIEWS, ActorImageModel.generateFilename())) |
903 | } | 904 | } |
904 | 905 | ||
905 | function getTrackerUrls (object: VideoObject, video: MVideoWithHost) { | 906 | function getTrackerUrls (object: VideoObject, video: MVideoWithHost) { |