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:
parent
745778256c
commit
6040f87d14
26 changed files with 70 additions and 42 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue