summaryrefslogtreecommitdiffstats
path: root/bindings
diff options
context:
space:
mode:
authorTodd Zullinger <tmzullinger@users.sourceforge.net>2007-04-16 04:36:33 +0000
committerTodd Zullinger <tmzullinger@users.sourceforge.net>2007-04-16 04:36:33 +0000
commit0a8bf8b3ac053452aab77d6842b4f7ae475419e4 (patch)
tree0945ac33e28e5abd5928f2f8bd730f3eb3aa818f /bindings
parentfc0b03fb91393e8875aabd43982d0c4d9463276f (diff)
downloadlibgpod-tmz-0a8bf8b3ac053452aab77d6842b4f7ae475419e4.tar.gz
libgpod-tmz-0a8bf8b3ac053452aab77d6842b4f7ae475419e4.tar.xz
libgpod-tmz-0a8bf8b3ac053452aab77d6842b4f7ae475419e4.zip
put down the pipe and commit something that should actually work...
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1416 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'bindings')
-rw-r--r--bindings/python/ipod.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bindings/python/ipod.py b/bindings/python/ipod.py
index 03bf4c9..2ff0b89 100644
--- a/bindings/python/ipod.py
+++ b/bindings/python/ipod.py
@@ -385,7 +385,8 @@ class Track:
def copy_to_ipod(self):
"""Copy the track to the iPod."""
self['userdata']['sha1_hash'] = gtkpod.sha1_hash(self._userdata_into_default_locale('filename'))
- if not gpod.itdb_get_mountpoint(self._track.itdb):
+ mp = gpod.itdb_get_mountpoint(self._track.itdb)
+ if not mp:
return False
if gpod.itdb_cp_track_to_ipod(self._track,
self._userdata_into_default_locale('filename'),
@@ -393,8 +394,9 @@ class Track:
raise TrackException('Unable to copy %s to iPod as %s' % (
self._userdata_into_default_locale('filename'),
self))
+ fname = self.ipod_filename().replace(mp, '').replace(os.path.sep, ':')
+ self['userdata']['filename_ipod'] = fname
self['userdata']['transferred'] = 1
- self['userdata']['filename_ipod'] = self._track['ipod_path']
return True
def ipod_filename(self):