Summary: | Access the image cover from script API | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Simon ESNEAULT <simon.esneault> |
Component: | Tools/Script Manager | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | peterzhoulei, simon.esneault, simon |
Priority: | NOR | ||
Version: | 2.0-SVN | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
(not exactly) patch for the file scriptengine/MetaTypeExporter.h
(not exactly) patch for the file scriptengine/MetaTypeExporter.cpp Patch for retrieving cover url from script Patch for retrieving cover url from script |
Description
Simon ESNEAULT
2009-01-05 19:29:11 UTC
Created attachment 29936 [details]
(not exactly) patch for the file scriptengine/MetaTypeExporter.h
Created attachment 29937 [details]
(not exactly) patch for the file scriptengine/MetaTypeExporter.cpp
Here is a patch, with this, we can access the current cover url using : Amarok.Engine.currentTrack().imageUrl; And we should be able able to change the cover of the current image using Amarok.Engine.currentTrack().imageUrl.setImageUrl("/the/new/url"); Read the cover url worls fine but not writing, can someone have a look ? If we can find a way, it will be a read only parameter :o) Created attachment 30067 [details]
Patch for retrieving cover url from script
Created attachment 30068 [details]
Patch for retrieving cover url from script
SVN commit 908640 by seb: Cover art can get/set from the script API. BUG: 179732 M +2 -0 ChangeLog M +13 -0 src/scriptengine/MetaTypeExporter.cpp M +4 -2 src/scriptengine/MetaTypeExporter.h WebSVN link: http://websvn.kde.org/?view=rev&revision=908640 Could someone please remember to update our Wiki with the API information, once 2.1 gets released? Thanks :) Setting the cover image through Amarok.Engine.currentTrack().imageUrl = "/the/url/image.jpg"; seems to work for some collection types, though the "current track information" widget seems to not update the newly set image (any hints on how to address this?). For setting images also for streamed music, I've had some success changing the "image" method and adding setImage, hasImage methods to meta/stream/Stream_p.h file. If this seems a sensible approach, let me know and I'll post a patch for this as well. |