Merge lp://qastaging/~stolowski/unity-lens-music/unity-lens-music.error-handling into lp://qastaging/unity-lens-music

Proposed by Paweł Stołowski
Status: Merged
Approved by: Michal Hruby
Approved revision: 106
Merged at revision: 100
Proposed branch: lp://qastaging/~stolowski/unity-lens-music/unity-lens-music.error-handling
Merge into: lp://qastaging/unity-lens-music
Prerequisite: lp://qastaging/~stolowski/unity-lens-music/unity-lens-music.preview-close
Diff against target: 374 lines (+161/-62)
5 files modified
src/musicstore-scope.vala (+36/-21)
src/player.vala (+34/-6)
src/preview-player-client.vala (+37/-13)
src/rhythmbox-scope.vala (+37/-22)
tests/manual/previews-musicstore.txt (+17/-0)
To merge this branch: bzr merge lp://qastaging/~stolowski/unity-lens-music/unity-lens-music.error-handling
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
Review via email: mp+120525@code.qastaging.launchpad.net

Commit message

Improved error handling affecting music preview player.

Description of the change

Improved error handling affecting music preview player.

To post a comment you must log in.
100. By Paweł Stołowski

Merged trunk.

Revision history for this message
Michal Hruby (mhr3) wrote :

123 + Bus.watch_name (BusType.SESSION, PREVIEW_PLAYER_DBUS_NAME, BusNameWatcherFlags.NONE, null, on_player_dbus_name_vanished);

Please don't use watch_name, it's pretty expensive, instead you can just connect to property changes of g-name-owner on the proxy instance - it will go from non-null to null when the proxy disconnects.

Otherwise looks good, we'll probably want to set some error state in the future, but this looks good for now.

review: Needs Fixing
101. By Paweł Stołowski

Merged trunk.

102. By Paweł Stołowski

Preview player client: watch g-name-owner property instead of using Bus.watch_name.

Revision history for this message
Paweł Stołowski (stolowski) wrote :

Changed to use g-name-owner property.

Revision history for this message
Michal Hruby (mhr3) wrote :

127 + var value = GLib.Value (typeof (string));
128 + _preview_player_service.get_property ("g-name-owner", ref value);

Although Vala hides it, dbus interfaces are DBusProxy-derived, so this will work:

string? owner = (_preview_player_service as DBusProxy).get_name_owner ();

review: Needs Fixing
103. By Paweł Stołowski

Preview player client - simplified getting name owner.

Revision history for this message
Paweł Stołowski (stolowski) wrote :

Changed according to suggestion.

Revision history for this message
Michal Hruby (mhr3) wrote :

129 + _preview_player_service = null;

As mentioned on IRC, this should be completely unnecessary, please get rid of it.

review: Needs Fixing
104. By Paweł Stołowski

Preview player client class: removed "reconnect" handling logic as discussed on IRC (not needed).

105. By Paweł Stołowski

Merged error-state branch to handle gstreamer timeout; don't actually introduce ERROR state yet.

Revision history for this message
Michal Hruby (mhr3) wrote :

What about some tests?

review: Needs Information
106. By Paweł Stołowski

Added manual test for network connectivity problem with music playback.

Revision history for this message
Michal Hruby (mhr3) wrote :

Very well then...

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: