]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-caption.ts
chore(refactor): remove shared folder dependencies to the server
[github/Chocobozzz/PeerTube.git] / server / models / video / video-caption.ts
index 5ec944b9e8042c4bc38a3288451d9953a2318bac..590e72e527d3d8310ba8cfcfc9d53d51f7e735a3 100644 (file)
@@ -15,7 +15,7 @@ import {
   Table,
   UpdatedAt
 } from 'sequelize-typescript'
-import { v4 as uuidv4 } from 'uuid'
+import { buildUUID } from '@shared/core-utils/uuid'
 import { MVideo, MVideoCaption, MVideoCaptionFormattable, MVideoCaptionVideo } from '@server/types/models'
 import { AttributesOnly } from '@shared/core-utils'
 import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model'
@@ -182,7 +182,7 @@ export class VideoCaptionModel extends Model<Partial<AttributesOnly<VideoCaption
   }
 
   static generateCaptionName (language: string) {
-    return `${uuidv4()}-${language}.vtt`
+    return `${buildUUID()}-${language}.vtt`
   }
 
   isOwned () {