Dear Pablo, > there doesn't seem to be a way to preserve positional info (i assume this > happens with all idlists, not only playlists).
This is true. > I haven't delved very deeply in the xmms2 code but i think the > function that generates the query for the infos is not taking into > consideration the CollectionIdlists table which, if i understood > correctly, has the info on positions. Although this tables does indeed store the idlists, it is only synchronized when shutting the server down or when doing a xmmsc_coll_sync... > I can always do a playlist_list_entries and sort the result of the > query_coll_infos based on that, but it's not very nice. Plus i tested > doing that with a ~30k songs playlist and the difference is not deadly > but quite obviously noticeable versus just displaying the result from > coll_query_infos directly. Have you tested with duplicate entries in your playlist? (I think I would get the infos from the daemon sorted by id, so that one can find the metadata using a binary search (if the datastructures in python allow non-sequential access anyway.)) > If this had to be fixed in the xmms2 core and someone could point me > in the right direction i can take a look and see if i can do anything > about it. xmms_collection_query_infos in src/xmms/collection.c creates this list for you. If the CollectionIdlists-table is made to be kept in sync always, it is probably quite easy to create a xmms_idlist_query_infos which gets the appropiate data in the appropiate order in one medialib query. Without doing this, the most straightforward way would be to do a seperate query for every entry in the idlist, in which case the performance would be quite similar to doing several of the python-equivalent of xmmsc_medialib_get_info. > if there's an alternate way of doing this (...) i'd be glad to hear it. Lazy loading would be nice, i.e. only load the metadata for those entries that are currently displayed (if you're making an interactive client anyway). Erik Massop (nesciens) p.s. I think there was a bugreport for this issues, but I cannot seem to find it... -- _______________________________________________ Xmms2-devel mailing list Xmms2-devel@lists.xmms.se http://lists.xmms.se/cgi-bin/mailman/listinfo/xmms2-devel