Bug 213376

Summary: `Amarok.Engine.currentTrack().imageURL = url` has no effect in script console
Product: [Applications] amarok Reporter: Michael Liddle <michael>
Component: Tools/Script ManagerAssignee: Amarok Developers <amarok-bugs-dist>
Status: REPORTED ---    
Severity: wishlist CC: daniel.dumitrache
Priority: NOR    
Version: 2.2.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Michael Liddle 2009-11-06 07:54:41 UTC
Version:           2.2.0 (using 4.3.1 (KDE 4.3.1) "release 183", KDE:KDE4:Factory:Desktop / openSUSE_11.0)
Compiler:          gcc
OS:                Linux (i686) release 2.6.25.20-0.5-default

The following script illustrates the problem. Artist and rating (and other tags/metadata) can be set, but imageUrl cannot. Judging be scriptengine/MetaTypeExporter.* this is intended to be possible.

(NOTE: you should probably enter an existing image URL in the setting section half way down)

(NOTE 2: I haven't actually tested all types of metadata that have set* methods in scriptengine/MetaTypeExporter.*, but artist is from the tag, and rating from the database (one using the GET_TRACK_EC macro and one using GET_TRACK), so presume that its not a problem with the macros per se)

-- Start test script: --------------------

// Save old tags:
artist = Amarok.Engine.currentTrack().artist;
rating = Amarok.Engine.currentTrack().rating;
imageUrl = Amarok.Engine.currentTrack().imageUrl;

// Tell me the old ones:
Amarok.alert(artist + "\n" + rating + "\n" + imageUrl);

// Set some new ones:
Amarok.Engine.currentTrack().artist = "test artist"
Amarok.Engine.currentTrack().rating = 2
Amarok.Engine.currentTrack().imageUrl = "file:///home/mike/Music/Albert_King/Stax_Profiles/test.jpg"

// Tell me the new ones:
Amarok.alert(Amarok.Engine.currentTrack().artist + "\n" + Amarok.Engine.currentTrack().rating + "\n" + Amarok.Engine.currentTrack().imageUrl);

// Restore the old ones:
Amarok.Engine.currentTrack().artist = artist
Amarok.Engine.currentTrack().rating = rating
Amarok.Engine.currentTrack().imageUrl = imageUrl

-- End test script: --------------------
Comment 1 Myriam Schweingruber 2009-11-06 10:05:22 UTC
Yes, that definitely needs work. Not a bug but simply not implemented.