1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Add tmp and redundancy directories

This commit is contained in:
Chocobozzz 2018-12-04 16:02:49 +01:00
parent 745778256c
commit 6040f87d14
No known key found for this signature in database
GPG key ID: 583A612D890159BE
26 changed files with 70 additions and 42 deletions

View file

@ -46,11 +46,11 @@ const getServerActor = memoizee(async function () {
return actor
})
function generateVideoTmpPath (target: string | ParseTorrent) {
function generateVideoImportTmpPath (target: string | ParseTorrent) {
const id = typeof target === 'string' ? target : target.infoHash
const hash = sha256(id)
return join(CONFIG.STORAGE.VIDEOS_DIR, hash + '-import.mp4')
return join(CONFIG.STORAGE.TMP_DIR, hash + '-import.mp4')
}
function getSecureTorrentName (originalName: string) {
@ -103,6 +103,6 @@ export {
getSecureTorrentName,
getServerActor,
getServerCommit,
generateVideoTmpPath,
generateVideoImportTmpPath,
getUUIDFromFilename
}