1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

Update torrent metadata on video update

This commit is contained in:
Chocobozzz 2021-12-08 11:07:19 +01:00
parent a23f6c94ed
commit 9b293cd6a2
No known key found for this signature in database
GPG key ID: 583A612D890159BE
7 changed files with 42 additions and 13 deletions

View file

@ -2,7 +2,7 @@ import { Job } from 'bull'
import { remove } from 'fs-extra'
import { join } from 'path'
import { logger } from '@server/helpers/logger'
import { updateTorrentUrls } from '@server/helpers/webtorrent'
import { updateTorrentMetadata } from '@server/helpers/webtorrent'
import { CONFIG } from '@server/initializers/config'
import { P2P_MEDIA_LOADER_PEER_VERSION } from '@server/initializers/constants'
import { storeHLSFile, storeWebTorrentFile } from '@server/lib/object-storage'
@ -113,7 +113,7 @@ async function onFileMoved (options: {
file.fileUrl = fileUrl
file.storage = VideoStorage.OBJECT_STORAGE
await updateTorrentUrls(videoOrPlaylist, file)
await updateTorrentMetadata(videoOrPlaylist, file)
await file.save()
logger.debug('Removing %s because it\'s now on object storage', oldPath)