Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[service.games.discord.richpresence] 1.0.0 #2267

Open
wants to merge 1 commit into
base: nexus
Choose a base branch
from

Conversation

NikosSiak
Copy link
Member

@NikosSiak NikosSiak commented May 1, 2022

Description

This addon will display what game are you playing and what you are doing in the game at this moment. This is based on the xbmc/xbmc#21286 PR

Checklist:

  • My code follows the add-on rules and piracy stance of this project.
  • I have read the CONTRIBUTING document
  • Each add-on submission should be a single commit with using the following style: [script.foo.bar] 1.0.0

Additional information :

  • Submitting your add-on to this specific branch makes it available to any Kodi version equal or higher than the branch name with the applicable Kodi dependencies limits.
  • add-on development wiki page.
  • Kodi pydocs provide information about the Python API
  • PEP8 codingstyle which is considered best practise but not mandatory.
  • This add-on repository has automated code guideline check which could help you improve your coding. You can find the results of these check at Codacy. You can create your own account as well to continuously monitor your python coding before submitting to repo.
  • Development questions can be asked in the add-on development section on the Kodi forum.

@NikosSiak NikosSiak force-pushed the service.games.discord.richpresence branch from 53ec2cc to f15fcfd Compare May 2, 2022 08:34
<extension point="xbmc.service" library="default.py" />
<extension point="xbmc.addon.metadata">
<platform>all</platform>
<source>https://github.com/NikosSiak/service.games.discord.richpresence</source>
Copy link
Member

Choose a reason for hiding this comment

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

Missing description and summary (en_GB), missing license (spdx identifier). See example: https://github.com/xbmc/xbmc/blob/master/addons/service.xbmc.versioncheck/addon.xml

@@ -0,0 +1,37 @@
import xbmc
Copy link
Member

Choose a reason for hiding this comment

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

usually it's a good practice to keep this file (as the main entrypoint) as small as possible. Reason is the fact this is the only file that is not compiled to bytecode.
Can you move this to resources/lib/richpresence.py and in this file simply import and run?

from resources.lib.richpresence import mystuff

mystuff.run()

There's a warning for this in addon checker

startTime = -1
gameStarted = False

while True:
Copy link
Member

Choose a reason for hiding this comment

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

while not monitor.abortRequested():
    if monitor.abortRequested():
        break
    your stuff
    monitor.waitForAbort(5)

@NikosSiak NikosSiak force-pushed the service.games.discord.richpresence branch from f15fcfd to 4be8681 Compare May 2, 2022 11:16
@NikosSiak NikosSiak force-pushed the service.games.discord.richpresence branch from 4be8681 to d333bfa Compare May 2, 2022 11:27
@NikosSiak NikosSiak requested a review from enen92 May 2, 2022 11:28
@@ -0,0 +1,99 @@
import os
Copy link
Member

Choose a reason for hiding this comment

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

the dummy __init__.py is no longer needed in python3, can you drop it from the submission?

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

Successfully merging this pull request may close these issues.

None yet

3 participants