Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
added files
Browse files Browse the repository at this point in the history
  • Loading branch information
elsorino committed May 3, 2021
1 parent def3ea6 commit d8967b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

.vscode/

config.py
config.ini
4 changes: 2 additions & 2 deletions playstationpresence.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def discordrpc(appid):
discordrpc("829124881324048404")
current = mainpresence.split("'")
if (len(current) == 19): #Length of this is 19 if user is not in a game
rpc.update(state="Idling", start=start_time, small_image=system, small_text=system, large_image=system, large_text="Homescreen")
rpc.update(state="Idling", start=start_time, small_image=system, small_text=PSNID, large_image=system, large_text="Homescreen")
print("Idling")
else:
if 'gameStatus' in mainpresence: #Not every game supports gameStatus
Expand All @@ -56,7 +56,7 @@ def discordrpc(appid):
gameid = current[23]
gamename = current[27]
#gamestatus = current[]
rpc.update(state=gamename, start=start_time, small_image=system, small_text=system, large_image=gameid.lower(), large_text=gametext)
rpc.update(state=gamename, start=start_time, small_image=system, small_text=PSNID, large_image=gameid.lower(), large_text=gametext)
print("Playing %s" %gamename)
time.sleep(15) #Adjust this to be higher if you get ratelimited
oldpresence = mainpresence

0 comments on commit d8967b2

Please sign in to comment.