Merge lp:~bizauionica/nuvola-player/grooveshark-popup into lp:nuvola-player/2.5.x

Proposed by Ionică Bizău
Status: Merged
Approved by: Jiří Janoušek
Approved revision: 855
Merged at revision: 850
Proposed branch: lp:~bizauionica/nuvola-player/grooveshark-popup
Merge into: lp:nuvola-player/2.5.x
Diff against target: 38 lines (+10/-1)
2 files modified
data/nuvolaplayer/services/grooveshark/integration.js (+8/-0)
src/nuvola/gui/aboutdialog.vala (+2/-1)
To merge this branch: bzr merge lp:~bizauionica/nuvola-player/grooveshark-popup
Reviewer Review Type Date Requested Status
Jiří Janoušek Approve
Ionică Bizău (community) Needs Resubmitting
Review via email: mp+229898@code.launchpad.net

Description of the change

GrooveShark popup that appears sometimes is annoying.
I added an interval that verifies if the popup appeared and click the <Resume> button if so.

PS: This is my first time when I contribute on Launchpad :-)

To post a comment you must log in.
Revision history for this message
Jiří Janoušek (fenryxo) wrote :

Sorry for late response, but I haven't somehow received e-mail about this merge proposal :-( Will take a look at it in following days.

Revision history for this message
Ionică Bizău (bizauionica) wrote :

Please tell anything that I have to modify. This is my first contribution in a project hosted on Launchpad. :-)

I'm a big fan of Git and GitHub (https://github.com/IonicaBizau).

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

> I'm a big fan of Git and GitHub (https://github.com/IonicaBizau).

Nuvola Player 3 is hosted at GitHub, so your future contributions will be easier foy you ;-)

Code review:

- Please add yourself to the list of copyright holders at the top of integration.js.
- Is the 60-second interval short enough? As an user, it would be faster to click the resume button myself instead of wainting one minute in the worst case. 5 or 10-second interval might provide better user experience.

review: Needs Fixing
848. By Ionică Bizău

Removed unwanted spaces.

849. By Ionică Bizău

Added myself as contributor in Grooveshark integration JS file.

850. By Ionică Bizău

5-second interval instead of 60

851. By Ionică Bizău

Added an additional check before closing the popup.

852. By Ionică Bizău

Replaced spaces with tabs.

Revision history for this message
Ionică Bizău (bizauionica) wrote :

> Nuvola Player 3 is hosted at GitHub, so your future contributions will be easier foy you ;-)

Where is it hosted? I'd be happy to bring my contributions there too. Also, it's not bad to learn bzr as well. :-)

> Please add yourself to the list of copyright holders at the top of integration.js.

Done

> Is the 60-second interval short enough?

True. I set 5 seconds.

Other fixes:
 - removed unwanted spaces (trailing ones)
 - close popup when is playing

Clicking that button was making song start (even it was paused).

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

Please revert unnecessary changes regarding whitespace.

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

> Where is it hosted?

https://github.com/tiliado

853. By Ionică Bizău

Added tabs that were been removed back.

Revision history for this message
Ionică Bizău (bizauionica) wrote :

> Please revert unnecessary changes regarding whitespace.

I tried to fix them, but I cannot rollback them... In my opinion they are very ugly. :-)

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

> I tried to fix them, but I cannot rollback them...

Just add a few tabs/spaces at positions indicated by the diff bellow.

> In my opinion they are very ugly. :-)

It's generally a good practise not to be stubborn and to follow coding style of a project you would like to contribute to.

review: Needs Fixing
854. By Ionică Bizău

Added trailing spaces back in COPYRIGHT content.

855. By Ionică Bizău

Added more trailing spaces.

Revision history for this message
Ionică Bizău (bizauionica) wrote :

> Just add a few tabs/spaces at positions indicated by the diff bellow.

It wasn't that hard. :-) A good way to exercise using bzr.

> It's generally a good practise not to be stubborn and to follow coding style of a project you would like to contribute to.

Indeed! However, I don't think it's a good idea to apply this to deleting trailing spaces. :-)

Please review it again. Thanks!

Revision history for this message
Jiří Janoušek (fenryxo) :
review: Approve
Revision history for this message
Ionică Bizău (bizauionica) wrote :

Thanks for approving!

When will my changes be updated on PPA?

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

> When will my changes be updated on PPA?

With release 2.5.0, maybe this week.

Revision history for this message
Ionică Bizău (bizauionica) wrote :

Awesome, thank you!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/nuvolaplayer/services/grooveshark/integration.js'
2--- data/nuvolaplayer/services/grooveshark/integration.js 2013-12-22 18:57:54 +0000
3+++ data/nuvolaplayer/services/grooveshark/integration.js 2014-10-01 13:40:26 +0000
4@@ -1,5 +1,6 @@
5 /*
6 * Copyright 2011-2012 Jiří Janoušek <janousek.jiri@gmail.com>
7+ * Copyright 2014 Ionică Bizău <bizauionica@gmail.com>
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are met:
11@@ -171,6 +172,13 @@
12 throw (this.name + ": " + e.message);
13 }
14 }
15+
16+ // Close popup that blocks song playing
17+ setInterval(function () {
18+ if (Grooveshark.getCurrentSongStatus().status === "paused") { return; }
19+ var r = document.querySelector("span[data-translate-text='LB_INTERACTION_TIME_RESUME']")
20+ r && r.click();
21+ }, 1000 * 5);
22
23 Nuvola.integration = new Integration(); // Singleton ;-)
24 })(window._Nuvola);
25
26=== modified file 'src/nuvola/gui/aboutdialog.vala'
27--- src/nuvola/gui/aboutdialog.vala 2013-07-15 06:43:38 +0000
28+++ src/nuvola/gui/aboutdialog.vala 2014-10-01 13:40:26 +0000
29@@ -56,7 +56,8 @@
30 "Janez Troha <janez.troha@gmail.com>",
31 "Adam Wolfe Gordon <awg@xvx.ca>",
32 "Stefan Lohmaier <stefan.lohmaier@googlemail.com>",
33- "Michael Mims <mims.michael@gmail.com>"
34+ "Michael Mims <mims.michael@gmail.com>",
35+ "Ionică Bizău <bizauionica@gmail.com>"
36 };
37
38 var box = get_content_area() as Gtk.Box;

Subscribers

People subscribed via source and target branches