diff options
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r-- | server/models/video/video.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 0f0f894e4..543e604bb 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -26,12 +26,13 @@ import { | |||
26 | } from 'sequelize-typescript' | 26 | } from 'sequelize-typescript' |
27 | import { setAsUpdated } from '@server/helpers/database-utils' | 27 | import { setAsUpdated } from '@server/helpers/database-utils' |
28 | import { buildNSFWFilter } from '@server/helpers/express-utils' | 28 | import { buildNSFWFilter } from '@server/helpers/express-utils' |
29 | import { shortToUUID } from '@server/helpers/uuid' | ||
29 | import { getPrivaciesForFederation, isPrivacyForFederation, isStateForFederation } from '@server/helpers/video' | 30 | import { getPrivaciesForFederation, isPrivacyForFederation, isStateForFederation } from '@server/helpers/video' |
30 | import { LiveManager } from '@server/lib/live/live-manager' | 31 | import { LiveManager } from '@server/lib/live/live-manager' |
31 | import { getHLSDirectory, getVideoFilePath } from '@server/lib/video-paths' | 32 | import { getHLSDirectory, getVideoFilePath } from '@server/lib/video-paths' |
32 | import { getServerActor } from '@server/models/application/application' | 33 | import { getServerActor } from '@server/models/application/application' |
33 | import { ModelCache } from '@server/models/model-cache' | 34 | import { ModelCache } from '@server/models/model-cache' |
34 | import { AttributesOnly } from '@shared/core-utils' | 35 | import { AttributesOnly, buildVideoEmbedPath, buildVideoWatchPath } from '@shared/core-utils' |
35 | import { VideoFile } from '@shared/models/videos/video-file.model' | 36 | import { VideoFile } from '@shared/models/videos/video-file.model' |
36 | import { ResultList, UserRight, VideoPrivacy, VideoState } from '../../../shared' | 37 | import { ResultList, UserRight, VideoPrivacy, VideoState } from '../../../shared' |
37 | import { VideoObject } from '../../../shared/models/activitypub/objects' | 38 | import { VideoObject } from '../../../shared/models/activitypub/objects' |
@@ -1578,11 +1579,11 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> { | |||
1578 | } | 1579 | } |
1579 | 1580 | ||
1580 | getWatchStaticPath () { | 1581 | getWatchStaticPath () { |
1581 | return '/w/' + this.uuid | 1582 | return buildVideoWatchPath({ shortUUID: shortToUUID(this.uuid) }) |
1582 | } | 1583 | } |
1583 | 1584 | ||
1584 | getEmbedStaticPath () { | 1585 | getEmbedStaticPath () { |
1585 | return '/videos/embed/' + this.uuid | 1586 | return buildVideoEmbedPath(this) |
1586 | } | 1587 | } |
1587 | 1588 | ||
1588 | getMiniatureStaticPath () { | 1589 | getMiniatureStaticPath () { |