GNOME Bugzilla – Bug 560970
playlists not synchronized to ipod
Last modified: 2009-06-09 00:14:15 UTC
Please describe the problem: While ipod sync works correctly in copying all my songs and videos to my gen-5 ipod video, playlists aren't ever copied across. When I perform a sync, banshee firsts syncs the music, then the playlists appear on the ipod source for a second, before disappearing as the sync finishes. Running banshee-1 --debug doesn't show any useful information: "[Debug 08:52:07.685] Found DAP support (Banshee.Dap.Ipod.IpodSource) for device IPOD [Info 08:53:10.007] Sync calculated for Music Library: to add: 28 items, remove 1 items; sync_src.cacheid = 237, to_add.cacheid = 245, to_remove.cacheid = 253 Sync calculated for Video Library: to add: 0 items, remove 0 items; sync_src.cacheid = 261, to_add.cacheid = 269, to_remove.cacheid = 343 Sync calculated for Podcasts: to add: 0 items, remove 0 items; sync_src.cacheid = 347, to_add.cacheid = 351, to_remove.cacheid = 359 [Info 08:53:10.011] Syncing Music Library, in main thread? False [Debug 08:53:10.011] deleting items for Music Library - 1 items; to_remove is smartplaylist 21, with cachid 253 [Info 08:53:22.565] Syncing Video Library, in main thread? False [Info 08:53:23.127] Syncing Podcasts, in main thread? False [Info 08:53:58.698] Syncing Music Library, in main thread? False [Info 08:54:07.040] Syncing Video Library, in main thread? False [Info 08:54:07.525] Syncing Podcasts, in main thread? False " However, if i manually create a playlist on the ipod, it works as expected and saves to the device properly. Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
This happens on my 6th Gen IPOD as well - when syncing the music library, there should be an option to sync playlists (create them if they dont exist and/or update them if they do). Also, there should be an option to either sync all playlists or specify the playlists to sync (via a checkbox) - just my suggestions.
this too happens for me with my ipod nano 3g - running banshee 1.4 in ubuntu 8.10 intrepid even when i "manually manage" my ipod and drag and drop the playlist, banshee tells me that the playlist is on the ipod, but in actual fact, its not.
I'm reproducing this problem as well (although the playlists never appear for me under the iPod source, neither some secs).
Same here too for the video ipod (5th gen?)
Severity on this ought to be bumped up to a notch - this completely breaks the notion of Banshee just *working* and syncing automatically ala iTunes. (Please? :)
I can also confirm that this isn't working on my 5th gen iPod. For awhile it had been working pretty consistently (maybe during the 1.3.x series), but it definitely seems to be broken again.
This is strange, they should be getting synced if you're using the Sync button (eg not manually managing the iPod). Can somebody dive and and add some Console.WriteLines to the IpodSource (or other) code to figure out what's happening? One guess: the playlists are being added, but the logic/code that adds the songs from the iPod to the playlists (mirroring the contents in the Library) is failing. This I know (b/c I wrote it): if playlist has zero songs it in, it is deleted from the iPod.
Gabriel, your guess definitely makes sense, because when I have my iPod set to sync automatically, it seems to add all of the playlists near the beginning of the process, but by the time it finishes syncing, they're gone. I wish my C# ability would be a bit higher so I could help out, but it'll still be a few months before I can do anything worthwhile. I'm getting there, though :)
I've (In reply to comment #7) > This is strange, they should be getting synced if you're using the Sync button > (eg not manually managing the iPod). Can somebody dive and and add some > Console.WriteLines to the IpodSource (or other) code to figure out what's > happening? 1st - Michael's experience in comment #8 is right on - the playlists all appear right at the beginning, but then disappear before the sync finishes. 2nd - I've been doing some .NET programming lately and might be up for this. I'll poke at the IpodSource and see if I can find anything obvious. All my .NET programming has been on Windows - I'm a Python person for all my other dev work - anything special I should know for building and running Banshee from source? Thanks for looking at this Gabriel - it's one of the only bugs left in Banshee that really hurts the full "experience". If playlist syncing was as solid as the library sync, I'd be a *very* happy user.
Created attachment 127562 [details] Patch adding debugging to iPod playlist sync code Please apply this to your banshee tarball or svn checkout with patch -p0 < ipod_playlists_debug.patch then rebuild and run with banshee-1 --debug
Created attachment 127563 [details] Patch adding debugging to iPod playlist sync code Please apply this to your banshee tarball or svn checkout with patch -p0 < ipod_playlists_debug.patch then rebuild and run with banshee-1 --debug and reproduce the bug then post the last, relevant bit of the log here
This is probably a bad idea, but you can probably download these two files, stick them in your /usr/lib/banshee-1/Extensions/ folder (or /usr/local/lib/banshee-1/Extensions/ if the first doesn't exist): http://banshee-project.org/~gburt/tmp/Banshee.Dap.Ipod.dll http://banshee-project.org/~gburt/tmp/Banshee.Dap.Ipod.dll.mdb
(In reply to comment #11) > Created an attachment (id=127563) [edit] > Patch adding debugging to iPod playlist sync code > > Please apply this to your banshee tarball or svn checkout with patch -p0 < > ipod_playlists_debug.patch then rebuild and run with banshee-1 --debug and > reproduce the bug then post the last, relevant bit of the log here > Applied the patch to trunk. I start the test: Started banshee (with autogen and make run). First weird thing I found (because I have all up to date): ** (Nereid:5658): WARNING **: Symbol file /home/knocte/Documents/iDocs/Proyectos/Banshee/arbolSVN/trunk_ipod/banshee/bin/ipod-sharp.dll.mdb has incorrect version (expected 50.0, got 39) Ok, now I connect my IPOD: [Debug 16:00:24.104] FSQ Enqueue: file:///media/KNOCPOD [Debug 16:00:34.302] Found DAP support (Banshee.Dap.Ipod.IpodSource) for device KNOCPOD [Info 16:00:34.550] Sync calculated for Music Library: to add: 0 items, remove 7 items; sync_src.cacheid = 79, to_add.cacheid = 87, to_remove.cacheid = 95 Sync calculated for Video Library: to add: 0 items, remove 0 items; sync_src.cacheid = 97, to_add.cacheid = 99, to_remove.cacheid = 107 Sync calculated for Podcasts: to add: 0 items, remove 0 items; sync_src.cacheid = 111, to_add.cacheid = 115, to_remove.cacheid = 123 [Info 16:00:34.552] Syncing Music Library, in main thread? False [Debug 16:00:34.552] deleting items for Music Library - 7 items; to_remove is smartplaylist 9, with cachid 95 [Info 16:00:34.604] Syncing Video Library, in main thread? False [Info 16:00:34.683] Syncing Podcasts, in main thread? False [Info 16:00:34.825] iPod playlists: supported [Info 16:00:34.825] iPod playlists: done syncing [Info 16:00:38.211] iPod playlists: supported [Info 16:00:38.211] iPod playlists: done syncing I add some songs to my music library: [Info 16:01:27.198] Syncing Music Library, in main thread? False [Info 16:01:27.730] Syncing Video Library, in main thread? False [Info 16:01:27.748] Syncing Podcasts, in main thread? False [Debug 16:01:27.780] Importing Media duration: 0.765994s [Info 16:01:27.786] iPod playlists: supported [Info 16:01:27.786] iPod playlists: done syncing I create a playlist of 2 songs: (Nereid:5658): Gtk-WARNING **: A floating object was finalized. This means that someone called g_object_unref() on an object that had only a floating reference; the initial floating reference is not owned by anyone and must be removed with g_object_ref_sink(). I eject the iPOD: [Debug 16:02:22.012] Unmapping DAP source (/org/freedesktop/Hal/devices/volume_uuid_30E9_5C54) (No playlists on my iPod.) I connect it again: [Debug 16:03:23.349] FSQ Enqueue: file:///media/KNOCPOD [Debug 16:03:33.750] Found DAP support (Banshee.Dap.Ipod.IpodSource) for device KNOCPOD (Nereid:5658): Gtk-WARNING **: A floating object was finalized. This means that someone called g_object_unref() on an object that had only a floating reference; the initial floating reference is not owned by anyone and must be removed with g_object_ref_sink(). [Info 16:03:33.982] Sync calculated for Music Library: to add: 7 items, remove 7 items; sync_src.cacheid = 123, to_add.cacheid = 165, to_remove.cacheid = 173 Sync calculated for Video Library: to add: 0 items, remove 0 items; sync_src.cacheid = 175, to_add.cacheid = 177, to_remove.cacheid = 185 Sync calculated for Podcasts: to add: 0 items, remove 0 items; sync_src.cacheid = 189, to_add.cacheid = 193, to_remove.cacheid = 201 [Info 16:03:33.983] Syncing Music Library, in main thread? False [Debug 16:03:33.983] deleting items for Music Library - 7 items; to_remove is smartplaylist 17, with cachid 173 [Info 16:03:34.386] Syncing Video Library, in main thread? False [Info 16:03:34.397] Syncing Podcasts, in main thread? False [Info 16:03:34.477] iPod playlists: supported [Info 16:03:34.477] iPod playlists: done syncing [Info 16:03:38.337] iPod playlists: supported [Info 16:03:38.338] iPod playlists: done syncing Still no playlists shown under "Music" under my iPod source. Hope this helps.
(In reply to comment #13) > Applied the patch to trunk. I start the test: > > Started banshee (with autogen and make run). First weird thing I found (because > I have all up to date): > > > ** (Nereid:5658): WARNING **: Symbol file > /home/knocte/Documents/iDocs/Proyectos/Banshee/arbolSVN/trunk_ipod/banshee/bin/ipod-sharp.dll.mdb > has incorrect version (expected 50.0, got 39) > Nevermind, this is the mdb, not the dll! So I looked more carefully at Gabriel's patch and the log I was getting: > > [Info 16:03:33.983] Syncing Music Library, in main thread? False > [Debug 16:03:33.983] deleting items for Music Library - 7 items; to_remove is > smartplaylist 17, with cachid 173 > [Info 16:03:34.386] Syncing Video Library, in main thread? False > [Info 16:03:34.397] Syncing Podcasts, in main thread? False > [Info 16:03:34.477] iPod playlists: supported > [Info 16:03:34.477] iPod playlists: done syncing > [Info 16:03:38.337] iPod playlists: supported > [Info 16:03:38.338] iPod playlists: done syncing > And what happens is that the var "from" is null, so, the cast was not successful. I added some more logging and it turns out that the "Source child" var is of type *MusicGroupSource*, not *PlaylistSource*. Does that help on finding the problem? If not, I'll keep looking later.
Created attachment 127649 [details] Fix Hugh! Finally squashed the bug! I needed some hours debugging because there are other smaller bugs in corner cases that were affecting also the playlist syncing feature, but I'll file them separately. This patch should fix the general case. Please test! Thanks.
(In reply to comment #15) > Created an attachment (id=127649) [edit] > separately. This patch should fix the general case. Please test! Looking more deeply at the patch, I think it's a bit dangerous for other DAP devices. I'm cooking a better one right now.
Created attachment 127652 [details] [review] More proper fix Ok, this one is better. Can anybody review?
works well so far when applied to r4992.
Thanks Andres, committed.
(In reply to comment #19) > Thanks Andres, committed. Thanks! Shouldn't this be backported to stable? It's an easy fix, and would make some people happy :) (Me included, I want to use banshee-1, not SVN :D )
(In reply to comment #15) > ... because there are other smaller bugs in corner > cases that were affecting also the playlist syncing feature, but I'll file them > separately.... FYI: first bug I filed for one corner case is bug 560970.
(In reply to comment #21) > (In reply to comment #15) > > ... because there are other smaller bugs in corner > > cases that were affecting also the playlist syncing feature, but I'll file them > > separately.... > > FYI: first bug I filed for one corner case is bug 560970. > Oops! I meant to say bug 573683.
For ipod nanos, you should be able to select which playlists you want sync'ed. The entire music library doesn't fit on these devices. If you manage this manually, it doesn't copy the playlists, only the songs. And it should warn you that you don't have enough room on the device for the entire library and have that option be greyed out. The ipod manage window should have Music Library Sync Music Library x Sync Only these Playlists x playlist 1 playlist 2 x playlist 3 Songbird has this. This is the only reason I'm using songbird still.