question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I’ve just seen the update for the SuccesStory, but it doesn’t solve the problem for me - there’s still no trophies.

There are two kinds of IDs in the PSN APIs - titleId (usually CUSAxxxxx_xx) and communicationId (usually NPWRxxxxxx_xx). All PS4 and PS5 games use titleId as Playnite’s GameId, as it’s the most universal one. Only PS3/PSP/PSVITA games use communicationId as GameId directly, as those don’t have their titleId exposed.

private const string UrlAchievementsDetails = @"https://m.np.playstation.net/api/trophy/v1/npCommunicationIds/{0}/trophyGroups/all/trophies";
private const string UrlAchievements = @"https://m.np.playstation.net/api/trophy/v1/users/me/npCommunicationIds/{0}/trophyGroups/all/trophies";
(...)
Url = string.Format(UrlAchievements, GameId) + "?npServiceName=trophy";                 // all without ps5
UrlDetails = string.Format(UrlAchievementsDetails, GameId) + "?npServiceName=trophy";   // all without ps5

From your code, it seems that you are using the GameId directly for all games, which won’t work for PS4 and PS5 games in the db. To get communicationId needed to retrieve trophies, you first need to retrieve it by translating titleId into communicationId by calling PsnAPI.GetTrohpiesWithIdsMobile, example use here: https://github.com/XenorPLxx/playnite-library-psn/blob/f430cb288444e36d3da8ff48d5564efbd9eda257/source/Libraries/PSNLibrary/PSNLibrary.cs#L267

Also, as the API takes 5 titleIds at a time, I’d suggest dumping it into a file instead of resolving it each time. PSN plugin does this only once to import 1.0 plugin games, so I didn’t need to save it. There’ll be some custom metadata fields in P10 that could be used to store communicationId.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Lacro59commented, Oct 15, 2021

Thanks for your help.

This version must be good: playnite-successstory-plugin_2_2_1.zip

0reactions
XenorPLxxcommented, Oct 15, 2021

Yes, it seems to be working fine now 😃. I’m seeing trophies for PS4 and PS5 games. Thanks for fixing this 😃.

Read more comments on GitHub >

github_iconTop Results From Across the Web

psn-api
A well-tested library that lets you get trophy, user, and game data from the PlayStation Network.. Latest version: 2.10.0, last published: 2 ...
Read more >
andytsunami/psn-lib: PlayStation Network Library for Java
Contribute to andytsunami/psn-lib development by creating an account on GitHub. ... While they are mostly server APIs, psn-lib is a pure Java Library....
Read more >
Release Notes for Cisco Identity Services Engine ...
ERS API now supports creating guest types and sponsor groups, and setting account passwords. Portal background image—You can add a background ...
Read more >
psn-api: About
psn -api is a well-tested JavaScript library that lets you get trophy, user, and game data from the PlayStation Network. Features​. Tiny, less...
Read more >
PS4 9.00 FW Jailbreak Tutorial Guide 2022 - GoldHen V2.2.2
there is no risk at all for your account to get banned. The point is that if you connect to sony servers you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found