Compare commits

..

1 Commits

2 changed files with 2 additions and 24 deletions

View File

@ -2,14 +2,6 @@
while ! ping -c 1 9.9.9.9 > /dev/null 2>&1; do sleep 0.5; done
# "~/.local/share/channels.txt" looks like below:
# Luke Smith=https://www.youtube.com/@LukeSmithxyz/videos
# Mental Outlaw=https://www.youtube.com/@MentalOutlaw/videos
# ~/.local/share/categories.txt looks like below:
# Tech=Luke Smith|Mental Outlaw
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"
@ -23,16 +15,7 @@ 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" || {
notify-send "Failed to install $pkg."
exit 1
}
}
done
}
}
compare_data() {
local channel_name="$1"

View File

@ -8,11 +8,6 @@ CUSTOM_LIST_DIR="$DATA_DIR/custom_lists"
mkdir -p "$DATA_DIR" "$DOWNLOAD_DIR" "$CUSTOM_LIST_DIR"
[ "$(find "$DATA_DIR" -maxdepth 1 -type f -name "*.tsv" 2>/dev/null)" ] || {
notify-send "You need to run "channelrefresh" script first."
exit 1
}
DMENU() {
dmenu -i -l $1 -p "$2"
}
@ -69,7 +64,7 @@ custom_list_menu() {
[ -z "$list" ] && return
case "$list" in
*CREATE*)
new_list=$(echo "" | DMENU 0 "Enter the name of the new list")
new_list=$(DMENU 0 "Enter the name of the new list")
[ -n "$new_list" ] && touch "$CUSTOM_LIST_DIR/$new_list"
;;
*DELETE*)