After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 378430 - Importing of other player's libraries
Importing of other player's libraries
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: general
git master
Other All
: Normal enhancement
: 2.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-11-23 09:29 UTC by Sebastian Dröge (slomo)
Modified: 2007-05-24 02:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
playermigration.diff (29.17 KB, patch)
2006-11-23 09:29 UTC, Sebastian Dröge (slomo)
needs-work Details | Review
playermigration.diff (29.82 KB, patch)
2006-12-06 10:13 UTC, Sebastian Dröge (slomo)
none Details | Review
playermigration.diff (29.84 KB, patch)
2006-12-06 10:21 UTC, Sebastian Dröge (slomo)
none Details | Review
playermigration.diff (30.23 KB, patch)
2007-05-08 00:50 UTC, Sebastian Dröge (slomo)
none Details | Review
playermigration.diff (32.60 KB, patch)
2007-05-16 05:27 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2006-11-23 09:29:02 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
Comment 1 Sebastian Dröge (slomo) 2006-11-23 09:29:42 UTC
Created attachment 77052 [details] [review]
playermigration.diff
Comment 2 Aaron Bockover 2006-12-06 02:45:11 UTC
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 ()
Comment 3 Sebastian Dröge (slomo) 2006-12-06 10:13:34 UTC
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.
Comment 4 Sebastian Dröge (slomo) 2006-12-06 10:21:16 UTC
Created attachment 77802 [details] [review]
playermigration.diff

Now use "using" for the user_event to even clean up after something went really wrong.
Comment 5 Scott Peterson 2007-03-20 20:18:47 UTC
If this gets committed, I'll merge in my iTunes importer (http://code.google.com/p/banshee-itunes-import-plugin/).
Comment 6 Sebastian Dröge (slomo) 2007-04-16 19:12:18 UTC
Is there anything to be done before this can be committed to SVN for 0.13?
Comment 7 Sebastian Dröge (slomo) 2007-05-08 00:50:05 UTC
Created attachment 87763 [details] [review]
playermigration.diff

Updated for the new directory layout
Comment 8 Sebastian Dröge (slomo) 2007-05-16 05:27:20 UTC
Created attachment 88259 [details] [review]
playermigration.diff
Comment 9 Aaron Bockover 2007-05-22 23:02:08 UTC
Committed with my GUI and string changes. Thanks Sebastian!
Comment 10 Scott Peterson 2007-05-22 23:09:14 UTC
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.
Comment 11 Aaron Bockover 2007-05-24 02:11:19 UTC
Scott, I think that would be good. Whenever you want to do that is fine with me.