Skip to content

Playstation Now Support#16

Open
adamrb wants to merge 3 commits into
FriendsOfGalaxy:masterfrom
adamrb:master
Open

Playstation Now Support#16
adamrb wants to merge 3 commits into
FriendsOfGalaxy:masterfrom
adamrb:master

Conversation

@adamrb

@adamrb adamrb commented Jul 14, 2020

Copy link
Copy Markdown

Fixes #9

@superusercode

Copy link
Copy Markdown

@FriendsOfGalaxy is there any CLA or documentation required to merge this?

@FriendsOfGalaxy FriendsOfGalaxy left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@adamrb I'm sorry for getting to you so late. I need to test it more, but for now I've put some comments already.

Comment thread src/psn_store.py
SESSION = BASE_URL + 'kamaji/api/valkyrie_storefront/00_09_000/user/session'
SUBSCRIPTION_DETAILS = BASE_URL + 'kamaji/api/valkyrie_storefront/00_09_000/gateway/store/v1/users/me/subscription/IP9102-NPIA90006_00'

PSPLUS_URL = "https://browse.prod.gaikai.com/apollo1/v1/np/{country}/{language}"

@FriendsOfGalaxy FriendsOfGalaxy Dec 15, 2020

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

What does the url come from? I does not work for all supported countries-lang like JP/jp

It also does not work for officialy not supported countires (like PL/pl) but it is OK I think. Probably no one is playing via VPN from those unsupported countires.. well, maybe in China...

Another way would be to hardcode US/en. But I'm not sure the game list is the same for all regions.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Just wanted to point out that jp/ja (not jp/jp) works:
https://browse.prod.gaikai.com/apollo1/v1/np/jp/ja

Comment thread tests/test_data.py
"revision": 1072,
"categories": [{
"id": "STORE-MSF192018-APOLLOTOP20",
"timestamp": 1594137934000,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I wonder if it is time when game was added to subscription. Then we can use https://github.com/gogcom/galaxy-integrations-python-api/blob/master/src/galaxy/api/types.py#L251

(just checked that this is not end time on Kingdom Come example)

Comment thread src/plugin.py
is_plus_active = await self._psn_client.get_psplus_status()
return [Subscription(subscription_name="PlayStation PLUS", end_time=None, owned=is_plus_active)]
return [Subscription(PLAYSTATION_PLUS, is_plus_active, None),
Subscription(PLAYSTATION_NOW, None, None, SubscriptionDiscovery.USER_ENABLED)]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

good enough to have it as user-enable experimental feature.

For future I see that PSN web store client uses graphQL API eg. https://web.np.playstation.com/api/graphql/v1/op?operationName=oracleUserProfile
and there is something like

"data": {
"subscriptionState": [
    {"__typename": "Subscription", "subscriptionStatus": "NEVER", "subscriptionType": "PSPLUS"}
    {"__typename": "Subscription", "subscriptionStatus": "NEVER", "subscriptionType": "PSNOW"}
    {"__typename": "Subscription", "subscriptionStatus": "NEVER", "subscriptionType": "EAACCESS"}
]}

but I'm not sure if our token has access there

@Gotcha007

Copy link
Copy Markdown

Any movement on this? Are we able to see the PSNow subscriptions in GOG? I don't care to be able to launch the games but at least to see it would be awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for PS Now

5 participants