diff options
author | Nicholas Piper <nicholas@users.sourceforge.net> | 2006-05-17 08:26:11 +0000 |
---|---|---|
committer | Nicholas Piper <nicholas@users.sourceforge.net> | 2006-05-17 08:26:11 +0000 |
commit | d158f6438ef398b5a900b176bbb338190be7d8ad (patch) | |
tree | 19028f0a4847645d586b6f92aa1c6ffcb65d7c0d | |
parent | 961970ebcf07c9c986958d6e36b31e136c7947b2 (diff) | |
download | libgpod-d158f6438ef398b5a900b176bbb338190be7d8ad.tar.gz libgpod-d158f6438ef398b5a900b176bbb338190be7d8ad.tar.xz libgpod-d158f6438ef398b5a900b176bbb338190be7d8ad.zip |
sw_get_playlist() seems to have also (?) become lost. Maybe I've just lost a ability to use cvs ;-)
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1268 f01d2545-417e-4e96-918e-98f8d0dbbcb6
-rw-r--r-- | bindings/python/gpod.i | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bindings/python/gpod.i b/bindings/python/gpod.i index 23d8092..472f9d9 100644 --- a/bindings/python/gpod.i +++ b/bindings/python/gpod.i @@ -69,6 +69,16 @@ PyObject* sw_get_rule(GList *list, gint index) { return SWIG_NewPointerObj((void*)(position->data), SWIGTYPE_p__SPLRule, 0); } +PyObject* sw_get_playlist(GList *list, gint index) { + GList *position; + if ( (index >= g_list_length(list)) || index < 0 ) { + PyErr_SetString(PyExc_IndexError, "Value out of range"); + return NULL; + } + position = g_list_nth(list, index); + return SWIG_NewPointerObj((void*)(position->data), SWIGTYPE_p__Itdb_Playlist, 0); + } + PyObject* sw_get_list_len(GList *list) { return PyInt_FromLong(g_list_length(list)); } @@ -263,6 +273,7 @@ typedef int gint; PyObject* sw_get_tracks(Itdb_iTunesDB *itdb); PyObject* sw_get_track(GList *list, gint index); PyObject* sw_get_rule(GList *list, gint index); +PyObject* sw_get_playlist(GList *list, gint index); PyObject* sw_get_list_len(GList *list); PyObject* sw_get_playlists(Itdb_iTunesDB *itdb); PyObject* sw_get_playlist_tracks(Itdb_Playlist *pl); |