Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Ultimate Way of Browsing Channels #1320

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
12 changes: 11 additions & 1 deletion .local/bin/channelrefresh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

while ! ping -c 1 9.9.9.9 > /dev/null 2>&1; do sleep 0.5; done

INSTALLER="sudo pacman -S --noconfirm"
DATA_DIR="$HOME/.cache/youtube_channels"
CHANNEL_LIST="$HOME/.local/share/channels.txt"
mkdir -p "$DATA_DIR" && touch "$CHANNEL_LIST"
Expand All @@ -15,7 +16,16 @@ error_handling() {
notify-send "'channels.txt' formatting is wrong."
exit 1
}
}
for pkg in yt-dlp mpv jq; do
command -v "$pkg" >/dev/null || {
notify-send "$pkg is not installed. Installing..."
$INSTALLER "$pkg" || {
emrakyz marked this conversation as resolved.
Show resolved Hide resolved
notify-send "Failed to install $pkg."
exit 1
}
}
done
}

compare_data() {
local channel_name="$1"
Expand Down