mirror of https://github.com/Chocobozzz/PeerTube
Avoid illegal characters in torrent filename
parent
ca8a00d0e7
commit
c4799cd1b9
|
@ -259,5 +259,7 @@ function buildUrlList (video: MVideo, videoFile: MVideoFile) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildInfoName (video: MVideo, videoFile: MVideoFile) {
|
function buildInfoName (video: MVideo, videoFile: MVideoFile) {
|
||||||
return `${video.name} ${videoFile.resolution}p${videoFile.extname}`
|
const videoName = video.name.replace(/[/\\?%*:|"<>]/g, '-')
|
||||||
|
|
||||||
|
return `${videoName} ${videoFile.resolution}p${videoFile.extname}`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue