ActionStreamer 0.2.34__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/Config/Config.py +10 -3
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/Event/Event.py +3 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/PKG-INFO +1 -1
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/pyproject.toml +1 -1
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/CommonFunctions/CommonFunctions.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/CommonFunctions/Wifi/Wifi.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/CommonFunctions/Wifi/__init__.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/CommonFunctions/__init__.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/Config/__init__.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/Device/Device.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/Device/__init__.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/Model/Model.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/Model/__init__.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/API/API.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/API/__init__.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/Event/__init__.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/File/File.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/File/__init__.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/Health/Health.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/Health/__init__.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/LogMessage/LogMessage.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/LogMessage/__init__.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/Patch/Patch.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/Patch/__init__.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/VideoClip/VideoClip.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/VideoClip/__init__.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/__init__.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/__init__.py +0 -0
- {actionstreamer-0.2.34 → actionstreamer-0.3.1}/README.md +0 -0
|
@@ -62,7 +62,7 @@ def get_config_folder_path(app_name: str) -> str:
|
|
|
62
62
|
return config_dir
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
def get_appdata_folder_path(app_name: str) -> str:
|
|
65
|
+
def get_appdata_folder_path(app_name: str, base_folder_path: str = '') -> str:
|
|
66
66
|
|
|
67
67
|
if is_windows():
|
|
68
68
|
username = os.getlogin()
|
|
@@ -70,7 +70,10 @@ def get_appdata_folder_path(app_name: str) -> str:
|
|
|
70
70
|
# If a virtual environment is used, the path will be in something like:
|
|
71
71
|
# C:\Users\Username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\Roaming
|
|
72
72
|
else:
|
|
73
|
-
|
|
73
|
+
if base_folder_path:
|
|
74
|
+
appdata_folder_path = os.path.join(base_folder_path, ".appdata", app_name)
|
|
75
|
+
else:
|
|
76
|
+
appdata_folder_path = os.path.expanduser(os.path.join("~", ".appdata", app_name))
|
|
74
77
|
|
|
75
78
|
# Create the directory if it doesn't exist
|
|
76
79
|
if not os.path.exists(appdata_folder_path):
|
|
@@ -79,13 +82,17 @@ def get_appdata_folder_path(app_name: str) -> str:
|
|
|
79
82
|
return appdata_folder_path
|
|
80
83
|
|
|
81
84
|
|
|
82
|
-
def get_config_value(config_folder_path: str, name: str) -> str | None:
|
|
85
|
+
def get_config_value(config_folder_path: str, name: str, default_value: str = '') -> str | None:
|
|
83
86
|
|
|
84
87
|
if not os.path.exists(config_folder_path):
|
|
85
88
|
os.makedirs(config_folder_path)
|
|
86
89
|
|
|
87
90
|
file_path = os.path.join(config_folder_path, name + '.txt')
|
|
88
91
|
|
|
92
|
+
if not os.path.exists(file_path):
|
|
93
|
+
with open(file_path, 'w') as file:
|
|
94
|
+
file.write(default_value)
|
|
95
|
+
|
|
89
96
|
try:
|
|
90
97
|
with open(file_path, 'r') as file:
|
|
91
98
|
contents = file.read()
|
|
@@ -131,6 +131,9 @@ def get_event_details(ws_config: WebServiceConfig, event_id: int) -> WebServiceR
|
|
|
131
131
|
ws_result.http_response_string = response_string
|
|
132
132
|
ws_result.json_data = json.loads(response_string)
|
|
133
133
|
|
|
134
|
+
except json.JSONDecodeError:
|
|
135
|
+
# Ignore JSON decode errors from the line above.
|
|
136
|
+
pass
|
|
134
137
|
except Exception as ex:
|
|
135
138
|
ws_result.code = -1
|
|
136
139
|
filename, line_number = CommonFunctions.get_exception_info()
|
{actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/CommonFunctions/CommonFunctions.py
RENAMED
|
File without changes
|
|
File without changes
|
{actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/CommonFunctions/Wifi/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/LogMessage/LogMessage.py
RENAMED
|
File without changes
|
{actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/LogMessage/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/VideoClip/VideoClip.py
RENAMED
|
File without changes
|
{actionstreamer-0.2.34 → actionstreamer-0.3.1}/ActionStreamer/WebService/VideoClip/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|