generated from nhcarrigan/template
fix: use mid2v3 to handle special characters
Some checks failed
Code Analysis / SonarQube (push) Failing after 46s
Some checks failed
Code Analysis / SonarQube (push) Failing after 46s
This commit is contained in:
parent
00dc40ba47
commit
b191f14a0b
5313
music/songs.json
5313
music/songs.json
File diff suppressed because it is too large
Load Diff
@ -58,6 +58,7 @@
|
||||
<ul>
|
||||
<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://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://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>
|
||||
|
11
songs.sh
11
songs.sh
@ -10,15 +10,8 @@ current=0
|
||||
for file in $(find /home/naomi/music -type f -print0 | tr '\0' '\n'); do
|
||||
current=$((current + 1))
|
||||
echo -ne "Processing $current/$filecount\r"
|
||||
title=$(id3v2 -l "$file" | grep "TIT2" | cut -d ":" -f 2 | sed -e 's/^[[:space:]]*//')
|
||||
artist=$(id3v2 -l "$file" | grep "TPE1" | cut -d ":" -f 2 | sed -e 's/^[[:space:]]*//')
|
||||
|
||||
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
|
||||
title=$(mid3v2 -l "$file" | grep "TIT2\|TT2" | cut -d "=" -f 2)
|
||||
artist=$(mid3v2 -l "$file" | grep "TPE1\|TP1" | cut -d "=" -f 2)
|
||||
if [ -z "$title" ]; then
|
||||
# remove .mp3 from the title
|
||||
title=$(basename "$file" | sed -e 's/\.mp3//g')
|
||||
|
Loading…
x
Reference in New Issue
Block a user