google-code-export / beets

Automatically exported from code.google.com/p/beets
MIT License
0 stars 0 forks source link

embedart does not allow using the full path as a search query #381

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What's the problem? How can I reproduce it?

nick@uitsmijter:/usr/music/David Bowie/Best of Bowie % beet extractart "$PWD"
Extracting album art from: David Bowie - Let's Dance
To: /usr/music/David Bowie/Best of Bowie/cover.png
nick@uitsmijter:/usr/music/David Bowie/Best of Bowie % convert cover.png 
cover.jpg
nick@uitsmijter:/usr/music/David Bowie/Best of Bowie % beet embedart cover.jpg 
"$PWD"
No album matches query.
nick@uitsmijter:/usr/music/David Bowie/Best of Bowie % beet embedart cover.jpg 
David Bowie best of bowie
Embedding album art into David Bowie - Best of Bowie.

Extractart and list both work with a path, but embedart doesn't, which makes it 
impossible to automate this way of replacing PNG's with JPG's.

Original issue reported on code.google.com by nick.hi...@gmail.com on 4 May 2012 at 7:44

GoogleCodeExporter commented 9 years ago
This is because, while extractart matches individual items, embedart matches 
full albums to avoid partially setting album art. (And albums can't currently 
be queried by path.) You're right that this incongruity is confusing.

Original comment by adrian.sampson on 4 May 2012 at 10:59

GoogleCodeExporter commented 9 years ago
Makes sense. If you document this behaviour I'll accept that as a fix. For 
anyone interested, you can resolve that in many cases with the following 
statement shell script segment:

cd <albumdir>
beet extractart "$PWD"
convert cover.png cover.jpg
beet embedart cover.jpg $(echo $PWD | sed -e 's/\/usr\/music//' -e 's/\// /g' 
-e 's/CD.//')

/usr/music is my prefix, and CD[0-9] is a common directory postfix. It doesn't 
work on dirs with quotes in them. 

It was a lot faster to do it this semi-manual way instead of the long way 
through Mp3tag.exe using Wine on Mac OS X over Samba (seconds, instead of 
10+minutes).

Thanks

Original comment by nick.hi...@gmail.com on 5 May 2012 at 6:29

GoogleCodeExporter commented 9 years ago
I'm thinking of making both commands work on items by default and albums with 
the -a switch (like basically every other command in beets). The idea of 
forcing you to mbid an album at a time is probably more trouble than it's worth.

I'd also like to provide separate commands (or a flag) to embed and extract and 
album's current, external-file art rather than an arbitrary path.

Original comment by adrian.sampson on 5 May 2012 at 10:16

untitaker commented 9 years ago

Do not comment here, but on sampsyo/beets#159