Skip to content

Commit

Permalink
fix: a few subprocess calls not piping output
Browse files Browse the repository at this point in the history
  • Loading branch information
Puyodead1 committed Dec 28, 2021
1 parent aeca63d commit 72a354e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion _version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.1.4"
__version__ = "1.1.5"
9 changes: 6 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,8 @@ def handle_segments(url, format_id, video_title,
if disable_ipv6:
args.append("--downloader-args")
args.append("aria2c:\"--disable-ipv6\"")
ret_code = subprocess.Popen(args).wait()
ret_code = subprocess.Popen(
args, stderr=subprocess.PIPE, stdout=subprocess.PIPE).wait()
logger.info("> Lecture Tracks Downloaded")

logger.debug("Return code: " + str(ret_code))
Expand Down Expand Up @@ -1214,7 +1215,8 @@ def download_aria(url, file_dir, filename):
]
if disable_ipv6:
args.append("--disable-ipv6")
ret_code = subprocess.Popen(args).wait()
ret_code = subprocess.Popen(
args, stderr=subprocess.PIPE, stdout=subprocess.PIPE).wait()
logger.info(" > File Downloaded")

logger.debug("Return code: " + str(ret_code))
Expand Down Expand Up @@ -1308,7 +1310,8 @@ def process_lecture(lecture, lecture_path, lecture_file_name, chapter_dir):
if disable_ipv6:
args.append("--downloader-args")
args.append("aria2c:\"--disable-ipv6\"")
ret_code = subprocess.Popen(args).wait()
ret_code = subprocess.Popen(
args, stderr=subprocess.PIPE, stdout=subprocess.PIPE).wait()
if ret_code == 0:
# os.rename(temp_filepath, lecture_path)
logger.info(" > HLS Download success")
Expand Down

0 comments on commit 72a354e

Please sign in to comment.