mirror of
https://gitgud.io/Melon__Bread/auto-ttv-grabber.git
synced 2024-11-24 16:28:30 -05:00
What is this path issue?
This commit is contained in:
parent
a0ae115748
commit
d519900ba8
27
main.py
27
main.py
@ -16,7 +16,7 @@ downloading = {}
|
||||
# Default Config Settings
|
||||
config = configparser.ConfigParser()
|
||||
streamlink_location = "streamlink"
|
||||
download_location = str(f"{Path.home()}/Downloads/Streams/")
|
||||
download_location = f"{Path.home()}/Downloads/Streams"
|
||||
skip_ads = False
|
||||
|
||||
|
||||
@ -57,21 +57,29 @@ def download_stream(channel):
|
||||
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",
|
||||
# f"{addtional_parms}",
|
||||
# f"-o {download_location}/{channel}/{file_name}",
|
||||
# f"twitch.tv/{channel}",
|
||||
# "best",
|
||||
# ]
|
||||
# print(cmd)
|
||||
downloading[channel] = subprocess.Popen(
|
||||
[
|
||||
f"{streamlink_location}",
|
||||
"--loglevel none",
|
||||
"--retry-max 10",
|
||||
addtional_parms,
|
||||
f"-o {download_location}/{channel}/{datetime.now()}.ts",
|
||||
f"https://twitch.tv/{channel}",
|
||||
f"{addtional_parms}",
|
||||
f"-o {download_location}/{channel}/{file_name}",
|
||||
"twitch.tv/ActionButton",
|
||||
"best",
|
||||
],
|
||||
start_new_session=True,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
]
|
||||
)
|
||||
write_log(channel)
|
||||
# write_log(channel)
|
||||
|
||||
|
||||
def check_system():
|
||||
@ -80,6 +88,7 @@ def check_system():
|
||||
if not shutil.which("streamlink"):
|
||||
sys.exit("ERROR: streamlink is not found in the systems path!")
|
||||
|
||||
# TODO: Combine the channel_list into the config
|
||||
# Checks if the channel_list exists and if not makes one
|
||||
if not os.path.exists("channel_list.txt"):
|
||||
print("ERROR:'channel_list.txt' does not exist, creating now!")
|
||||
|
Loading…
Reference in New Issue
Block a user