Music: Advanced Search and Remote Resources

Screenshot from 2014-05-10 19:33:26
Searching songs in Albums view will not work

My project for Google Summer of Code 2014 is about improving search and adding support for accessing your songs in remote resources. I’ll be working with Sai, where I’ll focus with Advanced Search and Sai will focus on Remote Resources.

So, in this post, I’ll talk mostly about Advanced Search (also known as Global Search). Currently Music uses filtering when you search which presents some problems, like how you need to load all items in a view before searching there and you have to move to a certain view to search songs.

The designers actually have a mockup on how we should implement search. However we don’t have enough time during the GNOME 3.10 cycle (which is our first release), so Vadim implemented a simple solution for search by filtering. A lot of us are busy during the next cycle too though (with different reasons) so it got postponed to GNOME 3.14.

wire-search
Mockup for Music’s Search view in selection mode

Basically, the design for search is that there would be a new view that will show up when you search (which I call the “Search view”, basically why it is also called Global Search). The results will be grouped into Albums, Artists, Songs and Playlists (basically the four main views).

Selecting an album will show the album’s contents just like in Albums view when you select an album there. Selecting an artist will show the albums of that artist, just like in Artists view but without the sidebar. Playlists will show the contents, just like in Playlists view without a sidebar too. Selecting songs will play them immediately.

wire-search-full
Full mockups for search

After viewing results, you could easily go back to the view you came from – pressing escape will hide the search results, and back buttons will bring you back when you select an item. You could also immediately select the items then add them to a playlist. You no longer need to load all items – just type and Music will show everything that would match it (whether the match happens with the track title, album name or artist name), like how you use a search engine in your browser.

To implement this, I have to create a new view (Search view) then add child views for each group except for songs. The most time-consuming part will be playlists results, because the current implementation of Playlists view doesn’t use queries for loading the contents, making search almost impossible. I also have to create new SPARQL queries to pick the items from Tracker.

The tracking bug for search is in here. Mockup for search is here (same as earlier image, but directly in GitHub).

My mentor (Vadim Rutkovsky) also want to extend this and add filters to the results just like how search works in Documents. Aside from local files, you could search in other sources too like Jamendo, and possibility to filter the matching to a certain field (track title, album name or artist name). There’s a bug report tracking that here.

I already started working on it a few weeks ago, working on top of an old branch in our GitHub repository that Vadim was working on almost a year ago. It removed filtering and added the dropdown for the search bar. More updates on this in a future post. Most of the user interface work for Search is already finished (at least, based on the mockup).

As for remote resources, Sai will give more info about it once he’s no longer busy in his studies. For now I’ve tried looking on sources of gnome-documents, gnome-online-accounts, gnome-online-miners, tracker and grilo to see how we could implement it. Someone tried to do it a year ago, here‘s the bug report.

If there’s enough time, we will also add enhancements such as integration with ownCloud and media (MTP Players, CDs, etc.).

Advertisements

One thought on “Music: Advanced Search and Remote Resources”

Blog is now moved to www.kyoushuu.com, please leave your comments there instead.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s