GNOME Bugzilla – Bug 378430
Importing of other player's libraries
Last modified: 2007-05-24 02:11:19 UTC
Hi, the attached patch adds a Banshee.PlayerMigration namespace containing a minimal framework for importing of libraries from other players. Implemented is a Rhythmbox and Amarok importer. The framework implements a IImportSource that will show up in the Import dialog and when selected will show a dialog that allows selection of (found) players for importing. Open issues: - Icon for the IImportSource... Gtk.Stock.About (i.e. the star) is probably not the best thing and only used as a placeholder for now - Always show in the Import dialog or only the first start and then hide it somewhere else if the user wants to import from another player later? Comments and ideas welcome... Bye
Created attachment 77052 [details] [review] playermigration.diff
When trying to import from RB, and I don't have an RB database on this system, the import thread hangs as it crashed: Unhandled Exception: System.IO.FileNotFoundException: File not found. File name: '/home/aaron/.gnome2/rhythmbox/rhythmdb.xml' at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, Boolean detect_encoding_from_bytemarks, Int32 buffer_size) [0x00000] at System.IO.StreamReader..ctor (System.String path) [0x00000] at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string) at Banshee.PlayerMigration.RhythmboxPlayerImport.OnImport () [0x00000] at Banshee.PlayerMigration.PlayerImport+<>c__CompilerGenerated42.<>c__AnonymousMethod134 () [0x00000] at (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()
Created attachment 77800 [details] [review] playermigration.diff Right, after switching to the TreeView I forgot to add some code to check whether we can actually import from a specific PlayerImportSource. This patch only adds the ones that we can import from to the TreeView and if the TreeView is empty shows a message dialog that it couldn't locate a supported library and doesn't show the PlayerImportDialog at all.
Created attachment 77802 [details] [review] playermigration.diff Now use "using" for the user_event to even clean up after something went really wrong.
If this gets committed, I'll merge in my iTunes importer (http://code.google.com/p/banshee-itunes-import-plugin/).
Is there anything to be done before this can be committed to SVN for 0.13?
Created attachment 87763 [details] [review] playermigration.diff Updated for the new directory layout
Created attachment 88259 [details] [review] playermigration.diff
Committed with my GUI and string changes. Thanks Sebastian!
Aaron, would you like me to see about working my iTunes importer into this? I can do it as a weekend project over the summer, I can wait until SoC is done, or I can hand the code to someone else.
Scott, I think that would be good. Whenever you want to do that is fine with me.