On Tuesday 14 November 2006 22:08, EV wrote: > Keith Bennett added the latest playlist code last June-July but, > AFAIK, no one (apart from Keith) has thoroughly tested it so far. > I gess these functions are omited from lkarma.h by design, but > I'm not sure and Keith seems to have disappeared from this list > ... :(.
There seem to be different ways of adding/removing tracks from a playlist. For the code I've written, the easiest way is to clear the playlist and re-add the tracks in the correct order. As it doesn't actually write to the device until you do lk_playlist_write, this is fast enough. (Sequence of events is : get existing/create new playlist with lk_playlist_create or lk_playlist_fid_read; set name with lk_playlist_set_name; clear existing tracks with lk_playlist_clear; add each track in turn with lk_playlist_append; write the playlist to the device with lk_playlist_write). I've added the 4 functions I mentioned to my local lkarma.h and the Amarok playlist handling works perfectly (as far as I've tested it). Andy ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-karma-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-karma-devel
