Last active
June 6, 2026 06:39
-
-
Save cletusw/2680d8c8d8866d1760523e0d3b63b321 to your computer and use it in GitHub Desktop.
Re-imports files imported without an album so that can be fixed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FILE=$(ls /music/Non-Album/ | head -n 1) && \ | |
| TITLE=$(basename "$FILE" | sed 's/\.[^.]*$//' | cut -d'-' -f2- | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') && \ | |
| echo "=== Processing Title: $TITLE ===" && \ | |
| IFS='|' read -r ID FILE_PATH <<< "$(beet ls -f '$id|$path' "$TITLE" | head -n 1)" && \ | |
| [ -n "$FILE_PATH" ] && \ | |
| beet remove "id:$ID" && \ | |
| beet import -t "$FILE_PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment