Wednesday, May 15, 2024
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 6725  / 2 Years ago, wed, october 5, 2022, 2:07:40

I'd like to be able to do this:



$ pwd
/home/$USER/music/ripped_music/Monty_Python-Instant_Record_Collection
$ ls
01.The_Executive_Intro.mp3
...
16.The_Lumberjack_Song.mp3
$ mystery_command_or_script .
$ ls
01.The_Executive_Intro.mp3
...
16.The_Lumberjack_Song.mp3
album_cover.jpg
$


Somewhere in the guts of Rhythmbox, totem, etc. this is being done. I'd like to be able to do it myself.



I don't need help actually writing a script. I'd really just like to know if there's something like CDDB for album covers. (Scraping albumart.org is the current working solution.)


More From » command-line

 Answers
6

glyrc is the CLI program you're looking for. Once you've got it compiled and installed, this script will do what you want



#!/bin/ksh

if [[ $# -eq 0 ]]; then
echo "Usage: $(basename $0) music_file.mp3"
exit 1
fi

FILE="$1"

ALBUM="$( id3v2 --list "$FILE" |sed -n 's/TALB[^:]*: *//p' )"
ARTIST="$( id3v2 --list "$FILE" |sed -n 's/TPE1[^:]*: *//p' )"

glyrc cover --artist "$ARTIST" --album "$ALBUM"


To compile glyrc following the author's directions you must first



sudo apt-get install libsqlite3-dev libcurl3-dev cmake libglib2.0-dev

[#39585] Thursday, October 6, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cugure

Total Points: 188
Total Questions: 110
Total Answers: 103

Location: Dominican Republic
Member since Sun, Sep 4, 2022
2 Years ago
;