sregg / spotify-tv

Unofficial Spotify app for Android TV
GNU General Public License v2.0
45 stars 15 forks source link

Search Provider for Global Search #1

Closed Dahlgren closed 9 years ago

Dahlgren commented 9 years ago

This enables search results for the app in the Global Search. Results are presented in the following order for the query phrase: artists, albums, tracks, playlists.

I will use the handling of data uri in the intent for the different object types to add Recommendations as well.

There are currently some limitations. The app must've been started and running in the background for the search to work. This is due to how the API service and mostly auth token is handled in the app. If the auth token is persisted and the service can be used without having to do the auth phase in the Main Activity this can be fixed easily.

Develop seems to be out of sync with master but I can change to develop if needed

spotify-tv-search

Dahlgren commented 9 years ago

One quick solution to the auth issue would be to skip using the market=from_token parameter

Dahlgren commented 9 years ago

It would also be possible to restrict matching per type to the query in title i.e. Kavinsky's albums wouldn't show when searching for "Kavinsky" but only album names containing "Kavinsky". This is currently not the behaviour of the SearchFragment so I kept the global search the same.

sregg commented 9 years ago

Wow! That's awesome man! I'm sorry I didn't review this earlier, I think I disabled email notifications last month... I'll have a deeper look into it maybe this weekend and I'll merge it the next following week. I'm so glad you're contributing to this project. You're the first one. I was quite excited to start this project but my motivation fell down after implementing the basic features... Having another contributor will definitely boost my interest on working on it again :)

Thanks!

Dahlgren commented 9 years ago

Great, I'll fix up the recommendations next then