Quantcast
Channel: Amarok Blog - peterzl
Viewing all articles
Browse latest Browse all 2

GSoC Week 6: Amarok Scripting Interface

0
0
Hey, I have a lot things to demo since we were moving very fast In the past two weeks!

I've added a lot of QtScript API functions, including GUI, Playlist, Collection, Music Engine and Scriptable Service.

Here are some small pieces from the whole cake:

one of the engine signals:

function TrackChanged()
{
print( "Dude! Do something! The track changed!" );
}
Engine.trackChanged.connect( TrackChanged );

Track Meta Info:
var TrackInfo = Amarok.Engine.TrackInfo;
StatusBar.shortMessage( "You are listening to album: " + TrackInfo.Album );

Collection and Playlist Access:
var totalTrack = Amarok.Collection.totalTracks;
Amarok.Playlist.clearPlaylist;

I've almost finished the DBus interface by supporting MPRIS standard ( http://wiki.xmms2.xmms.se/wiki/MPRIS ). Now the script manager could handle script errors, write them to log files and correctly start/stop scripts. A simple demo script and a scriptable service QtScript called "Cool Stream" was released with Amarok Alpha 1.



Everyone loves eye candy, the API implementation and bug fixing are mostly behind the scene. So I decided to make some candy for non-latin character users :-).
I grabbed the charset detector code from Mozilla, merged them into Amarok. Now, the wolf recognizes non-UTF8 tags:



The summer of code project seems always stuck on some building system stuff. The charset detector didn't compatible with cmake 2.4.8, and the Qt bindings generator was needed to be ported from qmake to cmake. ( thanks "compiling king" Ian for helping me :-D )

The SoC project will be ended in one month. And we still have some work to do. Ladies and Gentlemen, let's wait for the finalized script API, and the brand new script manager!

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images