aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-08 11:32:45 +0100
committerChocobozzz <me@florianbigard.com>2021-12-08 16:12:49 +0100
commit38d69d65012c8bf01bceb672be99f94fe414f275 (patch)
tree80ba6d43c4ce7ccff0c64d0c0817f43cc02a6531 /server/helpers
parent9b293cd6a2ce9ed1e1ccd41adbf7f2dbe2da8231 (diff)
downloadPeerTube-38d69d65012c8bf01bceb672be99f94fe414f275.tar.gz
PeerTube-38d69d65012c8bf01bceb672be99f94fe414f275.tar.zst
PeerTube-38d69d65012c8bf01bceb672be99f94fe414f275.zip
Update torrents info name on video update
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/webtorrent.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/helpers/webtorrent.ts b/server/helpers/webtorrent.ts
index b350c9718..ecc703646 100644
--- a/server/helpers/webtorrent.ts
+++ b/server/helpers/webtorrent.ts
@@ -14,7 +14,7 @@ import { MVideo } from '@server/types/models/video/video'
14import { MVideoFile, MVideoFileRedundanciesOpt } from '@server/types/models/video/video-file' 14import { MVideoFile, MVideoFileRedundanciesOpt } from '@server/types/models/video/video-file'
15import { MStreamingPlaylistVideo } from '@server/types/models/video/video-streaming-playlist' 15import { MStreamingPlaylistVideo } from '@server/types/models/video/video-streaming-playlist'
16import { CONFIG } from '../initializers/config' 16import { CONFIG } from '../initializers/config'
17import { promisify2 } from './core-utils' 17import { promisify2, sha1 } from './core-utils'
18import { logger } from './logger' 18import { logger } from './logger'
19import { generateVideoImportTmpPath } from './utils' 19import { generateVideoImportTmpPath } from './utils'
20import { extractVideo } from './video' 20import { extractVideo } from './video'
@@ -145,6 +145,7 @@ async function updateTorrentMetadata (videoOrPlaylist: MVideo | MStreamingPlayli
145 await remove(join(CONFIG.STORAGE.TORRENTS_DIR, videoFile.torrentFilename)) 145 await remove(join(CONFIG.STORAGE.TORRENTS_DIR, videoFile.torrentFilename))
146 146
147 videoFile.torrentFilename = newTorrentFilename 147 videoFile.torrentFilename = newTorrentFilename
148 videoFile.infoHash = sha1(encode(decoded.info))
148} 149}
149 150
150function generateMagnetUri ( 151function generateMagnetUri (