improve is_valid_lrc

This commit is contained in:
2026-04-25 21:01:26 -05:00
parent eeba67f6f6
commit 1ea04833aa
+3 -3
View File
@@ -247,14 +247,14 @@ set_lyric_file_name() {
is_valid_lrc() { is_valid_lrc() {
local file="$1" local file="$1"
test -f "${file}" || return 1 local valid=1
local valid=0
while read -r line; do while read -r line; do
[[ "${#line}" -eq 0 ]] && continue
if [[ "${line}" != '['* ]]; then if [[ "${line}" != '['* ]]; then
valid=1 valid=1
break break
fi fi
valid=0
done <"${file}" done <"${file}"
return ${valid} return ${valid}