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 623828 - eMusic: add store integration
eMusic: add store integration
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: Other Extensions
unspecified
Other Linux
: Normal enhancement
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-08 12:03 UTC by Will Thompson
Modified: 2011-04-08 17:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mime-info file defining application/x-emusic for *.emx (260 bytes, text/plain)
2010-07-08 12:03 UTC, Will Thompson
  Details
16x16 icon (680 bytes, image/png)
2011-03-15 16:09 UTC, Gabriel Burt
  Details
Add an eMusic web store pane. (14.49 KB, patch)
2011-03-21 00:02 UTC, Will Thompson
committed Details | Review
eMusic Store: Add a Signout link. (3.38 KB, patch)
2011-03-21 00:02 UTC, Will Thompson
committed Details | Review
Amazon: fix signed-in detection for UK store. (1.08 KB, patch)
2011-03-21 00:02 UTC, Will Thompson
committed Details | Review
Add MIME type for eMusic's .emx files. (1.99 KB, patch)
2011-03-21 00:15 UTC, Will Thompson
committed Details | Review
Enable eMusic downloader extension by default. (1.14 KB, patch)
2011-03-21 00:15 UTC, Will Thompson
committed Details | Review

Description Will Thompson 2010-07-08 12:03:49 UTC
Created attachment 165470 [details]
mime-info file defining application/x-emusic for *.emx

Eitan's eMusic downloader plugin is very handy! It'd be even nicer if the .emx files were associated with Banshee properly.

AFAICT, this involves adding a file to $prefix/share/mime/packages describing the application/x-emusic MIME type (a subclass of application/xml; I've attached the one I've tested with), and then including application/x-emusic to data/desktop-files/banshee-1.desktop.mime.

I've not actually gone to the trouble of poking at the Banshee build system to arrange to install the former (and run update-mime-info on $prefix/share/mime, but I think that's the distro's job) so I don't have a patch attached. Also I haven't defined an icon for .emx files. I guess it should follow whatever icon was defined for Amazon's equivalent?
Comment 1 Gabriel Burt 2010-07-13 19:07:19 UTC
Yeah, do it like the amz files.  Thanks!  Please attach patch in `git format-patch` format.
Comment 2 Kurtis Sawtell 2010-08-08 20:34:35 UTC
I'm a little confused by this,Will. If i add the attachment to /usr/share/mime/packages. .emx files will be associated with banshee? I'm lost at the data/desktop-files/banshee-1.desktop.mime part.

at the moment, when i'm trying to open an .emx file with banshee nothing happens. I have to manually import everything.

can i get a step by step on how to resolve this?
Comment 3 Will Thompson 2011-03-13 15:29:58 UTC
I actually chose a slightly different approach, and wrote an Amazon store-style plugin for eMusic: http://cgit.freedesktop.org/~wjt/banshee/commit/?h=emusic-store


In the process, I found that the MIME type actually used by eMusic is "application/vnd.emusic-emusic_list". I notice that there's a tiny command-line app for processing .amz files; I guess something similar could work for .emx files.
Comment 4 Gabriel Burt 2011-03-14 16:58:32 UTC
With Will's consent, I've asked the GNOME Foundation Board to create an affiliate account; it's in progress.
Comment 5 Gabriel Burt 2011-03-14 21:47:46 UTC
Some comments on the patch:

1) Can you change the addin URL to http://banshee.fm since it will be part of Banshee itself?

2) I think name="eMusic Store" is better than "eMusic Source"

3) Browse, search, and purchase music from eMusic => music and audiobooks

4) Add a System.Uri.EscapeDataString (query) to the search method

5) I've added a banshee.fm redirect, please use it:
"http://integrated-services.banshee.fm/emusic/home/"
"http://integrated-services.banshee.fm/emusic/search/" + Uri.EscapeDataString (query)

6) Add the .emx mimetype(s) to data/desktop-files/banshee.desktop.mime

7) We need the sign-out support.  You can probably figure out which cookie determines if a user is signed in by visiting emusic.com, checking what cookies are there, then sign in, and see which ones have been changed/added.
Comment 6 Gabriel Burt 2011-03-14 21:48:03 UTC
I think Andreas is working on an icon.
Comment 7 Gabriel Burt 2011-03-15 16:09:01 UTC
Created attachment 183440 [details]
16x16 icon
Comment 8 Will Thompson 2011-03-21 00:02:01 UTC
Created attachment 183881 [details] [review]
Add an eMusic web store pane.

This is basically copy-pasta from the Amazon store, and uses the
existing eMusic downloader plugin. It's lacking an icon, and doesn't
detect being logged in or out.
Comment 9 Will Thompson 2011-03-21 00:02:06 UTC
Created attachment 183882 [details] [review]
eMusic Store: Add a Signout link.

This works a little differently to the Amazon version: because we don't
have any other items in the menu, just hiding the item leaves us with an
empty menu in the UI.

If a similar page is added for eMusic, this could be made to work like
Amazon.
Comment 10 Will Thompson 2011-03-21 00:02:11 UTC
Created attachment 183883 [details] [review]
Amazon: fix signed-in detection for UK store.
Comment 11 Will Thompson 2011-03-21 00:15:47 UTC
Created attachment 183884 [details] [review]
Add MIME type for eMusic's .emx files.

Yeah, this really is the name of the MIME type they serve up.
Comment 12 Will Thompson 2011-03-21 00:15:51 UTC
Created attachment 183885 [details] [review]
Enable eMusic downloader extension by default.

If Banshee's desktop file says it can handle .emx files, then it should
be able to do so by default.

This does not enable the eMusic store plugin by default. Since eMusic is
a subscription-only service it strikes me that this is a little more
niche than, say, Amazon.
Comment 13 Will Thompson 2011-03-21 00:18:57 UTC
Hokay, I think I've addressed those points. I squashed the trivial ones into the initial patch. You'll presumably want to add a logout action to integrated-services.

I noticed that online stores seem to be sorted case-sensitively and thus eMusic is above Amazon in the list, which looks weird. I couldn't see where the case-sensitive search was going on; I assumed that SourceSortType.cs was being used, but it seems only to be used for sorting playlists and the like, and it sorts case-insensitively anyway. So I leave this in the capable hands of someone more familiar with the codebase.
Comment 14 Gabriel Burt 2011-04-08 17:34:48 UTC
Thanks Will!  I've pushed these all to master.  I also added a .csproj and .sln entry, and added the appropriate files to po/POTFILES.in.