Skip to content

Conversation

@lambdan
Copy link
Contributor

@lambdan lambdan commented Sep 21, 2025

  • Added a platform CharField for Activity. Defaults to pc (existing activity will get that value)
    • There's probably a prettier way to add the column to existing databases. I tried using Playhouse Migrations, which worked, once. If you restarted the app, it would complain about the column already existing, so just using a raw SQL statement like this was much simpler, albeit ugly.
  • If activity.platform is present in the Discord activity that is used (eg ps5)
    • If not available, pc will be used
    • Steam Deck (Decky Discord Activity) has a special case
  • Added a application_id_from_activity() function, because PS5 activity seems to be missing application_id. Not sure if using activity.name is a good call.

2025-09-21 11:03:11 INFO:oblivionis.bot:Oblivionis is ready
2025-09-21 11:03:18 WARNING:oblivionis.bot:Activity The Last of Us™ Remastered does not have application_id, using name instead...
2025-09-21 11:03:18 INFO:oblivionis.bot:Member djs has started playing The Last of Us™ Remastered (ps5)
2025-09-21 11:03:39 INFO:oblivionis.bot:Member djs has stopped playing The Last of Us™ Remastered (ps5) after 22 seconds
2025-09-21 11:17:43 INFO:oblivionis.bot:Member djs has started playing Balatro (pc)
2025-09-21 11:17:53 INFO:oblivionis.bot:Member djs has stopped playing Balatro (pc) after 8 seconds
oblivionis=# select * from activity;
 id |         timestamp          |      user_id      | game_id | seconds | platform 
----+----------------------------+-------------------+---------+---------+----------
  1 | 2025-09-21 09:01:37.659122 | 84733730387673088 |       2 |      13 | pc
  2 | 2025-09-21 09:03:39.969318 | 84733730387673088 |       5 |      22 | ps5
  3 | 2025-09-21 09:17:53.200166 | 84733730387673088 |       2 |       8 | pc

@Hamuko Hamuko merged commit 1de9b7d into Hamuko:master Sep 21, 2025
1 check failed
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.

2 participants