Skip to content

Commit ad82f16

Browse files
Update addon for latest Kodi versions + add Polish language
1 parent 6ced448 commit ad82f16

File tree

8 files changed

+123
-40
lines changed

8 files changed

+123
-40
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ __pycache__/
66
# C extensions
77
*.so
88

9+
.vscode/
10+
911
# Distribution / packaging
1012
.Python
1113
build/
@@ -128,3 +130,5 @@ dmypy.json
128130

129131
# Pyre type checker
130132
.pyre/
133+
134+
script.kodi.geforcenow.zip

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
Kodi addon for launching NVIDIA GeForce NOW app
55

6+
Supports the latest Kodi v20.1 (and probably even newer ones)
7+
68
## Keep in mind
79
- You have to have official NVIDIA GeForce NOW app installed - you can get it [here](https://www.nvidia.com/en-us/geforce-now/download/)
810
- Currently only supports Windows

script.kodi.geforcenow/addon.py

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
import os.path
77
import subprocess
88

9-
ADDON = xbmcaddon.Addon('script.kodi.geforcenow')
10-
ADDON_ID = ADDON.getAddonInfo('id')
11-
ADDON_NAME = ADDON.getAddonInfo('name')
12-
ADDON_VERSION = ADDON.getAddonInfo('version')
9+
ADDON = xbmcaddon.Addon("script.kodi.geforcenow")
10+
ADDON_ID = ADDON.getAddonInfo("id")
11+
ADDON_NAME = ADDON.getAddonInfo("name")
12+
ADDON_VERSION = ADDON.getAddonInfo("version")
1313
MSG = ADDON.getLocalizedString
1414

15-
useCustomExecutable = ADDON.getSetting('useCustomExecutable')
16-
stopMedia = ADDON.getSetting('stopMedia')
15+
useCustomExecutable = ADDON.getSetting("useCustomExecutable")
16+
stopMedia = ADDON.getSetting("stopMedia")
1717

1818

19-
def log(message, level=xbmc.LOGNOTICE):
19+
def log(message, level=xbmc.LOGINFO):
2020
xbmc.log("[{0}:v{1}] {2}".format(ADDON_ID, ADDON_VERSION, message), level)
2121

2222

@@ -53,8 +53,8 @@ def stopMediaPlayback():
5353

5454

5555
def execute(executable):
56-
parameters = ''
57-
log('Calling executable: {0} with parameters: {1}'.format(executable,parameters))
56+
parameters = ""
57+
log("Calling executable: {0} with parameters: {1}".format(executable, parameters))
5858

5959
if stopMedia:
6060
stopMediaPlayback()
@@ -64,28 +64,33 @@ def execute(executable):
6464

6565
log("Starting Addon")
6666

67-
if useCustomExecutable == 'true':
68-
customExecutable = ADDON.getSetting('customExecutable')
67+
if useCustomExecutable == "true":
68+
customExecutable = ADDON.getSetting("customExecutable")
6969
if os.path.isfile(customExecutable):
7070
execute(customExecutable)
7171
else:
72-
log('Executable not found on the custom location provided by user', xbmc.LOGERROR)
72+
log(
73+
"Executable not found on the custom location provided by user",
74+
xbmc.LOGERROR,
75+
)
7376
showCustomExecutableNotFoundDialog()
7477

7578
else:
76-
executable = ''
77-
executableTemp = ''
79+
executable = ""
80+
executableTemp = ""
7881

79-
if platform.system() == 'Windows':
80-
executableTemp = os.path.expandvars(r'%LOCALAPPDATA%\NVIDIA Corporation\GeForceNOW\CEF\GeForceNOW.exe')
82+
if platform.system() == "Windows":
83+
executableTemp = os.path.expandvars(
84+
r"%LOCALAPPDATA%\NVIDIA Corporation\GeForceNOW\CEF\GeForceNOW.exe"
85+
)
8186
if os.path.isfile(executableTemp):
8287
executable = executableTemp
8388
else:
84-
log('Windows executable not found on default paths', xbmc.LOGERROR)
89+
log("Windows executable not found on default paths", xbmc.LOGERROR)
8590
showExecutableNotFoundDialog()
8691
if executable:
8792
execute(executable)
8893

8994
else:
90-
log('Platforms other than Windows are not supported now', xbmc.LOGERROR)
91-
showWindowsNotDetected()
95+
log("Platforms other than Windows are not supported now", xbmc.LOGERROR)
96+
showWindowsNotDetected()

script.kodi.geforcenow/addon.xml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<addon id="script.kodi.geforcenow" name="GeForce NOW" version="1.2.0" provider-name="GanzeVA">
2+
<addon id="script.kodi.geforcenow" name="GeForce NOW" version="2.0.0"
3+
provider-name="ZoltePudeleczko">
34
<requires>
4-
<import addon="xbmc.python" version="2.25.0"/>
5+
<import addon="xbmc.python" version="3.0.0" />
56
</requires>
67
<extension point="xbmc.python.script" library="addon.py">
78
<provides>executable</provides>
@@ -10,16 +11,20 @@
1011
<platform>windx</platform>
1112
<summary lang="en">Kodi Addon for launching GeForce NOW</summary>
1213
<description lang="en">Kodi Addon for launching NVIDIA GeForce NOW app.</description>
14+
<summary lang="pl">Wtyczka do odpalania GeForce NOW</summary>
15+
<description lang="pl">Wtyczka do odpalania aplikacji NVIDIA GeForce NOW.</description>
1316
<license>GNU GENERAL PUBLIC LICENSE. Version 3, 29 June 2007</license>
14-
<language>en</language>
15-
<source>https://github.com/GanzeVA/Kodi-GeForceNOW</source>
16-
<website>https://github.com/GanzeVA/Kodi-GeForceNOW</website>
17-
<forum></forum>
18-
<email>[email protected]</email>
19-
<news></news>
17+
<news>v.2.0 (2023-06-03)
18+
- Assure support with latest Kodi versions (bump xbmc.python libary)
19+
- Add Polish language translation
20+
- Clean-up addon information, update repository url
21+
</news>
22+
<source>https://github.com/ZoltePudeleczko/Kodi-GeForceNOW</source>
23+
<website>https://github.com/ZoltePudeleczko/Kodi-GeForceNOW</website>
24+
<email>[email protected]</email>
2025
<assets>
2126
<icon>icon.png</icon>
2227
<fanart>fanart.jpg</fanart>
2328
</assets>
2429
</extension>
25-
</addon>
30+
</addon>

script.kodi.geforcenow/changelog.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
v.2.0
2+
- Assure support with latest Kodi versions (bump xbmc.python libary)
3+
- Add Polish language translation :poland:
4+
- Clean-up addon information, update repository url
5+
16
v.1.2
27
- Rewrite changelog to markdown file
38
- Update language file
@@ -13,4 +18,4 @@ v.1.0
1318
- English language provided
1419
- Addon finds NVIDIA GeForce NOW in it's default location if installed
1520
- Automatically stops any playback from Kodi
16-
- In settings user can input a custom location
21+
- In settings user can input a custom location

script.kodi.geforcenow/resources/language/English/strings.po renamed to script.kodi.geforcenow/resources/language/resource.language.en_gb/strings.po

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Kodi Media Center language file
22
# Addon Name: Kodi GeForceNOW
33
# Addon id: script.kodi.geforcenow
4-
# Addon Provider: Szymon Zborowski <[email protected]>
4+
# Addon Provider: Szymon Zborowski <[email protected]>
55
msgid ""
66
msgstr ""
77
"Project-Id-Version: script.kodi.geforcenow\n"
8-
"Report-Msgid-Bugs-To: [email protected]\n"
8+
"Report-Msgid-Bugs-To: [email protected]\n"
99
"POT-Creation-Date: 2020-03-02 15:30-0600\n"
10-
"PO-Revision-Date: 2020-03-02 15:30-0600\n"
11-
"Last-Translator: Szymon Zborowski <[email protected]>\n"
12-
"Language-Team: English <[email protected]>\n"
10+
"PO-Revision-Date: 2023-06-03 15:14-0600\n"
11+
"Last-Translator: Szymon Zborowski <[email protected]>\n"
12+
"Language-Team: English <[email protected]>\n"
1313
"MIME-Version: 1.0\n"
1414
"Content-Type: text/plain; charset=UTF-8\n"
1515
"Content-Transfer-Encoding: 8bit\n"
@@ -29,7 +29,7 @@ msgid "Executable not found"
2929
msgstr ""
3030

3131
msgctxt "#32004"
32-
msgid "The NVIDIA GeForceNOW executable was not found on your System on the expected locations."
32+
msgid "The NVIDIA GeForceNOW executable was not found on your System in the expected locations."
3333
msgstr ""
3434

3535
msgctxt "#32005"
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Kodi Media Center language file
2+
# Addon Name: Kodi GeForceNOW
3+
# Addon id: script.kodi.geforcenow
4+
# Addon Provider: Szymon Zborowski <[email protected]>
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: script.kodi.geforcenow\n"
8+
"Report-Msgid-Bugs-To: [email protected]\n"
9+
"POT-Creation-Date: 2020-03-02 15:30-0600\n"
10+
"PO-Revision-Date: 2023-06-03 15:14-0600\n"
11+
"Last-Translator: Szymon Zborowski <[email protected]>\n"
12+
"Language-Team: Polish <[email protected]>\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: 8bit\n"
16+
"Language: pl\n"
17+
"Plural-Forms: nplurals=2; plural=(n != 1);f\n"
18+
19+
msgctxt "#32001"
20+
msgid "Use custom executable:"
21+
msgstr "Użyj innego pliku .exe:"
22+
23+
msgctxt "#32002"
24+
msgid "Custom Executable:"
25+
msgstr "Ścieżka:"
26+
27+
msgctxt "#32003"
28+
msgid "Executable not found"
29+
msgstr "Nie znaleziono pliku .exe"
30+
31+
msgctxt "#32004"
32+
msgid "The NVIDIA GeForceNOW executable was not found on your System in the expected locations."
33+
msgstr "Nie znaleziono zainstalowanego NVIDIA GeForceNOW na komputerze."
34+
35+
msgctxt "#32005"
36+
msgid "Addon Settings"
37+
msgstr "Ustawienia Wtyczki"
38+
39+
msgctxt "#32006"
40+
msgid "Would you like to open the Addon Settings and specify the NVIDIA GeForceNOW location?"
41+
msgstr "Czy chcesz otworzyć ustawienia wtyczki i wybrać lokalizację NVIDIA GeForceNOW?"
42+
43+
msgctxt "#32007"
44+
msgid "Windows Not Detected"
45+
msgstr "Zły system operacyjny"
46+
47+
msgctxt "#32008"
48+
msgid "This Addon currently works only on Windows platforms."
49+
msgstr "Ta wtyczka działa w tym momencie tylko na platformie Windows."
50+
51+
msgctxt "#32009"
52+
msgid "Custom executable not found"
53+
msgstr "Nie znaleziono podanego pliku .exe"
54+
55+
msgctxt "#32010"
56+
msgid "The custom executable was not found. Please select a new location for it on the Addon Settings."
57+
msgstr "Nie znaleziono podanego pliku .exe. Proszę wybrać nową lokalizację w ustawieniach wtyczki."
58+
59+
msgctxt "#32011"
60+
msgid "Stop all media playback on start"
61+
msgstr "Zatrzymaj wszystkie odtwarzane media przy starcie"
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
22
<settings>
3-
<category label="32000">
4-
<setting id="stopMedia" label="32011" type="bool" default="true"/>
5-
<setting id="useCustomExecutable" label="32001" type="bool" default="false"/>
6-
<setting id="customExecutable" label="32002" type="executable" default="" subsetting="true" enable="eq(-1,true)"/>
3+
<category label="32005">
4+
<setting id="stopMedia" label="32011" type="bool" default="true" />
5+
<setting id="useCustomExecutable" label="32001" type="bool" default="false" />
6+
<setting id="customExecutable" label="32002" type="executable" default="" subsetting="true"
7+
enable="eq(-1,true)" />
78
</category>
8-
</settings>
9+
</settings>

0 commit comments

Comments
 (0)