Explorar o código

增加pm2并修改保存路径

LiuLiu %!s(int64=3) %!d(string=hai) anos
pai
achega
2dc5139ff8
Modificáronse 2 ficheiros con 16 adicións e 2 borrados
  1. 2 2
      core/recorder.py
  2. 14 0
      pm2.config.json

+ 2 - 2
core/recorder.py

@@ -30,10 +30,10 @@ class Recorder:
             'qn_desc': current_qn_desc,
             'datetime': datetime.now().isoformat()
         })
-        f_handler=open(outputName+'.log', 'w') if log else asyncio.subprocess.PIPE
+        f_handler=open("./logs/"+outputName+'.log', 'w') if log else asyncio.subprocess.PIPE
         self.ff = ffmpy3.FFmpeg(
             inputs={url:" -v debug"},
-            outputs={outputName+".flv":"-c copy -y"}
+            outputs={"./videos/"+outputName+".flv":"-c copy -y"}
         )
         self.process = self.ff.run_async(stdout=f_handler, stderr=f_handler)
         print(self.ff.cmd)

+ 14 - 0
pm2.config.json

@@ -0,0 +1,14 @@
+{
+    "name": "bilibiliAutoRecorder",
+    "script": "python3",
+    "args": "__main__.py",
+    "cwd": "./",
+    "watch": [],
+    "ignore_watch": [
+      "videos",
+      "logs"
+    ],
+    "watch_options": {
+      "followSymlinks": false
+    }
+  }