From ce0fd67bd3d0497eb71a752fe12a2c89fde6cad3 Mon Sep 17 00:00:00 2001 From: Nicholas Piper Date: Tue, 23 May 2006 11:25:07 +0000 Subject: Fix some Playlist handling - len(), creating without kwargs. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1274 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- bindings/python/ipod.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bindings/python/ipod.py') diff --git a/bindings/python/ipod.py b/bindings/python/ipod.py index 4776d2a..25dc463 100644 --- a/bindings/python/ipod.py +++ b/bindings/python/ipod.py @@ -124,8 +124,8 @@ class Database: def smart_update(self): gpod.itdb_spl_update_all(self._itdb) - def new_Playlist(self,**kwargs): - return Playlist(self, **kwargs) + def new_Playlist(self,*args,**kwargs): + return Playlist(self, *args,**kwargs) def new_Track(self,**kwargs): track = Track(**kwargs) @@ -329,7 +329,7 @@ class _Playlists: self._db = db def __len__(self): - return gpod.sw_get_list_len(gpod.sw_get_playlists(self._itdb)) + return gpod.sw_get_list_len(self._db._itdb.playlists) def __nonzero__(self): return True @@ -385,8 +385,8 @@ class _Playlists: raise KeyError("Playlist with number %s not found." % repr(number)) class Playlist: - def __init__(self, parent_db, proxied_playlist=None, - title="New Playlist", smart=False, pos=-1): + def __init__(self, parent_db, title="New Playlist", + smart=False, pos=-1, proxied_playlist=None): self._db = parent_db if proxied_playlist: self._pl = proxied_playlist -- cgit