Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace specific enqueue options with one #4425

Merged
merged 4 commits into from
Oct 6, 2020

Conversation

vkay94
Copy link
Contributor

@vkay94 vkay94 commented Oct 6, 2020

What is it?

  • Bug fix (user facing)
  • Feature (user facing)
  • Code base improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

This PR replaces the enqueue options within the StreamDialogEntry-dialogs with one.

Dev:

  • Added static method to PlayerHolder to determine the current running PlayerType (VIDEO, AUDIO, POPUP).
  • Added new entry enqueue which automatically checks which type is running and enqueues the stream accordingly to the right player.
  • Adjustments to showStreamDialog (see more in User)
  • Removed unused StreamDialogEntry items and their strings.
  • Set generic Toast message for all three types (needs to be translated).

User:
If there is no player playing a stream, then the options for queuing won't be shown - there is no need for them, in this case it's the same as start playing in background/popup.
But If there is a stream playing then there'll be the entry Enqueue which enqueues the next stream without interrupting the current flow.

I hope the behavior is what you've expected @TobiGr

Fixes the following issue(s)

Testing apk

app-debug-2.zip

Agreement

The enqueue options won't be shown in the dialogs if the Player service is not running. When it's running one item (enqueue stream) will be shown and enqueues the item into the Player type which is currently selected.
@TobiGr TobiGr added the player Issues related to any player (main, popup and background) label Oct 6, 2020
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking care of this! :-D

@vkay94
Copy link
Contributor Author

vkay94 commented Oct 6, 2020

I've pushed your suggestions/requested changes and updated the OP.

Stypox
Stypox previously approved these changes Oct 6, 2020
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for implementing the suggestions, almost there :-D

app/src/main/res/values/strings.xml Outdated Show resolved Hide resolved
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you again!

@Stypox
Copy link
Member

Stypox commented Oct 6, 2020

And also works after some testing

@Stypox Stypox merged commit 44e8221 into TeamNewPipe:dev Oct 6, 2020
@opusforlife2 opusforlife2 linked an issue Oct 6, 2020 that may be closed by this pull request
@avently
Copy link
Contributor

avently commented Oct 8, 2020

@vkay94 thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
player Issues related to any player (main, popup and background)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enqueue in the backgorund / popup changes the current player
5 participants