From 9c1da788ab87eeb0ef1d9f21f504db2bcebbee5f Mon Sep 17 00:00:00 2001 From: Rain Date: Wed, 3 Apr 2024 13:27:00 -0400 Subject: [PATCH] Checks for dl-stream in path --- main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.py b/main.py index e5de0be..cc4b1cb 100644 --- a/main.py +++ b/main.py @@ -5,6 +5,7 @@ import time import requests import os import sys +import shutil channel_list = [] downloading = [] @@ -18,6 +19,11 @@ def download_stream(channel): ) +# Checks if dl-stream is in the systems path +if not shutil.which("dl-stream"): + sys.exit("ERROR: dl-stream is not found in the systems path!") + + # Checks if the channel_list exists and if not makes one if os.path.exists("channel_list.txt"): # Grab all the channels from channel_list.txt and put them in a list