Make Browse-functions return Task that completes when the browse is completed.
Alxandr opened this issue · comments
Aleksander Heintz commented
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 TaskCompletionSource
s. 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).