diff options
author | awy <awy@awy.one> | 2025-08-08 18:14:11 +0300 |
---|---|---|
committer | awy <awy@awy.one> | 2025-08-08 18:14:11 +0300 |
commit | c4c20e10a93eff16515226c71a6e8547292cf3e4 (patch) | |
tree | 15854d494b381da5fb98d26fe308dbfb1534dac8 /.local | |
parent | defb1ef64b5321e285e250b1d3c201b6f97abb42 (diff) | |
download | hyprdots-c4c20e10a93eff16515226c71a6e8547292cf3e4.tar.gz |
lyrics check script
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/check_lyrics | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/.local/bin/check_lyrics b/.local/bin/check_lyrics new file mode 100755 index 0000000..ebfd7d7 --- /dev/null +++ b/.local/bin/check_lyrics @@ -0,0 +1,21 @@ +#!/bin/sh + +MUSIC_DIR="${1:-.}" + +# Check FLAC files for matching lyrics +fd --glob "*.flac" -t f "$MUSIC_DIR" | while IFS= read -r flac_file; do + base_name="${flac_file%.flac}" + lyrics_file="${base_name}.lrc" + if [ ! -f "$lyrics_file" ]; then + echo "Mismatch: $(basename "$flac_file" .flac) exists, but $(basename "$lyrics_file") is missing" + fi +done + +# Check for orphaned lyrics files +fd --glob "*.lrc" -t f "$MUSIC_DIR" | while IFS= read -r lyrics_file; do + base_name="${lyrics_file%.lrc}" + flac_file="${base_name}.flac" + if [ ! -f "$flac_file" ]; then + echo "Orphaned: $(basename "$lyrics_file" .lrc) exists, but $(basename "$flac_file") is missing" + fi +done |