diff --git a/main.py b/main.py index c643c13..06c9fde 100644 --- a/main.py +++ b/main.py @@ -2,6 +2,7 @@ from tinydb import TinyDB, Query from bs4 import BeautifulSoup import requests from simple_term_menu import TerminalMenu +import os import subprocess db = TinyDB("./database.json", indent=4) @@ -44,6 +45,7 @@ while True: terminal_menu = TerminalMenu(lst) file = soup.findAll("a")[terminal_menu.show()]["href"] if (not file.endswith("/")): - subprocess.run(f"vlc '{url + file}'", shell=True) + with open(os.devnull, 'wb') as devnull: + subprocess.check_call(['vlc', url + file], stdout=devnull, stderr=subprocess.STDOUT) else: url = url + file