Browse Source

Several improvements

notcammy 5 years ago
parent
commit
6337b8330f

+ 7 - 5
.github/issue_template.md

@@ -20,6 +20,13 @@ I am using:
 
 ### To report a bug, fill in the information below.
 
+
+###### Required 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 the Github upload size limit in size please use [WeTransfer](https://wetransfer.com/) or a similar service to upload these files.
+
+
 ###### PyInstaLive information 
 Run ```pyinstalive --info``` and paste its output below. Don't forget to omit your **username** and **password**.
 
@@ -71,11 +78,6 @@ 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.
 
-###### 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.
-
 ##
 
 ### To ask a question, fill in the information below.

+ 1 - 1
pyinstalive/constants.py

@@ -19,7 +19,7 @@ run_at_start =
 run_at_finish =
 use_locks = True
 clear_temp_files = False
-do_heartbeat = False
+do_heartbeat = True
 proxy =
 verbose = False
 skip_merge = False

+ 2 - 1
pyinstalive/dlfuncs.py

@@ -155,6 +155,7 @@ def merge_segments():
                 logger.info('Successfully merged downloaded files into video.')
             else:
                 logger.binfo("Merging of downloaded files has been disabled.")
+                logger.binfo("Use --assemble command to manually merge downloaded segments.")
             if pil.clear_temp_files:
                 helpers.remove_temp_folder()
             helpers.remove_lock()
@@ -311,7 +312,7 @@ def download_replays():
 
             for dl_path_file in dl_path_files:
                 if (str(replay_obj.get('id')) in dl_path_file) and ("_replay" in dl_path_file) and (dl_path_file.endswith(".mp4")):
-                    logger.binfo("Already downloaded a replay with ID '{:s}'.".format(str(replay_obj.get('id'))))
+                    logger.binfo("Already downloaded replay {:d} with ID '{:s}'.".format(replay_index + 1, str(replay_obj.get('id'))))
                     exists = True
             if not exists:
                 current = replay_index + 1

+ 2 - 2
pyinstalive/downloader.py

@@ -44,8 +44,8 @@ def start():
                 if pil.dl_replays:
                     if pil.replays_obj:
                         logger.info(
-                            '{:d} {:s} available, beginning download.'.format(len(pil.replays_obj), "replays" if len(
-                                pil.replays_obj) > 1 else "replay"))
+                            '{:s} available, beginning download.'.format("Replays" if len(
+                                pil.replays_obj) > 1 else "Replay"))
                         dlfuncs.download_replays()
                     else:
                         logger.info('There are no available replays{:s}.'.format(" saved on your account" if checking_self else ""))

+ 4 - 4
pyinstalive/logger.py

@@ -31,10 +31,10 @@ def supports_color():
         return False
 
 
-PREFIX_ERROR = '\x1B[1;31;40m[E]\x1B[0m'
-PREFIX_INFO = '\x1B[1;32;40m[I]\x1B[0m'
-PREFIX_WARN = '\x1B[1;33;40m[W]\x1B[0m'
-PREFIX_BINFO = '\x1B[1;34;40m[I]\x1B[0m'
+PREFIX_ERROR = '\x1B[1;31;49m[E]\x1B[0m'
+PREFIX_INFO = '\x1B[1;32;49m[I]\x1B[0m'
+PREFIX_WARN = '\x1B[1;33;49m[W]\x1B[0m'
+PREFIX_BINFO = '\x1B[1;34;49m[I]\x1B[0m'
 PRINT_SEP = '-' * 75
 SUPP_COLOR = supports_color()