Fix "Adding a playlist via 'QueuedLavalinkPlayerExtensions' does not work" #188
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #185
Removes the compound null replacement assignment in favor of regular assigning. The default result value will always be null anyways, so we don't need it.
Adds documentation, and specifies that in the event a playlist is passed to this method, the result returned will be the index of the last track added to the queue, not the first. This is more useful for things like determining queue length with less asynchronous executions in certain contexts, and generally is more useful to end users. When shuffling tracks that are added to the queue, this return result is irrelevant anyways.
Ex: if a player is currently playing, but has an empty track queue, and a playlist with 5 tracks is played, track index 5 should be returned.
It may be worth adding support for determining whether you want the first or last index returned in the future, but it could also potentially be seen as clogging the API with unnecessary methods. Will have to see as time goes on.