aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/update-host.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-08 11:07:19 +0100
committerChocobozzz <me@florianbigard.com>2021-12-08 11:07:19 +0100
commit9b293cd6a2ce9ed1e1ccd41adbf7f2dbe2da8231 (patch)
tree3419e23d551937f716612f93747f58f2d381d310 /scripts/update-host.ts
parenta23f6c94edee1cb11875585a64dc61f1004c1792 (diff)
downloadPeerTube-9b293cd6a2ce9ed1e1ccd41adbf7f2dbe2da8231.tar.gz
PeerTube-9b293cd6a2ce9ed1e1ccd41adbf7f2dbe2da8231.tar.zst
PeerTube-9b293cd6a2ce9ed1e1ccd41adbf7f2dbe2da8231.zip
Update torrent metadata on video update
Diffstat (limited to 'scripts/update-host.ts')
-rwxr-xr-xscripts/update-host.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/update-host.ts b/scripts/update-host.ts
index c6eb9d533..f752082fd 100755
--- a/scripts/update-host.ts
+++ b/scripts/update-host.ts
@@ -17,7 +17,7 @@ import { VideoCommentModel } from '../server/models/video/video-comment'
17import { AccountModel } from '../server/models/account/account' 17import { AccountModel } from '../server/models/account/account'
18import { VideoChannelModel } from '../server/models/video/video-channel' 18import { VideoChannelModel } from '../server/models/video/video-channel'
19import { initDatabaseModels } from '../server/initializers/database' 19import { initDatabaseModels } from '../server/initializers/database'
20import { updateTorrentUrls } from '@server/helpers/webtorrent' 20import { updateTorrentMetadata } from '@server/helpers/webtorrent'
21import { getServerActor } from '@server/models/application/application' 21import { getServerActor } from '@server/models/application/application'
22 22
23run() 23run()
@@ -126,7 +126,7 @@ async function run () {
126 126
127 for (const file of video.VideoFiles) { 127 for (const file of video.VideoFiles) {
128 console.log('Updating torrent file %s of video %s.', file.resolution, video.uuid) 128 console.log('Updating torrent file %s of video %s.', file.resolution, video.uuid)
129 await updateTorrentUrls(video, file) 129 await updateTorrentMetadata(video, file)
130 130
131 await file.save() 131 await file.save()
132 } 132 }
@@ -135,7 +135,7 @@ async function run () {
135 for (const file of (playlist?.VideoFiles || [])) { 135 for (const file of (playlist?.VideoFiles || [])) {
136 console.log('Updating fragmented torrent file %s of video %s.', file.resolution, video.uuid) 136 console.log('Updating fragmented torrent file %s of video %s.', file.resolution, video.uuid)
137 137
138 await updateTorrentUrls(video, file) 138 await updateTorrentMetadata(video, file)
139 139
140 await file.save() 140 await file.save()
141 } 141 }