added wget to reqs.. i forgor. added playlist/category filtering
This commit is contained in:
parent
ebdd9a8b70
commit
fb231c603a
|
@ -14,6 +14,7 @@ Just download this repo and rename youtube_stuffs.db.def to youtube_stuffs.db
|
||||||
- sqlite3
|
- sqlite3
|
||||||
- sed
|
- sed
|
||||||
- yt-dlp
|
- yt-dlp
|
||||||
|
- wget
|
||||||
|
|
||||||
## optional requirements
|
## optional requirements
|
||||||
- chafa # for image previews
|
- chafa # for image previews
|
||||||
|
@ -25,7 +26,8 @@ Just download this repo and rename youtube_stuffs.db.def to youtube_stuffs.db
|
||||||
that should pretty much do everything.
|
that should pretty much do everything.
|
||||||
- check download_err.txt for download errors. Videos that are marked as nsfw and require sign in will NOT be added to the list and require manual intervention
|
- check download_err.txt for download errors. Videos that are marked as nsfw and require sign in will NOT be added to the list and require manual intervention
|
||||||
- then ``get_yt2.sh.``.
|
- then ``get_yt2.sh.``.
|
||||||
if you want thumbnails ``get_yt2.sh 1``.
|
- if you want thumbnails ``get_yt2.sh 1``.
|
||||||
|
- if you want to de a specific "category" or playlist. do ``get_yt2.sh 0 playlistname``
|
||||||
- if you want too then delete download.txt and download_err.txt and thumberr.txt
|
- if you want too then delete download.txt and download_err.txt and thumberr.txt
|
||||||
|
|
||||||
# config
|
# config
|
||||||
|
|
22
get_yt2.sh
22
get_yt2.sh
|
@ -7,14 +7,22 @@ cd "$(dirname "$0")"
|
||||||
has_chafa=$1
|
has_chafa=$1
|
||||||
! command -v chafa >/dev/null && has_chafa=0
|
! command -v chafa >/dev/null && has_chafa=0
|
||||||
|
|
||||||
if [ "$has_chafa" == "1" ]; then
|
playlist=$2
|
||||||
item="$(sqlite3 ./youtube_stuffs.db "select rowid,* from ytlist" | \
|
|
||||||
fzf --preview "./preview.sh {} | xargs chafa --clear -f iterm -s ${FZF_PREVIEW_COLUMNS}x${FZF_PREVIEW_LINES}" \
|
if [ "$2" == "" ]; then
|
||||||
| sed 's/|.*//g')"
|
item="$(sqlite3 ./youtube_stuffs.db "select rowid,* from ytlist")"
|
||||||
else
|
else
|
||||||
item="$(sqlite3 ./youtube_stuffs.db "select rowid,* from ytlist" | \
|
item="$(sqlite3 ./youtube_stuffs.db "select rowid,* from ytlist where category='$playlist'")"
|
||||||
fzf \
|
fi
|
||||||
| sed 's/|.*//g')"
|
|
||||||
|
if [ "$has_chafa" == "1" ]; then
|
||||||
|
item="$( printf "$item" | \
|
||||||
|
fzf --preview "./preview.sh {} | xargs chafa --clear -f iterm -s ${FZF_PREVIEW_COLUMNS}x${FZF_PREVIEW_LINES}" \
|
||||||
|
| sed 's/|.*//g')"
|
||||||
|
else
|
||||||
|
item="$( printf "$item" | \
|
||||||
|
fzf \
|
||||||
|
| sed 's/|.*//g')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
url=$(sqlite3 ./youtube_stuffs.db "select id from ytlist where rowid=$item")
|
url=$(sqlite3 ./youtube_stuffs.db "select id from ytlist where rowid=$item")
|
||||||
|
|
Loading…
Reference in New Issue