Support for german Amazon Cloud Player

Bug #1059020 reported by Jiří Janoušek
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Nuvola Apps Runtime (Nuvola Player)
Fix Released
Low
Unassigned

Bug Description

Original report:

Amazon started its Cloud Player in Germany 2 weeks ago. When I try to launch the Cloud Player within Nuvola, the Amazon.com Login website appears and after entering Email and pw, the Amazon.de website is launched in my webbrowser.

To get german Cloud Player up and running in Nuvola, I simply copied the Folder /usr/share/nuvolaplayer/services/amazon to amazon_de and changed all existing amazon.com to amazon.de within metadata.conf .
Now Nuvola works fine for me.
Maybe you could add native support for Amazon.de to Nuvola.

Changed in nuvola-player:
status: New → Triaged
importance: Undecided → Wishlist
assignee: nobody → Michael Mims (mims-michael)
milestone: none → future
Revision history for this message
Jiří Janoušek (fenryxo) wrote :

I've subscribed maintainer of the Amazon integration, Michael Mims.

> When I try to launch the Cloud Player within Nuvola, the Amazon.com Login website appears and after entering Email and pw, the Amazon.de website is launched in my webbrowser.

Gregor, could you provide debug output of that? We need to know exact addresses including redirections to modify sandbox. Run following command in terminal:

nuvolaplayer --debug --debug-navigation

Michalel, could you look at this? It might be sufficient to change sandbox_pattern in the current integration instead of maintaining a modified copy:

- sandbox_pattern = https?://((www\.)?amazon\.com/ap/signin|(www\.)?amazon\.com/gp/dmusic/mp3/player)
+ sandbox_pattern = https?://((www\.)?amazon\.(com|de)/ap/signin|(www\.)?amazon\.(com|de)/gp/dmusic/mp3/player)

visibility: public → private
Revision history for this message
Jiří Janoušek (fenryxo) wrote :

Since the log might contain private information, I've marked this bug as private.

Revision history for this message
Gregor Sievers (gregor-sievers) wrote :

Hi,
thanks for the fast reply.
Just for information: I installed nuvola from the unstable ppa, my OS is kubuntu 12.04 64 Bit.

I've attached the log with the unmodified metadata.conf.

Revision history for this message
Gregor Sievers (gregor-sievers) wrote :

Here another log from a successful login with a modified metadata.conf:

name = Amazon Cloud Player
home_page = http://www.amazon.de/gp/dmusic/mp3/player
sandbox_pattern = https?://((www\.)?amazon\.(com|de)/ap/signin|(www\.)?amazon\.(com|de)/gp/dmusic/mp3/player)

It is not sufficient to change only sandbox_pattern (In this case (with .com in home_page) the german login website is opened in my browser again).

Hope this helps.
cheers,
Gregor

Revision history for this message
Jiří Janoušek (fenryxo) wrote : Re: [Bug 1059020] Re: Support for german Amazon Cloud Player

> It is not sufficient to change only sandbox_pattern (In this case (with
> .com in home_page) the german login website is opened in my browser
> again).

I see, the URL "https://www.amazon.com/gp/redirect.html?ie=UTF8&location=https%3A%2F%2Fwww.amazon.de..."
doesn't match to the sandbox expression. Following sandbox should be
ok. Don't forget to click Home button on a toolbar to test it.

home_page = http://www.amazon.com/gp/dmusic/mp3/player
sandbox_pattern =
https?://(www\.)?amazon\.(com|de)/(ap/signin|gp/dmusic/mp3/player|gp/redirect.html)

Please don't change home_page to .de for now. If the support of the
German version can be achieved by a modification of the sandbox
without creation of whole new amazon_de integration, the fix could go
to Nuvola Player 1.0.1/2.0.1 (in 1-2 weeks). Otherwise, the target
version would be 2.1.0 (in 2-4 months). The next step is to allow user
to choose com/de home page when the service is chosen for the first
time.

Revision history for this message
Gregor Sievers (gregor-sievers) wrote :

Hi,
after trying some RegExps, I finally found a solution:
home_page = http://www.amazon.com/gp/dmusic/mp3/player
sandbox_pattern = https?://((www\.)?amazon\.(com|de)/ap/signin|(www\.)?amazon\.(com|de)/gp/dmusic/mp3/(player|forceSignIn)|(www\.)?amazon\.(com|de)/gp/redirect)

Disadvantage is that I've to login twice: first at amazon.com, then at amazon.de.
Anyway, my workaround with home_page=amazon.de works fine for myself..
Log attached.

Revision history for this message
Gregor Sievers (gregor-sievers) wrote :

Hi,
Does Nuvola work with amazon.co.uk or other countries?

btw..the reg expr a little bit more compact:
sandbox_pattern = https?://((www\.)?amazon\.(com|de)/(ap/signin|gp/dmusic/mp3/(player|forceSignIn)|gp/redirect))

Revision history for this message
Michael Mims (mims-michael) wrote :

I've just been looking at this, and it appears that Amazon (in general) supports the following countries:
Canada (.ca) | China (.cn) | France (.fr) | Germany (.de) | Italy (.it) | Japan (.co.jp) | Spain (.es) | United Kingdom (.co.uk) | United States (.com)

Of these countries, cloud player seems to be available for only:
France (.fr) | Germany (.de) | United Kingdom (.co.uk) | United States (.com)

All urls appear to use the same relative paths with the only difference being the top level domain. I would suggest changing the sandbox pattern to:
https?://((www\.)?amazon\.(com|fr|de|co\.uk)/(ap/signin|gp/dmusic/mp3/(player|forceSignIn)|gp/redirect))

In this case, it seems that Amazon's redirection service should suffice with the only drawback being that you have to essentially login twice. Of course, we would need testing for French and UK users.

Jiří, do you have any plans for how multi-lingual service integrations will work in the future? Perhaps the home page could be determined by locale and use a home_page_xx variable (where xx is a locale/country code) if available, otherwise default to home_page?

Revision history for this message
Jiří Janoušek (fenryxo) wrote :

On Tue, Oct 2, 2012 at 9:53 PM, Michael Mims <email address hidden> wrote:
> I've just been looking at this, and it appears that Amazon (in general) supports the following countries:
> Canada (.ca) | China (.cn) | France (.fr) | Germany (.de) | Italy (.it) | Japan (.co.jp) | Spain (.es) | United Kingdom (.co.uk) | United States (.com)
>
> Of these countries, cloud player seems to be available for only:
> France (.fr) | Germany (.de) | United Kingdom (.co.uk) | United States (.com)
>
> All urls appear to use the same relative paths with the only difference being the top level domain. I would suggest changing the sandbox pattern to:
> https?://((www\.)?amazon\.(com|fr|de|co\.uk)/(ap/signin|gp/dmusic/mp3/(player|forceSignIn)|gp/redirect))

It seems OK.

> In this case, it seems that Amazon's redirection service should suffice
> with the only drawback being that you have to essentially login twice.
> Of course, we would need testing for French and UK users.

I could create a service package and announce it on
Google+/Facebook/Twitter. If no issues will be found, the new sandbox
pattern can go to NP 2.0.1.

> Jiří, do you have any plans for how multi-lingual service integrations
> will work in the future? Perhaps the home page could be determined by
> locale and use a home_page_xx variable (where xx is a locale/country
> code) if available, otherwise default to home_page?

It's an interesting idea, but it will be still necessary to allow user
to choose different homepage, because user can use locale that doesn't
match his country (e.g. I use en_US instead of cs_CZ). For now, I
suggest different approach, that is possible with current API:

- The preferred home page in stored as service-specific settings.
- The home_page field in metadata.conf is set to a static landing page
"service://home.html" ("service://" refers to a service's directory).
- The static landing page makes a redirect to real home page or show
request to select the preferred home page.

I could create a prototype later this week. Could you push a branch
with modified sandbox to
"lp:~nuvola-player-devel/nuvola-player/amazon-more-counties" so we can
share it?

Revision history for this message
Gregor Sievers (gregor-sievers) wrote :

Hi,
I've only login twice at the first login and when I pressed the 'home' button. After a 'normal' start of Nuvola, the German login screen appears and I've to login only one time. This solution seems ok for me.

I've observed a small bug: When I click on the settings button (in German: Einstellungen->Ihre Amazon MP3 Einstellungen), a broken Nuvola window appears. I would have suggested that the settings are opened in my browser. Is there the same problem with the Amazon.com website?

By the way, the 'locale' idea would not work for me neither. I've a German amazon account but en_US locale...

Revision history for this message
Michael Mims (mims-michael) wrote :

I uploaded a branch with the proposed sandbox as well as a prototype layout for selecting the country.

Revision history for this message
Michael Mims (mims-michael) wrote :

I'm not sure what to do about the settings. The same problem happens on the .com version. The problem is that it creates a pop-up window for the settings and for some reason the pop-up has a frame within it that has extremely small height. In my experience, there really isn't much to configure in the settings any way, but that may not be the case for other users.

Revision history for this message
Jiří Janoušek (fenryxo) wrote :

> lp:~nuvola-player-devel/nuvola-player/amazon-more-
countries

Could you split your changes into 2 revisions (modified sandbox
pattern; static home page), so I can cherry-pick the sandbox pattern
for 2.0.1 more easily? The complete solution will go to 2.1.0.

> I'm not sure what to do about the settings. The same problem happens on
> the .com version. The problem is that it creates a pop-up window for the
> settings and for some reason the pop-up has a frame within it that has
> extremely small height. In my experience, there really isn't much to
> configure in the settings any way, but that may not be the case for
> other users.

Please create a new bug report for that.

Revision history for this message
Michael Mims (mims-michael) wrote :

I committed 3 revisions the branch: sandbox change, description change, and static home page change. The description change revision displays the supported countries . You may want to cherry-pick from that revision instead of the sandbox revision.

Revision history for this message
Jiří Janoušek (fenryxo) wrote :

I've updated the branch with configurable home page via service-specific settings. It's ready for a review.

visibility: private → public
Changed in nuvola-player:
status: Triaged → In Progress
Revision history for this message
Michael Mims (mims-michael) wrote :

Looks good to me. I made a slight change in the wording about changing the preference in the settings file.

Revision history for this message
Jiří Janoušek (fenryxo) wrote :

Great, this feature seems to be ready for merging.

I have only one small suggestion: I think the box "Supported countries: France, Germany, United Kingdom, and United States." is too much highlighted, I would transform it to a normal paragraph and move it under the "Amazon Cloud Player is integrated..." paragraph. If you agree, you can apply (and modify) attached patch.

Revision history for this message
Michael Mims (mims-michael) wrote :

Agreed! Pushed change to branch.

Revision history for this message
Jiří Janoušek (fenryxo) wrote :

Fix committed to lp:nuvola-player as r581, lp:nuvola-player/2.0.x as r580, and lp:nuvola-player/1.1.x as r543.

Changed in nuvola-player:
status: In Progress → Fix Committed
milestone: future → 2.1.0
assignee: Michael Mims (mims-michael) → nobody
Revision history for this message
Jiří Janoušek (fenryxo) wrote :

Amazon Cloud Player (4.0) for NP 1.1.0/2.0.0 is available for download at <http://nuvolaplayer.fenryxo.cz/services.html>. The package can be installed from service selector screen.

Revision history for this message
Gregor Sievers (gregor-sievers) wrote :

I just tested Amazon Cloud Player 4.0 and everything I working fine (both with and without "Choose preferred national variant")

Thank you very much for your help, Nuvola is a great program!

Changed in nuvola-player:
importance: Wishlist → Low
Revision history for this message
Jiří Janoušek (fenryxo) wrote :

The fix has been released in a freshly baken Nuvola Player 2.1.0.

Changed in nuvola-player:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.