Compare commits

..

No commits in common. "91582c67bd53d1a8d2550a3b96c98bced241dbbf" and "d519900ba8c9ca2d3e194951e8574698835258e4" have entirely different histories.

29
main.py
View File

@ -7,6 +7,7 @@ import sys
import time
from datetime import datetime
from pathlib import Path
import requests
channel_list = []
@ -53,20 +54,32 @@ def write_log(channel):
def download_stream(channel):
"""Downloads a given channel name in its own subprocess"""
# TODO: Just clean this up at somepoint
addtional_parms = ""
if skip_ads:
addtional_parms = "--twitch-proxy-playlist=https://lb-eu.cdn-perfprod.com,https://lb-eu2.cdn-perfprod.com,https://lb-na.cdn-perfprod.com,https://lb-as.cdn-perfprod.com,https://as.luminous.dev --twitch-disable-ads"
file_name = f"{channel}_{datetime.now().strftime('%Y-%m-%d_%H-%M-%S')}.ts"
cmd = f"{streamlink_location} --loglevel none --retry-max 10 {addtional_parms} -o {download_location}/{channel}/{file_name} twitch.tv/{channel} best"
# cmd = [
# f"{streamlink_location}",
# "--loglevel none",
# "--retry-max 10",
# f"{addtional_parms}",
# f"-o {download_location}/{channel}/{file_name}",
# f"twitch.tv/{channel}",
# "best",
# ]
# print(cmd)
downloading[channel] = subprocess.Popen(
[cmd],
shell=True,
start_new_session=True,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
[
f"{streamlink_location}",
"--loglevel none",
"--retry-max 10",
f"{addtional_parms}",
f"-o {download_location}/{channel}/{file_name}",
"twitch.tv/ActionButton",
"best",
]
)
write_log(channel)
# write_log(channel)
def check_system():