Alxandr / SpotiFire

A project to make a SpotifyClient in C#

Home Page:http://nudoc.azurewebsites.net/SpotiFire

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make Browse-functions return Task that completes when the browse is completed.

Alxandr opened this issue · comments

Currently when you do stuff like album.Browse() the method returns you an AlbumBrowse object right away even though the operation is async. AlbumBrowse is awaitable, so calling await on it resolves this issue, but it's still possible to misunderstand how this works and expect the result to be usable at once.

All *Browse and *Search functions should return Tasks given from TaskCompletionSources. This also removes the dependency on the custom await-code written, which should in time entirely be removed (a bit more work on other things like Playlist is required for this though).