Utilize shutil.which() for finding youtube-dl binary
This commit is contained in:
parent
475eaebd96
commit
43013af49f
@ -8,10 +8,11 @@ Dependencies:
|
|||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import pathlib
|
import pathlib
|
||||||
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
# =========== Constants ==========
|
# =========== Constants ==========
|
||||||
YOUTUBE_DL_BIN = '/usr/bin/youtube-dl'
|
YOUTUBE_DL_BIN = shutil.which('youtube-dl')
|
||||||
DEFAULT_FILENAME = f"{pathlib.Path.home()}/Music/%(title)s.%(ext)s"
|
DEFAULT_FILENAME = f"{pathlib.Path.home()}/Music/%(title)s.%(ext)s"
|
||||||
|
|
||||||
# ========== Error Codes ==========
|
# ========== Error Codes ==========
|
||||||
|
Loading…
x
Reference in New Issue
Block a user