matthuisman / slyguy.addons

Github mirror of SlyGuy add-ons
https://www.matthuisman.nz/2020/02/slyguy-kodi-repository.html
289 stars 78 forks source link

[Paramount+] Request: keep watching list #218

Open jjplano opened 2 years ago

jjplano commented 2 years ago

I'm using the addon on LibreELEC 10.0.2, Kodi 19.4

i don't have a keep watching list, and no sync between what I see in the app and the addon

is this normal? I don't see any options on the configuration (like HBOMAX has)

I searched the issues list and didn't see anything about this

thanks for your help

matthuisman commented 2 years ago

Not added yet. No eta. Probably some time away. Prs are welcome :)

matthuisman commented 2 years ago

Might as well keep the request open to remind future me

jjplano commented 2 years ago

I wish I could help, but I'm not a programmer, sorry. keep up the good work! these are great addons cheers

matthuisman commented 2 years ago

This is an issue for paramount. Please open a new issue for your issue

StollD commented 1 year ago

I figured out a way to sync the playback progress to Paramount+. I can only test it with the German / International version, but the US version probably works the same.

It is done by sending a GET request like this:

params = {
     # Not really sure what this is, but I was able to generate one and use it.
    "sessionid": str(uuid.uuid4()),

    # ID of the playing file, e.g. bcdTxp4Y8dHRcc_VcXE2JLkz_oLMsg56 for SNW S02E01
    "contentid": "....",

     # Are there non premium accounts? The ones with ads? 
     # No idea what this is, but it is required.
    "premium": "true",

    # I have not tested if this accepts arbitrary values, e.g. if you 
    # want to be honest and send Kodi as the playing app
    "platform": "cbs_android_phone_app",

    "userid": api.user()["activeProfile"]["userId"],
    "profileid": api.user()["activeProfile"]["referenceProfileId"],

    # Current playback progress in seconds.
    # Accepts values that are too large, so you can have -5 minutes left to watch.
    "medtime": "....",
}

# Cookies and headers omitted for simplicity.
requests.get("https://sparrow.intl.paramountplus.com/streamer/v1.0/ingest/beacon.json", params=params)

For now I've been sending requests with curl and it works fine. If its desired I can look into integrating it into the addon.

jjplano commented 1 year ago

I figured out a way to sync the playback progress to Paramount+. I can only test it with the German / International version, but the US version probably works the same.

It is done by sending a GET request like this:

params = {
     # Not really sure what this is, but I was able to generate one and use it.
    "sessionid": str(uuid.uuid4()),

    # ID of the playing file, e.g. bcdTxp4Y8dHRcc_VcXE2JLkz_oLMsg56 for SNW S02E01
    "contentid": "....",

     # Are there non premium accounts? The ones with ads? 
     # No idea what this is, but it is required.
    "premium": "true",

    # I have not tested if this accepts arbitrary values, e.g. if you 
    # want to be honest and send Kodi as the playing app
    "platform": "cbs_android_phone_app",

    "userid": api.user()["activeProfile"]["userId"],
    "profileid": api.user()["activeProfile"]["referenceProfileId"],

    # Current playback progress in seconds.
    # Accepts values that are too large, so you can have -5 minutes left to watch.
    "medtime": "....",
}

# Cookies and headers omitted for simplicity.
requests.get("https://sparrow.intl.paramountplus.com/streamer/v1.0/ingest/beacon.json", params=params)

For now I've been sending requests with curl and it works fine. If its desired I can look into integrating it into the addon.

this is the only addon for a streaming service that I use that doesn't have a "keep watching" section, and that makes it hard to use it, because I have to watch some stuff on my tablet, another ones on kodi, because it's not in sync. so I'm all for having that feature added here :)

StollD commented 1 year ago

More findings: The current progress can be fetched like this:

params = {
    # ID of the episode
    "contentId": "...",

    "at": config.at_token,
    "locale": config.locale,
}

# Value is in rsp.json()["mediaTime"]
requests.get("https://www.intl.paramountplus.com/apps-api/v3.0/androidphone/video/streams.json", params=params)

The website seems to report watched time differently, so there can be a difference in where the website resumes and where this would resume.

The keep watching widget of the app / website can be queried with this, but I have no idea how properly integrate this into the addon (Not really good at UI / UX). It returns the upcoming episodes directly, instead of a link to their shows.

params = {
    "start": "0",
    "rows": "9999",

    # Must be present but can be empty.
    "name": "",

    "at": config.at_token,
    "locale": config.locale,
}

requests.get("https://www.intl.paramountplus.com/apps-api/v3.1/androidphone/home/configurator/keepwatching.json", params=params)
matthuisman commented 1 year ago

thanks to @StollD , v0.6.9 added sync with paramount+ setting

No keep watching yet

I could only test with USA paramount. Looks like @StollD tested with INT so we should be all good!

PS: My INT Paramount+ login is no longer valid. If anyone has an INT login I can use - that would be a great help! See here if you can help: https://www.matthuisman.nz/2018/06/looking-for-logins.html