- Update Functionality for yt-dlp Without pip: Modified the
update_yt_dlp
function to download the latestyt-dlp
binary directly from the official GitHub releases, avoiding dependency onpip
. The script now:- Checks if
yt-dlp -U
can updateyt-dlp
. - If not, downloads the latest binary using
curl
orwget
. - Installs
yt-dlp
to/usr/local/bin
or~/.local/bin
based on write permissions. - Adds the installation directory to
PATH
if it's not already included.
- Checks if
-
Dependency Checks:
- Added checks to ensure that either
curl
orwget
is installed, as they are necessary to download theyt-dlp
binary. - Included
curl
in the list of dependencies if neithercurl
norwget
is found.
- Added checks to ensure that either
-
Removed pip Dependency:
- Removed all references to
pip
from theupdate_yt_dlp
function. - The script no longer relies on
pip
for updatingyt-dlp
, ensuring it works in environments wherepip
is not available.
- Removed all references to
- Error Handling and Messaging:
- Improved error messages throughout the script for better clarity and user experience.
- Ensured consistent handling of situations where dependencies are missing or updates fail.
-
First-Time Use:
- The script may modify
~/.bashrc
to add~/.local/bin
to thePATH
. Users may need to source~/.bashrc
or restart their terminal session after the script runs.
- The script may modify
-
Permissions:
- If the script cannot write to the installation directories due to permission issues, it prompts the user and exits gracefully.