diff options
author | Nicholas Piper <nicholas@users.sourceforge.net> | 2007-06-28 10:46:59 +0000 |
---|---|---|
committer | Nicholas Piper <nicholas@users.sourceforge.net> | 2007-06-28 10:46:59 +0000 |
commit | 2c8bedec2a67390f20eaffb79dcee1cbcd6b53b4 (patch) | |
tree | 179f9a251c9b265c3078971232e8b4104f4f04e5 | |
parent | daea3b9963920e62c81e3bcb83e056d6ee70637d (diff) | |
download | libgpod-2c8bedec2a67390f20eaffb79dcee1cbcd6b53b4.tar.gz libgpod-2c8bedec2a67390f20eaffb79dcee1cbcd6b53b4.tar.xz libgpod-2c8bedec2a67390f20eaffb79dcee1cbcd6b53b4.zip |
Remove hard coding of _proxied_attributes
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1608 f01d2545-417e-4e96-918e-98f8d0dbbcb6
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | bindings/python/ipod.py | 21 |
2 files changed, 8 insertions, 18 deletions
@@ -1,3 +1,8 @@ +2007-06-28 Nicholas Piper <nicholas at users.sourceforge.net> + + * bindings/python/ipod.py: Remove hard-coding of + Track/Artwork/Album attributes + 2007-06-23 Todd Zullinger <tmzullinger at users.sourceforge.net> * configure.ac: diff --git a/bindings/python/ipod.py b/bindings/python/ipod.py index 2ff0b89..64e7660 100644 --- a/bindings/python/ipod.py +++ b/bindings/python/ipod.py @@ -277,21 +277,7 @@ class Track: # Note we don't free the underlying structure, as it's still used # by the itdb. - _proxied_attributes = ("title","ipod_path","album","artist","genre","filetype", - "comment","category","composer","grouping","description", - "podcasturl","podcastrss","chapterdata","subtitle","id", - "size","tracklen","cd_nr","cds","track_nr","tracks", - "bitrate","samplerate","samplerate_low","year","volume", - "soundcheck","time_added","time_played","time_modified", - "bookmark_time","rating","playcount","playcount2", - "recent_playcount","transferred","BPM","app_rating", - "type1","type2","compilation","starttime","stoptime", - "checked","dbid","drm_userid","visible","filetype_marker", - "artwork_count","artwork_size","samplerate2", "remember_playback_position", - "time_released","has_artwork","flag4", "skip_when_shuffling", - "lyrics_flag","movie_flag","mark_unplayed","samplecount", - "chapterdata_raw","chapterdata_raw_length","artwork", - "usertype") + _proxied_attributes = [k for k in gpod._Itdb_Track.__dict__.keys() if not k.startswith("_")] def __init__(self, filename=None, proxied_track=None, podcast=False, ownerdb=None): @@ -853,7 +839,7 @@ class PhotoAlbum: class Photo: """A photo in an iTunes Photo database.""" - _proxied_attributes = ("id","creation_date","digitized_date","artwork_size") + _proxied_attributes = [k for k in gpod._Itdb_Artwork.__dict__.keys() if not k.startswith("_")] def __init__(self, filename=None, proxied_photo=None, ownerdb=None): @@ -916,8 +902,7 @@ class Photo: class Thumbnail: """A thumbnail in an Photo.""" - _proxied_attributes = ("type","filename","rotation","offset","size","width","height", - "horizontal_padding", "vertical_padding") + _proxied_attributes = [k for k in gpod._Itdb_Thumb.__dict__.keys() if not k.startswith("_")] def __init__(self, proxied_thumbnail=None, ownerphoto=None): """Create a thumbnail object.""" |