Mediascanner2 should provide a QML interface that satisfies the needs of music-app

Bug #1273625 reported by James Henstridge
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Music App
Fix Released
High
Unassigned
mediascanner2
Fix Released
Undecided
Unassigned
mediascanner2 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The current version of music-app uses QtGrilo to snarf the entire media index into a private database on startup. We haven't yet implemented a Grilo plugin for the new media scanner, and it would be preferable for music-app to drive itself directly from the media scanner index.

To achieve this, we want to provide a QML interface that provides the necessary functionality. The initial work is in this merge proposal, but it does little more than show that it is possible to perform queries from QML:

    https://code.launchpad.net/~jamesh/mediascanner2/qml-plugin/+merge/201754

We most likely need to add some QAbstractListModel classes that let you iterate over songs, albums and artists. What is less clear is what filters would be needed to work with those models.

This e-mail is also relevant:
https://lists.launchpad.net/ubuntu-touch-coreapps/msg00666.html

Related branches

David Planella (dpm)
Changed in music-app:
status: New → Triaged
importance: Undecided → High
David Planella (dpm)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mediascanner2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

These are the use cases I can currently see within the latest version of the music-app
- getting all music
- getting all artists
- getting all songs from one artist
- getting all albums from one artist
- getting all albums
- getting all songs for a given album
- getting all genres
- getting all songs of a given genre
- getting all covers from one artist
- getting the cover of a given album
- getting all covers for a given genre

For each of the use cases, sorting will be required as well.

Revision history for this message
James Henstridge (jamesh) wrote :

We're currently not extracting genre information from music. We can certainly add that to the index though.

For cover art, we currently don't have any support in the media scanner: for the scope, the shell is retrieving the cover art via the image://album_art/artist=X&album=Y URIs (handled via the the thumnailing code in the Ubuntu SDK).

For the other cases, can you confirm that list models would be the desired API? Something like:

 * song list model, with properties to restrict to an artist, album, or genre
 * album list model, with property to restrict to an artist
 * artist list model
 * genre list model

If we provided those, could you build your interface and application logic directly on top of those classes rather than needing to maintain your own data model?

Revision history for this message
James Henstridge (jamesh) wrote :

I've put together a basic QML binding in the attached branch, which should be merged soon. It provides an Ubuntu.MediaScanner module you can import. Attached is a very simple QML example that uses the provided models to browse through the albums and songs in the index.

As said before, we don't have cover art support in the media scanner yet, but you can use the SDK's thumbnailing code for that. We also don't yet track genres, but this should be enough to get started (or to tell us it needs changing).

David Planella (dpm)
Changed in music-app:
milestone: none → hackdays-1403
Revision history for this message
James Henstridge (jamesh) wrote :

As mentioned on IRC, album art support has been added via the image provider from the qtdeclarative5-ubuntu-thumbnailer0.1 plugin.

Changed in mediascanner2:
status: New → In Progress
Changed in mediascanner2 (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

Fix committed into lp:music-app at revision 496, scheduled for release in music-app, milestone 1.0

Changed in music-app:
status: Triaged → Fix Committed
Changed in mediascanner2:
status: In Progress → Fix Released
Changed in mediascanner2 (Ubuntu):
status: In Progress → Fix Released
David Planella (dpm)
Changed in music-app:
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

Remote bug watches

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