Checks for dl-stream in path

This commit is contained in:
Rain Clark 2024-04-03 13:27:00 -04:00
parent 660e10c658
commit 9c1da788ab

View File

@ -5,6 +5,7 @@ import time
import requests import requests
import os import os
import sys import sys
import shutil
channel_list = [] channel_list = []
downloading = [] 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 # Checks if the channel_list exists and if not makes one
if os.path.exists("channel_list.txt"): if os.path.exists("channel_list.txt"):
# Grab all the channels from channel_list.txt and put them in a list # Grab all the channels from channel_list.txt and put them in a list