瀏覽代碼

Update issue template and some verbose logs

Cammy 6 年之前
父節點
當前提交
3a96a50804
共有 4 個文件被更改,包括 17 次插入8 次删除
  1. 10 7
      .github/issue_template.md
  2. 4 0
      pyinstalive/assembler.py
  3. 1 0
      pyinstalive/constants.py
  4. 2 1
      pyinstalive/startup.py

+ 10 - 7
.github/issue_template.md

@@ -1,6 +1,7 @@
-### Please check the boxes below by filling [ ] with an x so it looks like [x].
-###### Remove all spaces already present in the box.
-
+## Fill in this template completely. Issues not following this template will be closed and ignored.
+#### Check the boxes below by filling `[ ]` with an `x` so it looks like `[x]`.
+#### Use the Preview button to ensure the template is filled in correctly.
+##
 - [ ] I am using the latest version of PyInstaLive: 3.1.0.
 - [ ] I have installed either Python 2.7.x or 3.5+: `YOUR VERSION HERE`
 - [ ] I have read the [README](https://github.com/notcammy/pyinstalive/blob/master/README.md).
@@ -59,7 +60,8 @@ $ pyinstalive --info
 ```
 
 ###### Command used
-Paste the command here that you are running. Don't forget to omit your **username** and **password**.
+Paste the command here that you are running. Don't forget to omit your **username** and **password**.  
+If you can reproduce the problem then, if possible, run the same command again with `--verbose` prior to uploading the log files.
 
 **Example:** ```pyinstalive -u "johndoe" -p "grapefruits" -d "justinbieber"```
 
@@ -69,9 +71,10 @@ Accurately describe the issue you're experiencing with the script.
 ###### Steps to reproduce issue
 Specify the exact steps taken to reproduce the problem. If you can't reproduce the issue try to describe the steps you've taken that eventually resulted in the issue you have experienced.
 
-###### Log files
-Please attach the log file of the user you were trying to download (if applicable) and the `pyinstalive.default.log` log file.
-If any of the files exceed 10MB in size please use [WeTransfer](https://wetransfer.com/) or a similar service to upload these files.
+###### Required dditional files
+Please attach the log file of the user you were trying to download (if applicable) and the `pyinstalive.default.log` log file.  
+If your issue is related to assembling segment files please also include the JSON file and a zipped segment files directory.  
+If any of these files exceed 10MB in size please use [WeTransfer](https://wetransfer.com/) or a similar service to upload these files.
 
 ##
 

+ 4 - 0
pyinstalive/assembler.py

@@ -35,6 +35,10 @@ def assemble(user_called=True, retry_with_zero_m4v=False):
         ass_json_file = pil.assemble_arg if pil.assemble_arg.endswith(".json") else pil.assemble_arg + ".json"
         ass_mp4_file = os.path.join(pil.dl_path, os.path.basename(ass_json_file).replace("_downloads", "").replace(".json", ".mp4"))
         ass_segment_dir = pil.assemble_arg if not pil.assemble_arg.endswith(".json") else pil.assemble_arg.replace(".json", "")
+
+        if pil.verbose:
+            logger.plain("{}\n{}\n{}".format(ass_json_file, ass_mp4_file, ass_segment_dir))
+
         broadcast_info = {}
         if not os.path.isdir(ass_segment_dir) or not os.listdir(ass_segment_dir):
             logger.error('The segment directory does not exist or does not contain any files: %s' % ass_segment_dir)

+ 1 - 0
pyinstalive/constants.py

@@ -21,4 +21,5 @@ use_locks = True
 clear_temp_files = False
 do_heartbeat = False
 proxy =
+verbose = False
     """

+ 2 - 1
pyinstalive/startup.py

@@ -266,7 +266,8 @@ def run():
                                                                                                 "check for "
                                                                                                 "livestreams.")
     parser.add_argument('-v', '--verbose', dest='verbose', action='store_true', help="PyInstaLive will output JSON "
-                                                                                     "responses.")
+                                                                                     "responses and some misc "
+                                                                                     "variables.")
     # Workaround to 'disable' argument abbreviations
     parser.add_argument('--usernamx', help=argparse.SUPPRESS, metavar='IGNORE')
     parser.add_argument('--passworx', help=argparse.SUPPRESS, metavar='IGNORE')