fix: use mid2v3 to handle special characters
Some checks failed
Code Analysis / SonarQube (push) Failing after 46s

This commit is contained in:
Naomi Carrigan 2025-03-25 01:01:16 -07:00
parent 00dc40ba47
commit b191f14a0b
Signed by: naomi
SSH Key Fingerprint: SHA256:rca1iUI2OhAM6n4FIUaFcZcicmri0jgocqKiTTAfrt8
3 changed files with 5004 additions and 321 deletions

File diff suppressed because it is too large Load Diff

View File

@ -58,6 +58,7 @@
<ul> <ul>
<li><a href="https://analytics.nhcarrigan.com" target="_blank"><code>analytics</code> - Analytics</a></li> <li><a href="https://analytics.nhcarrigan.com" target="_blank"><code>analytics</code> - Analytics</a></li>
<li><a href="https://blog.nhcarrigan.com" target="_blank"><code>blog</code> - Our Blog</a></li> <li><a href="https://blog.nhcarrigan.com" target="_blank"><code>blog</code> - Our Blog</a></li>
<li><a href="https://books.nhcarrigan.com" target="_blank"><code>books</code> - Naomi's E-Book Library</a></li>
<li><a href="https://chat.nhcarrigan.com" target="_blank"><code>chat</code> - Social Media Landing Page</a></li> <li><a href="https://chat.nhcarrigan.com" target="_blank"><code>chat</code> - Social Media Landing Page</a></li>
<li><a href="https://cloud.nhcarrigan.com" target="_blank"><code>cloud</code> - NextCloud</a></li> <li><a href="https://cloud.nhcarrigan.com" target="_blank"><code>cloud</code> - NextCloud</a></li>
<li><a href="https://deepgram.nhcarrigan.com" target="_blank"><code>deepgram</code> - Deepgram Weekly Standup</a></li> <li><a href="https://deepgram.nhcarrigan.com" target="_blank"><code>deepgram</code> - Deepgram Weekly Standup</a></li>

View File

@ -10,15 +10,8 @@ current=0
for file in $(find /home/naomi/music -type f -print0 | tr '\0' '\n'); do for file in $(find /home/naomi/music -type f -print0 | tr '\0' '\n'); do
current=$((current + 1)) current=$((current + 1))
echo -ne "Processing $current/$filecount\r" echo -ne "Processing $current/$filecount\r"
title=$(id3v2 -l "$file" | grep "TIT2" | cut -d ":" -f 2 | sed -e 's/^[[:space:]]*//') title=$(mid3v2 -l "$file" | grep "TIT2\|TT2" | cut -d "=" -f 2)
artist=$(id3v2 -l "$file" | grep "TPE1" | cut -d ":" -f 2 | sed -e 's/^[[:space:]]*//') artist=$(mid3v2 -l "$file" | grep "TPE1\|TP1" | cut -d "=" -f 2)
if [ -z "$title" ]; then
title=$(id3v2 -l "$file" | grep "TT2" | cut -d ":" -f 2 | sed -e 's/^[[:space:]]*//')
fi
if [ -z "$artist" ]; then
artist=$(id3v2 -l "$file" | grep "TP1" | cut -d ":" -f 2 | sed -e 's/^[[:space:]]*//')
fi
if [ -z "$title" ]; then if [ -z "$title" ]; then
# remove .mp3 from the title # remove .mp3 from the title
title=$(basename "$file" | sed -e 's/\.mp3//g') title=$(basename "$file" | sed -e 's/\.mp3//g')