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

[Kodi] Allow live streams to be recognized as paused #14623

Merged
merged 1 commit into from
Jun 4, 2018
Merged

[Kodi] Allow live streams to be recognized as paused #14623

merged 1 commit into from
Jun 4, 2018

Conversation

quthla
Copy link
Contributor

@quthla quthla commented May 25, 2018

Allow live streams to be recognized as paused

Description:

Add OnResume event
Fix Pausing live streams not recognized
Fix media_title empty when title is empty but label is set

Related issue (if applicable): fixes #
#14394

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

Copy link
Contributor

@emlove emlove left a comment

Choose a reason for hiding this comment

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

The concerns from #14403 still need to be addressed.

Is there some property on the API that can distinguish between a player being intentionally paused, versus just buffering?

@quthla
Copy link
Contributor Author

quthla commented May 25, 2018

I can't see how that is related especially to live streams? Every other non live stream could be buffering as well.

Is it even confirmed that speed gets set to 0 when buffering happens? I can't remember having seen that happening yet.

https://github.com/xbmc/chorus2/blob/d4fd81f7648b09287b38c2e1484a00b7d1387b05/src/js/apps/state/kodi/kodi.js.coffee

The official Kodi webinterface determines player state also only by speed == 0 so I think we should stick with that.

@emlove emlove requested a review from lwis May 25, 2018 15:15
@emlove
Copy link
Contributor

emlove commented May 25, 2018

Those are valid points, but please don't open new PRs to avoid the review process.

@quthla
Copy link
Contributor Author

quthla commented May 25, 2018

That was never my intention. I made the original PR with the GitHub web editor and was unsure if I could edit that as there was a mistake in it.

@emlove
Copy link
Contributor

emlove commented May 25, 2018

Ah, I see. No worries. Sorry I jumped to that conclusion.

@lwis
Copy link
Member

lwis commented May 25, 2018

Maybe the workaround is no longer needed, if not I'm sure this can be solved in a condition. We should just be aware of a potentially breaking change to behaviour.

@quthla
Copy link
Contributor Author

quthla commented May 27, 2018

As there are no objections, I suppose this can be merged?

@MartinHjelmare
Copy link
Member

If this is two or three separate fixes/features, the code change should be provided in two or three separate PRs.

@quthla quthla changed the title Add OnResume event, Fix Pausing live streams not recognized, Fix media_title empty when title is empty but label is set [Kodi] Allow live streams to be recognized as paused Jun 3, 2018
@quthla
Copy link
Contributor Author

quthla commented Jun 3, 2018

I have updated this PR to just one change now

@emlove
Copy link
Contributor

emlove commented Jun 3, 2018

I'm OK with this if everyone else is.

@quthla
Copy link
Contributor Author

quthla commented Jun 4, 2018

@armills Can you merge it then?

@lwis lwis merged commit 1d23f7f into home-assistant:dev Jun 4, 2018
@lwis
Copy link
Member

lwis commented Jun 4, 2018

Thanks! 🐊

@balloob balloob mentioned this pull request Jun 22, 2018
girlpunk pushed a commit to girlpunk/home-assistant that referenced this pull request Sep 4, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Sep 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants