A couple of ideas for contributing to Banshee

Jono’s blog post about Banshee Kickin’ it has some interesting comments that I’d like to address, specifically regarding the new track editor and Internet Radio in the recently released Banshee 1.4.

The Track Editor

The new track editor is fully extensible. This means you can add your own pages to the dialog and get full first class editing support. All of the current pages are implemented in the exact same way you would need to write an extension page.

What I would like to see are a few pages contributed at least initially by the community:

  • Creative Commons metadata/license support
    A lot of work on this in the past had been done in the past, but never to a quality or completeness I was comfortable with for including in core. This support could either be an extension page to the editor, or an extension that interacts with existing pages/fields, like the copyright field.

    Additionally, the extension could make a track column and query field available, so you could easily search for and view Creative Commons music. This was a pain to do in legacy Banshee, but it’s a few lines of code in 1.x.

  • Music Brainz
    A page that allows for figuring out missing metadata, and also submitting track information back to MusicBrainz. Maybe it could also generate PUIDs. We have a complete C# implementation of the MusicBrainz web API (no native library needed) thanks to Scott Peterson, and it’s used in other areas in Banshee. This really should not be that complicated to do.

I wrote a quick example today on how to extend the track editor. The example implements a History Page which allows you to change the play count, skip count, and last played date to arbitrary values. More could be done here, and in fact I’d like to make this a core page anyway.

Banshee History Extension to the Track Editor

  • Download the example
  • Extract, change directories, and make run
  • Play with the code!
  • You need Banshee 1.4 and Mono 1.9 or better (I opted to use C# 3.0 in the example)

Internet Radio

We made a decision early on in the 1.x series to provide very strong Last.FM support. We’re fairly resource constrained, so this meant making traditional Internet Radio something of a second class citizen. In fact, I made a choice to not ship any default radio stations because really I should not be the one picking stations, and so many of them fall offline in the life cycle of a distribution iteration that supporting this is silly.

However, I made sure all the underlying pieces for good Internet Radio support were in place. We have a station editor, stream metadata is reflected in the UI so when playing a stream you can see “track changes” which in turn can trigger cover art, and the RadioTrackInfo object even handles fetching and parsing of remote station playlsits. We support M3U, PLS, ASX, and XSPF formats, and possibly some others I am forgetting.

The Radio source that ships by default is a bit bare in terms of UI, but this was intentional. You can add new stations and manage them, but we really need something like StreamTuner or Shoutcast, like Jono says, that builds on the Internet Radio core features. Implementing new sources is fairly straightforward. You can even extend the existing Radio source to build on it.

Implementing this would be a great standalone extension that I would love to ultimately roll back into core, maybe for 1.6 if an enthusiastic contributor steps up to the plate.

So what are you waiting for?

Join the community of enthusiastic Banshee contributors and write something great today. We have a large and functional API, lots of features to build on, and everything is designed around extensibility.

Such a large API can be daunting to learn, yes, but Banshee is also organized very well. We also have API documentation for Monodoc, and probably the best way to learn about Banshee’s internals is to just read the source to the extensions we ship in core. All the great features in Banshee are just extensions!

Lastly, don’t hesitate to stop by on the IRC channel asking for help!

This entry was posted in uncategorized and tagged , , . Bookmark the permalink.

15 Responses to A couple of ideas for contributing to Banshee

  1. Shaun says:

    Aaron, what you guys have been doing is just awesome. The extensions framework is no doubt incredibly powerful, but it’s very daunting to figure out. Maybe now that 1.4 is out the door (hooray!), you or one of the other core devs could set aside some time to write a hands-on tutorial for writing extensions.

  2. Ethan Osten says:

    I’d love to contribute – in fact, I have initial code to enable Atom feeds in Migo – but I can’t run Banshee until bugs 547218 and 539683 are fixed.

  3. John Millikin says:

    One major problem I’ve run into while contributing to Banshee is TagLib#; it is missing some significant support for features like sort names or Vorbis cover art. This is compounded by its apparent utter lack of a bug tracker and glacial release cycle.

    Do you know if there are any plans to migrate Banshee’s metadata processing to a more maintained library? GStreamer seems a logical choice, since it’s already used for playback.

  4. Corey says:

    1.4 is amazing. Banshee one of the few programs I use that is better than any windows counterpart I’ve tried or used in the past. 1.4 feels quite a bit more stable than 1.0 and has a fair bit more polish than 1.2. Banshee is one of the reasons I’m still using linux for my day to day computing. I’m a big fan of Last.fm too and I love that integration. I do understand why some folks would prefer more robust web radio support, but even if shoutcast or what not was included I would stick to my custom last.fm stations.

    MusicBrainz on the other hand is something I miss from my windows days. I’ve messed around with their linux clients but they are meh at best. MusicBrainz in banshee would blow my mind and help me Get My Damn Tags Right!

  5. Livio says:

    Waiting for crossfade ;) .

  6. murdos says:

    Just to a note to say that Scott has moved musicbrainz-sharp to Musicbrainz svn repository

  7. lariq says:

    John Millikin: Gst is not really suited yet for using it for this purpose. At this time, it works well for getting metadata from a currently played title, not for collecting metadata from a complete library.

  8. James says:

    Thank you for the history tab – now I can merge two identical tracks without losing the number of plays, without having to mess around with sqlite. Thanks again!

  9. @Shaun: now that 1.4 is out the door, we’ll be much more conscious of the API. The aim is to not break existing API for the 1.4 series, do as little breaking as possible for 1.6, and then just build on what we have. With that in mind, I am hoping to start producing tutorials and examples on different ways to extend Banshee. We’ll be migrating the web site to a new CMS soon that will allow for easier content like this to be written.

    @Ethan: we’ll take a look.

    @John: The maintainer of TagLib# appears to have stopped working on the project. We’ve tried unsuccessfully to work with him on getting a few patches rolled into a release. We told him we would be willing to maintain the project if he is unable. Alas, we have yet to hear from him, so my intentions are to fold TagLib# under the Banshee umbrella.

    The source code will still be maintained under Mono SVN, but we’ll set up new project infrastructure (web site, bug tracker, etc) and releases will be done by us, hosted at download.banshee-project.org.

    Finally, TagLibg# is a great code base. It’s very fast, and it covers the big container formats. GStreamer is not the right library to use as a general purpose tagging library for two reasons:

    1) It’s incredibly expensive. Having to set up and tear down a full multimedia pipeline for reading and writing tags takes a long time. This has to be done on each song.
    2) It’s plugin dependent, so many of the more obscure or otherwise encumbered container formats are not implemented in -base or -good modules.

    We do use GStreamer for reading tags from a playing pipeline, but it’s just not the right tool for general purpose tagging. TagLib# is, and we will devote more energy to that project now.

  10. I worked on Banshee Creative Commons support a few years ago. Legacy Banshee was still brand new and it’s plugin infrastructure was in it’s infancy, causing the integration to be hacky at best. It was clear that Creative Commons support would be best served as a plugin but it was not possible at the time. Like Aaron said:

    … the extension could make a track column and query field available, so you could easily search for and view Creative Commons music. This was a pain to do in legacy Banshee, but it’s a few lines of code in 1.x.

    Banshee has since made leaps and bounds in the plugin support and I think Creative Commons support would be only a few small steps away. The code and progress is documented here:
    http://wiki.creativecommons.org/CcBanshee

    Feel free to contact me with questions or anything if you want to play around with it.

  11. John Millikin says:

    @Aaron: Very excited to hear that, looking forward to improving the available metadata extraction in Banshee.

    @lariq: It seems to have worked well enough for Rhythmbox, though since I’ve not poked too deeply into Banshee perhaps there are design decisions that limit GST’s use.

  12. jonathan says:

    @Aaron: last time I did any kind of comparison, banshee’s import process was not significantly faster than rhythmbox’s (using gstreamer). This was a couple of years ago, so things may have changed.

    The set of GStreamer plugins you need to extract metadata from something is the same set you need to play it. One of the main reasons I’m not really interested in replacing rhythmbox’s extraction code with something taglib-like is that it ensures that if we can extract metadata from something, we can also play it, and it we can import any type of file gstreamer can play. I guess that’s not much of a selling point if you need to consider other media frameworks for playback, though.

  13. Michael Martin says:

    History editor! This is really going to help me complete my migration from iTunes. I obsess over silly things like play counts, and without an import plugin for iTunes, this has been fairly rough. I used the old import plugin with 0.13 and then upgraded the database, but the importer missed about 500 songs.

    I wish I knew more (read: anything) about development so that I could help out. Until I learn me some codes, I guess I’ll just keep contributing by reporting bugs. Banshee 1.4 is pretty amazing – thanks for all the hard work.

  14. Livio says:

    I forgot. Wiki-integration for artist, song and album info and lyrics :] .

  15. Alex says:

    Hi there,

    With regards to music brainz being included in Banshee. If you know the track name that is almost trivial, but amarok has feature that just takes any old track and queries music brainz for the metadata, which I found very useful. So I was looking to try and write similar module for Banshee, as it seems to lack this right now.

    However, in order to retrieve data for any track music brainz uses PUID which is proprietry, but can be generated from their libtunepimp library. The only thing is the library is written in C not C#. So I thought I ask what would banshee dev community think of using C libraries in C# code. I am sure there is a way of doing it, but it probably is quiet hairy and not very desirable. On the other hand there is no C# bindings yet.

    Alex

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>