Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

embedart: Resize images only once per album #1028

Closed
offbeatadam opened this issue Oct 22, 2014 · 4 comments
Closed

embedart: Resize images only once per album #1028

offbeatadam opened this issue Oct 22, 2014 · 4 comments
Labels
bitesize feature features we would like to implement

Comments

@offbeatadam
Copy link

I've noticed this a few times now but I updated recently and I don't leave verbose on for multiple albums. Today was the first time I've run it on a few albums individually.

Every time the same thing:

Embedding album art into Duke Ellington & John Coltrane - Duke Ellington & John Coltrane.
artresizer: PIL resizing /Volumes/Music/Library/Duke Ellington & John Coltrane/Duke Ellington & John Coltrane/folder.1.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpJF_JsB.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Duke Ellington & John Coltrane/Duke Ellington & John Coltrane/folder.1.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpQDPQVO.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Duke Ellington & John Coltrane/Duke Ellington & John Coltrane/folder.1.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpW4GKI7.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Duke Ellington & John Coltrane/Duke Ellington & John Coltrane/folder.1.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmp7hiNBo.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Duke Ellington & John Coltrane/Duke Ellington & John Coltrane/folder.1.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmp0ndjXb.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Duke Ellington & John Coltrane/Duke Ellington & John Coltrane/folder.1.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpiLn33e.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Duke Ellington & John Coltrane/Duke Ellington & John Coltrane/folder.1.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmp4gTgXK.jpg

The resized for the album art image is processing it many times. That is to say, for every track, it's converting the same image again and again. It's not a huge task for some images, but if the album art is huge it's a lot of processing and it adds quite a bit of time to imports.

It happened here as well:

Embedding album art into Miles Davis - Kind of Blue.
artresizer: PIL resizing /Volumes/Music/Library/Miles Davis/Kind of Blue/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpPsxykU.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Miles Davis/Kind of Blue/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpuq7F8m.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Miles Davis/Kind of Blue/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmp5ZrBx9.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Miles Davis/Kind of Blue/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpe3JqJP.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Miles Davis/Kind of Blue/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpiQFRAg.jpg

And again here:

Embedding album art into Syd Dale - The Sounds of Syd Dale.
artresizer: PIL resizing /Volumes/Music/Library/Syd Dale/The Sounds of Syd Dale/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpw9q_MK.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Syd Dale/The Sounds of Syd Dale/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpkuVIQc.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Syd Dale/The Sounds of Syd Dale/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmp3mthTy.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Syd Dale/The Sounds of Syd Dale/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpmKhbUK.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Syd Dale/The Sounds of Syd Dale/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmph7XV4l.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Syd Dale/The Sounds of Syd Dale/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpl78w7t.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Syd Dale/The Sounds of Syd Dale/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpLtLqv9.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Syd Dale/The Sounds of Syd Dale/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpz48AeS.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Syd Dale/The Sounds of Syd Dale/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmp1I4D3t.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Syd Dale/The Sounds of Syd Dale/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpKKfry7.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Syd Dale/The Sounds of Syd Dale/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpdlh_8j.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Syd Dale/The Sounds of Syd Dale/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmphIgkrD.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Syd Dale/The Sounds of Syd Dale/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpUQ_hMP.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Syd Dale/The Sounds of Syd Dale/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmp1NxZS5.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Syd Dale/The Sounds of Syd Dale/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpX3vh4d.jpg

Just for added stuff, I'm running: beets version 1.3.8

After updating to 1.3.9:

Embedding album art into Various Artists - Trunk Presents the Super Sounds of Bosworth.
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpvYjRat.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmp1fs1C9.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpQwI6C3.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpVstS0X.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmprPoaXm.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpoTbDuZ.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpysGn4_.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpVd7VqJ.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpMOcvpU.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpdytMQp.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmp48AjLn.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpE53LsX.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpWDWhIE.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpmm2Fwn.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpLd23u9.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmp102aFb.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpV5ATuV.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpvQvWHd.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpBDfaph.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpOMr5NY.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpddn4gm.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpHuV225.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpzjNGS5.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpl0CZgB.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpcXBcI5.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpgA8y4s.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpIkzQnq.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpX2tqf6.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmp090P1d.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpgwDalm.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpjagVJZ.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmp2_Mjnr.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpce8gYD.jpg
Sending event: write
Sending event: after_write
artresizer: PIL resizing /Volumes/Music/Library/Compilations/Trunk Presents the Super Sounds of Bosworth/folder.jpg to /var/folders/87/tsywjpqs505553slxr9rn8nc0000gn/T/tmpgetUj6.jpg
Sending event: write

I don't think this is necessary behavior as the album cover should cover the album, so one conversion should be necessary for copying into all tracks yes?

@sampsyo sampsyo changed the title Album art being processed too many times (every track) embedart: Resize images only once per album Oct 22, 2014
@sampsyo sampsyo added feature features we would like to implement bitesize labels Oct 22, 2014
@sampsyo
Copy link
Member

sampsyo commented Oct 22, 2014

Indeed; it would be better to do the resize only once per album. Shouldn't be hard; contributions would be welcome here.

kerobaros added a commit to kerobaros/beets that referenced this issue Oct 24, 2014
@kerobaros
Copy link
Contributor

Added a possible fix for this into my existing PR, #1033. This is only triggered when embed_album is called, ie. when tagging an entire album at once. If embedart is used to tag multiple tracks from one album, but not the whole album, the image will still be resized each time. Open to ideas on how to fix that edge case.

@offbeatadam
Copy link
Author

I have had a bit of a busy week this week at work. I planned on getting started/taking a look tonight.

  • Adam

On Oct 24, 2014, at 3:06 PM, kerobaros notifications@github.com wrote:

Added a possible fix for this into my existing PR, #1033. This is only triggered when embed_album is called, ie. when tagging an entire album at once. If embedart is used to tag multiple tracks from one album, but not the whole album, the image will still be resized each time. Open to ideas on how to fix that edge case.


Reply to this email directly or view it on GitHub.

@sampsyo
Copy link
Member

sampsyo commented Oct 24, 2014

I actually think that's fine—the most egregious waste here was when embedding for a whole album. Embedding different tracks from the same album separately is less obvious & it's probably okay to leave that un-fixed for simplicity's sake.

sampsyo added a commit that referenced this issue Oct 28, 2014
Re: issue #1028: "embedart: Resize images only once per album
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bitesize feature features we would like to implement
Projects
None yet
Development

No branches or pull requests

3 participants