python-roku icon indicating copy to clipboard operation
python-roku copied to clipboard

Question. Is there a way to open a deep link?

Open Pinball3D opened this issue 2 years ago • 2 comments

I need to be able to open deep links with this library. Is this possible? if so, how?

Pinball3D avatar Sep 26 '22 01:09 Pinball3D

Hello! I think so, but it depends whether the specific app supports it and you know the correct metadata about the content https://sdkdocs-archive.roku.com/Deep-Linking_4264420.html The contentId and mediaType parameters can be passed to the launch method.

roku.launch(123, {"contentId": 987, "mediaType": "movie"})

jcarbaugh avatar Apr 22 '23 13:04 jcarbaugh

Hi.

This works:

curl -d '' "http://192.168.1.22:8060/launch/195316?contentId=g5Wdv42YrFI&mediaType=live"`

But this does not:

roku = Roku('192.168.1.22')
roku.launch(195316, {"contentId": "g5Wdv42YrFI", "mediaType": "live"})
  File "/usr/local/lib/python3.12/site-packages/roku/core.py", line 299, in launch
    if app.roku and app.roku != self:
       ^^^^^^^^
AttributeError: 'int' object has no attribute 'roku'

Am I missing a step?

TIA

jpoet avatar Jun 21 '24 18:06 jpoet