GNOME Bugzilla – Bug 637202
libgpod-sharp exception when trying to sync
Last modified: 2010-12-14 18:40:59 UTC
git master as of today, I'm getting this exception when syncing my iPod: [7 Warn 01:22:28.597] Cannot save track to iPod - GLib.GException: No 'F..' directories found in '/media/KNOCPOD/iPod_Control/Music'. (in `libgpod-sharp') at GPod.ITDB.CopyTrackToIPod (GPod.Track track, System.String localPath) [0x00000] in <filename unknown>:0 at Banshee.Dap.AppleDevice.AppleDeviceTrackInfo.CommitToIpod (GPod.ITDB database) [0x003b8] in /home/knocte/banshee/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceTrackInfo.cs:288 at Banshee.Dap.AppleDevice.AppleDeviceSource.PerformSyncThreadCycle () [0x000a2] in /home/knocte/banshee/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs:541 The exception seems to lie because I have this directories: knocte@lenovo:~$ ls /media/KNOCPOD/iPod_Control/Music F02 F08 F26 F29 So I really don't know what is hapenning.
The offending code in the binding is: public bool CopyTrackToIPod(Track track, string localPath) { IntPtr gerror = IntPtr.Zero; bool result = Itdb_iTunesDB.itdb_cp_track_to_ipod(track$ if (gerror != IntPtr.Zero) throw new GException(gerror); return result; } So this seems to be a libgpod issue.
Created attachment 176384 [details] [review] Fix for the problem Credit goes to Alan though, who told me to add this call at device initialization.
Hey guys thanks for committing. Before closing, can you guys check that it doesn't break in any way the synchronization with your devices? I'm a bit worried this didn't have much testing, and today the new release is expected IIRC.
Andés, it's safe. I read the code in libgpod. It is indeed non-destructive, and will just create missing bits.
Hey Alex, a couple nitpicks w/ your committing: 1) Please set the `git commit --author=""` value to the actual patch author and sign-off on the patch w/ -s 2) Keep the first line of your commit msgs short, around 50 chars Also, I'm not sure why this patch is needed. We already call ITDB.InitIpod if we fail to load the database. Andres, did you have a "iPod database could be loaded, creating a new one" log message in your log?
This was from F## directories not existing. libgpod expects the full directory structure to already exist, it doesn't create it dynamically. And as for the patch, it wasn't really the patch- you'll note there's a small difference in them.
(In reply to comment #5) > Also, I'm not sure why this patch is needed. We already call ITDB.InitIpod if > we fail to load the database. I guess that this means that in my case the database was being loaded successfully, but at the moment of the transfer of the songs the directory structure was not populated correctly. So I think the patch is still useful. > Andres, did you have a "iPod database could be > loaded, creating a new one" log message in your log? I guess you mean "couldn't" instead of "could". No, I think I didn't get that.