Fixed m3u file naming for playlists
authorRemixDev <deezloaderremix@gmail.com>
Wed, 13 Nov 2019 09:55:17 +0000 (10:55 +0100)
committerRemixDev <deezloaderremix@gmail.com>
Wed, 13 Nov 2019 09:55:17 +0000 (10:55 +0100)
app/app.js

index cd6a34c6568f02a825b14aed31cd3d4539bada18..98a0dd99fa3d68396876bda869cf838f1a89cf32 100644 (file)
@@ -1235,7 +1235,7 @@ io.sockets.on('connection', function (s) {
                                        if (downloading.settings.createM3UFile){
                                                let path = ""
                                                if (downloading.settings.changePlaylistName)
-                                                       path = downloading.filePath + downloading.filePath.match(/([^\/]*)\/*$/)[1]+".m3u8"
+                                                       path = downloading.filePath + antiDot(fixName(downloading.name))+".m3u8"
                                                else
                                                        path = downloading.filePath+"playlist.m3u8"
                                                fs.writeFileSync(path, downloading.playlistArr.join("\r\n"));
@@ -1376,7 +1376,7 @@ io.sockets.on('connection', function (s) {
                                        if (downloading.settings.createM3UFile){
                                                let path = ""
                                                if (downloading.settings.changePlaylistName)
-                                                       path = downloading.filePath + downloading.filePath.match(/([^\/]*)\/*$/)[1]+".m3u8"
+                                                       path = downloading.filePath + antiDot(fixName(downloading.name))+".m3u8"
                                                else
                                                        path = downloading.filePath+"playlist.m3u8"
                                                fs.writeFileSync(path, downloading.playlistArr.join("\r\n"));