Selecting artists from "My Music" scope doesn't show "albums_of_artist" view anymore

Bug #1381971 reported by James Henstridge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Unity Media Scanner Scope
Fix Released
Undecided
Unassigned
unity-scope-mediascanner (Ubuntu)
Fix Released
High
Paweł Stołowski
unity-scopes-shell (Ubuntu)
Invalid
Undecided
Paweł Stołowski

Bug Description

I was able to reproduce this problem with ubuntu-rtm image #91 for Nexus 4:

version_detail: ubuntu=20141016,device=20140929.1,custom=mako-1.1,version=91

Steps to reproduce:

1. Load some music onto device
2. Navigate to "My Music" scope in dash (e.g. by clicking the "My Music" category header in music scope).
3. Select an artist from the surfacing results

Observed behaviour:
Standard search results for the artist's name are displayed with small icons for artists, albums and tracks.

Expected behaviour:
The special "albums_of_artist" view should be displayed with a full width result showing art for the artist.

Surprisingly, if I select the same artist result as it appears in the music aggregator scope, I get the albums_of_artist view. This makes me suspect that this is a problem in the dash or unity-scopes-shell, where the department ID from the canned query is being lost.

Related branches

Changed in unity-scope-mediascanner (Ubuntu):
assignee: nobody → Pawel Stolowski (stolowski)
Changed in unity-scopes-shell (Ubuntu):
assignee: nobody → Pawel Stolowski (stolowski)
Revision history for this message
Paweł Stołowski (stolowski) wrote :

Ok, it seems to be an issue of the plugin; activating the canned query for artists fires off two queries, which look like these:

scope://mediascanner-music?q=Iron%20Maiden&dep=albums%5Fof%5Fartist
scope://mediascanner-music?q=Iron%20Maiden

Changed in unity-scope-mediascanner (Ubuntu):
status: New → Confirmed
Changed in unity-scopes-shell (Ubuntu):
status: New → Invalid
Revision history for this message
Paweł Stołowski (stolowski) wrote :

After looking at the code of shell plugin and some more debugging I found the responsible snippet of code in the plugin (scope.cpp):

    bool containsDepartments = m_rootDepartment.get() != nullptr;
    // design decision - no navigation when doing searches
    containsDepartments &= m_searchQuery.isEmpty();

    if (containsDepartments != m_hasNavigation) {
        m_hasNavigation = containsDepartments;
        Q_EMIT hasNavigationChanged();
    }

    if (!containsDepartments && !m_currentNavigationId.isEmpty()) {
        m_currentNavigationId = "";
        Q_EMIT currentNavigationIdChanged();
    }

Unfortunately that means we cannot pass department and non-empty query string because search needs to be global, and not within a department (design decision affecting all scopes) and shell plugin resets department id if that happens. I think this behavior of plugin is questionable and needs to be re-considered, but any change here affects all scopes.

The fix for this particular bug should therefore happen in mediascanner scope.

Changed in unity-scope-mediascanner (Ubuntu):
importance: Undecided → High
tags: added: rtm14
tags: added: touch-2014-10-30
tags: added: ubuntu-rtm
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-scope-mediascanner - 0.2+15.04.20141110-0ubuntu1

---------------
unity-scope-mediascanner (0.2+15.04.20141110-0ubuntu1) vivid; urgency=low

  [ CI bot ]
  * Resync trunk

  [ Xavi Garcia ]
  * Added the youtube scope in the music aggregator to search only for
    music entries.

  [ Pawel Stolowski ]
  * When searching albums of an artist via canned queries, pass artist
    name via a fake department id rather than search string to
    workaround shell plugin behavior that resets department under
    certain conditions if search string is not empty. (LP: #1381971)
 -- Ubuntu daily release <email address hidden> Mon, 10 Nov 2014 13:46:31 +0000

Changed in unity-scope-mediascanner (Ubuntu):
status: Confirmed → Fix Released
Changed in unity-scope-mediascanner:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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