fixed preview.sh when first char in ytid is - such as -yK

This commit is contained in:
iceyrazor 2025-04-13 12:43:28 -05:00
parent 92fa7da411
commit ecc33e9454
2 changed files with 4 additions and 1 deletions

3
.gitignore vendored
View File

@ -1,3 +1,6 @@
download.txt
download_err.txt
thumberr.txt
*youtube_stuffs.db
thumbnails/**
vids/**

View File

@ -1,5 +1,5 @@
#!/bin/bash
cd "$(dirname "$0")"
rowid="$(echo $1 | sed 's/|.*//g')"
thumbnail="$(ls thumbnails/ | grep "$(sqlite3 ./youtube_stuffs.db "select id from ytlist where rowid=$rowid;").*" )"
thumbnail="$(ls thumbnails/ | grep -e "$(sqlite3 ./youtube_stuffs.db "select id from ytlist where rowid=$rowid;").*" )"
printf "thumbnails/$thumbnail"