From bff03b30cadd603d06f4d33e617b7d5ebd6f13a8 Mon Sep 17 00:00:00 2001 From: heisir Date: Sat, 1 Aug 2020 18:36:38 +0800 Subject: [PATCH] fixed live bug --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index ea35592..53beb15 100644 --- a/main.js +++ b/main.js @@ -608,9 +608,9 @@ class QueueObject { let key_uri_ = path.join(fileDir,key_uri); if(!fs.existsSync(key_uri_)) { - var me = key_uri.match(/[^\\\/\?]{1,}\?|$/i); + var me = key_uri.match(/([^\\\/\?]{1,})(\?|$)/i); if(me && me.length > 1){ - key_uri_ = path.join(fileDir,me[0].replace(/\?$/,'')); + key_uri_ = path.join(fileDir,me[1]); } if(!fs.existsSync(key_uri_)) { @@ -929,7 +929,7 @@ async function startDownloadLive(object) { let myKeyIV = object.myKeyIV; let url = object.url; if(!taskName){ - taskName = id; + taskName = `${id}`; } let dir = path.join(app.getAppPath().replace(/resources\\app.asar$/g,""), 'download/'+taskName.replace(/["“”,\.。\|\/\\ \*:;\?<>]/g,"")); if(globalConfigSaveVideoDir)