Avoid illegal characters in torrent filename

This commit is contained in:
Chocobozzz 2023-09-01 09:55:08 +02:00
parent ca8a00d0e7
commit c4799cd1b9
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 3 additions and 1 deletions

View File

@ -259,5 +259,7 @@ function buildUrlList (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}`
}