diff options
| author | nicholas <nicholas@f01d2545-417e-4e96-918e-98f8d0dbbcb6> | 2007-08-07 22:48:06 +0000 |
|---|---|---|
| committer | nicholas <nicholas@f01d2545-417e-4e96-918e-98f8d0dbbcb6> | 2007-08-07 22:48:06 +0000 |
| commit | 637a1347ad540ca74c627620fdabf6dad0369d9c (patch) | |
| tree | b5514079171346a5314ed80eb95e944b2f8f48c2 /bindings/python/ipod.py | |
| parent | 59eb462ad886609680547e61ea0771e056758d53 (diff) | |
Try to deal with typestamps in a sane way in the Python bindings
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1672 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'bindings/python/ipod.py')
| -rw-r--r-- | bindings/python/ipod.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bindings/python/ipod.py b/bindings/python/ipod.py index c287171..20fd510 100644 --- a/bindings/python/ipod.py +++ b/bindings/python/ipod.py @@ -461,7 +461,10 @@ class Track: if item == "userdata": return gpod.sw_get_track_userdata(self._track) elif item in self._proxied_attributes: - return getattr(self._track, item) + if item.startswith("time_"): + return datetime.datetime.fromtimestamp(getattr(self._track, item)) + else: + return getattr(self._track, item) else: raise KeyError('No such key: %s' % item) |
