Skip to content

Extend Google Cast media source URL expiry to 24h#48937

Merged
emontnemery merged 2 commits intohome-assistant:devfrom
Ph-Wagner:patch-1
Apr 9, 2021
Merged

Extend Google Cast media source URL expiry to 24h#48937
emontnemery merged 2 commits intohome-assistant:devfrom
Ph-Wagner:patch-1

Conversation

@Ph-Wagner
Copy link
Copy Markdown
Contributor

@Ph-Wagner Ph-Wagner commented Apr 9, 2021

Proposed change

Same change as in #48912, but for Google Cast.
The 5m expiry time works only for short tracks. Increasing the validity of the tokens should fix #46280

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

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

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

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

closes #46280
After checking out #48912 I just think why not.
@homeassistant
Copy link
Copy Markdown
Contributor

Hi @Ph-Wagner,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@emontnemery
Copy link
Copy Markdown
Contributor

emontnemery commented Apr 9, 2021

@Ph-Wagner Have you verified this change actually does fix #46280 whereas the change in #48912 doesn't?

Edit: Oops, my bad, this change should be needed too.

Copy link
Copy Markdown
Contributor

@emontnemery emontnemery left a comment

Choose a reason for hiding this comment

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

Looks good, I made a small change to use the constant from media_source

Comment thread homeassistant/components/cast/media_player.py Outdated
@emontnemery emontnemery added this to the 2021.4.2 milestone Apr 9, 2021
@emontnemery emontnemery changed the title Extend media source URL expiry to 12h Extend Google Cast media source URL expiry to 24h Apr 9, 2021
@emontnemery emontnemery closed this Apr 9, 2021
@emontnemery emontnemery reopened this Apr 9, 2021
@emontnemery
Copy link
Copy Markdown
Contributor

emontnemery commented Apr 9, 2021

(Close/Open to retrigger CI on latest dev)

@Ph-Wagner
Copy link
Copy Markdown
Contributor Author

yea, Changing the timeout in components/cast/media_player.py changes the creation of the jwt, which is breaking the public URL.
Need something else from me?

@emontnemery
Copy link
Copy Markdown
Contributor

Thanks a lot @Ph-Wagner 👍

@emontnemery emontnemery merged commit b66c4a9 into home-assistant:dev Apr 9, 2021
@Ph-Wagner Ph-Wagner deleted the patch-1 branch April 9, 2021 16:07
balloob pushed a commit that referenced this pull request Apr 9, 2021
* Extend media source URL expiry to 12h

closes #46280
After checking out #48912 I just think why not.

* Update homeassistant/components/cast/media_player.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>
@balloob balloob mentioned this pull request Apr 9, 2021
@ialtuhov
Copy link
Copy Markdown

After updating the kernel to 2021.4.2 nothing has changed: audio / 32 min:
Login attempt or request with invalid authentication from 192.168.0.150 (192.168.0.150). (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36)
The video stream does not work, there are no errors.
I'm terribly upset (((Tell me what I'm doing wrong???
Please help me solve this problem.

@github-actions github-actions Bot locked and limited conversation to collaborators Apr 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

media bowser chromecast, to short lived jwt for serving long tracks

5 participants