Does it work in the android beta?
Some improvement with the latest beta! On both Phone and TV the Peacock app will now launch (on TV before it would give an error saying "You don't have an app that can do this")
However something might be passing incorrectly for the show / episode as now it says "Asset is no longer available" and just takes me to the main page in Peacock and not the show or episode.
Ok. What url did you use?
Did some more testing and if I run the original URL
through the regex posted here
It outputs this: (which works takes me directly to the episode on both the phone and TV)
@tmm1
Is this something that can be added to Channels or would it need to be handled with @babsonnexus's SLM to parse out the correct URL?
I'll fix it tomorrow
This is the auto-play Peacock deep link format:
https://www.peacocktv.com/deeplink?deeplinkData={"pvid":"1234","type":"PROGRAMME","action":"PLAY"}
I've found that to auto-play an episode or movie on Peacock from a deep link (as opposed to opening its detail page and needing to press another play button), in the deeplinkData
JSON, pvid
needs to be the ID key, and the value of the action
key needs to be PLAY
(instead of PDP
for the detail page).
For example, to open a direct episode link like this:
https://www.peacocktv.com/watch/playback/vod/GMO_00000000001471_01/04569a08-33e0-3835-9a21-76af2e31fa69
the auto-play deep link is:
https://www.peacocktv.com/deeplink?deeplinkData={"pvid":"04569a08-33e0-3835-9a21-76af2e31fa69","type":"PROGRAMME","action":"PLAY"}
where the last portion of the path (04569a08-33e0-3835-9a21-76af2e31fa69
) is the pvid
.
Similarly, for a movie link:
https://www.peacocktv.com/watch/asset/movies/kids/shrek/b6303073-41bf-3644-8e71-0e8278c33678
the auto-play deep link is:
https://www.peacocktv.com/deeplink?deeplinkData={"pvid":"b6303073-41bf-3644-8e71-0e8278c33678","type":"PROGRAMME","action":"PLAY"}
Then, depending on how you're sending the deep link, you may need to escape certain characters and/or URL encode it.
I originally discovered this format thanks to the "Where to watch" section of the Google Search knowledge panel when searching for a movie available on Peacock, specifically while using Chrome on an Android phone, since Google hides that section in Firefox mobile (and naturally doesn't provide the app deep link in a desktop browser).
However, this only works on Android TV/Google TV, and does not seem to work on Fire TV. I'd be interested if anyone has found a way to send deep links to Peacock on Fire TV as well.
Okay, based on @miles example, I've successfully tested a pattern replacement:
-
If 'Stream Link' contains:
peacocktv.com/watch/asset/.+?/([a-zA-Z0-9\\-]+)$
-
For 'Object Type:
MOVIE or SHOW
-
Do this activity:
Replace pattern (REGEX) with...
-
Using this:
peacocktv.com/deeplink?deeplinkData={"pvid":"\1","type":"PROGRAMME","action":"PLAY"}
To which I ended up with:
This will be made available in the next release of SLM!
Cool. Hopefully, that'll fix all the peacock issues there.
Now available:
This works perfectly! Thank you so much!
I've been thinking about solutions to the original issue a bit. Now I can do this...
adb shell am start -n com.kanopy.tvapp/.MainActivity
... and that will launch the Kanopy app on Android/Google TV. Not a perfect solution, but better than getting an error. However, I can't seem to figure out a way to turn this into valid stream link. I tried things like intent://
in many various combinations and lines of text, but none of them seem to do anything. Any ideas how I might approach this?
Nothing like that is implement, but we can add it. Is there a standard that hass etc is using?
Is this what you're thinking?
intent://com.kanopy.tvapp/.MainActivity
Looks like HASS just does the application name itself:
So yeah, something like...
intent://com.kanopy.tvapp
... would work really well. If we have to keep the /.MainActivity
in there, not the biggest deal (and I'm not sure if it would always be this, but I think it would in 99% of cases). Still trying to hunt down the exact coding they are doing, though it might not be publicly available.
Okay I added intent://
in the next build.
I tried both with and without the /.MainActivity
and nothing ever launched. Submitted diagnostics from the client: b6f4faa6-b0d8-4fce-8dee-09c8e90ab578
Can you try with the latest beta build.
Worked perfectly, thanks! Got it working in SLM now, too: