Skip to content

Commit e74a8b6

Browse files
committed
build.py fix & kofi.py with statelist
• fixed issue with statelist not being defined properly • fixed issue with build.py not including ngrok
1 parent 3f4d371 commit e74a8b6

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Kofi_Plugin_v100_Windows.zip

10.3 MB
Binary file not shown.

src/Kofi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ def handleSubscription(data):
9898
statelist = []
9999
readable_timestamp = formatTimestamp(data['timestamp'])
100100

101-
statelist.extend[
101+
statelist.extend([
102102
{"id":PLUGIN_ID + ".subscription.timestamp", "value":readable_timestamp},
103103
{"id":PLUGIN_ID + ".subscription.from_name", "value":data['from_name']},
104104
{"id":PLUGIN_ID + ".subscription.message", "value":data['message'] if data.get('message') is not None else ""},
105105
{"id":PLUGIN_ID + ".subscription.amount", "value":data['amount'] if data.get('amount') is not None else ""}
106-
]
106+
])
107107

108108
# first time subscription
109109
if data.get('is_first_subscription_payment'):

src/build.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11

22
from TouchPortalAPI import tppbuild
33
from TPPEntry import PLUGIN_NAME, PLUGIN_FOLDER, PLUGIN_ICON, __version__
4+
import os
45

6+
script_dir = os.path.dirname(os.path.realpath(__file__))
57

68

79
PLUGIN_MAIN = f"{PLUGIN_NAME}.py"
@@ -32,9 +34,10 @@
3234

3335

3436
ADDITIONAL_FILES = [
35-
"start.sh",
36-
"../ngrok.exe"
37-
]
37+
os.path.normpath(os.path.join(script_dir, "start.sh")),
38+
os.path.normpath(os.path.join(script_dir, "../ngrok.exe"))
39+
]
40+
3841

3942
if PLUGIN_ICON != "":
4043
ADDITIONAL_FILES.append(PLUGIN_ICON)
@@ -47,6 +50,8 @@
4750
# "--noconsole"
4851
]
4952

53+
54+
5055
# validateBuild()
5156

5257
if __name__ == "__main__":

0 commit comments

Comments
 (0)