simkl-mps 2.3.2__tar.gz → 2.3.4__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.
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/PKG-INFO +1 -1
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/pyproject.toml +1 -1
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/__init__.py +1 -1
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/credentials.py +13 -59
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/LICENSE +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/README.md +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps (Custom).png +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps-128.png +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps-16.png +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps-24.png +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps-256.png +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps-32.png +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps-48.png +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps-64.png +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps-error.ico +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps-error.png +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps-paused.ico +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps-paused.png +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps-running.ico +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps-running.png +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps-stopped.ico +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps-stopped.png +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps.ico +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/assets/simkl-mps.png +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/backlog_cleaner.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/cli.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/compatibility_patches.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/config_manager.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/main.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/media_cache.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/media_scrobbler.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/media_tracker.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/migration.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/monitor.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/players/__init__.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/players/mpc.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/players/mpcqt.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/players/mpv.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/players/mpv_wrappers.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/players/potplayer.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/players/vlc.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/simkl_api.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/tray_app.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/tray_base.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/tray_linux.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/tray_mac.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/tray_win.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/utils/__init__.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/utils/constants.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/utils/linux_tray_diagnostics.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/utils/path_filter.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/utils/updater.ps1 +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/utils/updater.sh +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/watch-history-viewer/fonts/Inter-Bold.woff2 +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/watch-history-viewer/fonts/Inter-Medium.woff2 +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/watch-history-viewer/fonts/Inter-Regular.woff2 +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/watch-history-viewer/fonts/Inter-SemiBold.woff2 +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/watch-history-viewer/fonts.css +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/watch-history-viewer/index.html +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/watch-history-viewer/script.js +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/watch-history-viewer/style.css +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/watch_history_manager.py +0 -0
- {simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/window_detection.py +0 -0
|
@@ -28,43 +28,6 @@ CLIENT_SECRET_PLACEHOLDER = "1e2781d773564774c6788bf64b871374b2cee2b31eaed361488
|
|
|
28
28
|
SIMKL_CLIENT_ID = CLIENT_ID_PLACEHOLDER
|
|
29
29
|
SIMKL_CLIENT_SECRET = CLIENT_SECRET_PLACEHOLDER
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
def _is_placeholder_credential(value: str, placeholder: str = None) -> bool:
|
|
33
|
-
"""
|
|
34
|
-
Return True when a credential is missing or still a build/runtime placeholder.
|
|
35
|
-
|
|
36
|
-
Checks for:
|
|
37
|
-
- Empty/None values
|
|
38
|
-
- Exact placeholder matches (if placeholder provided)
|
|
39
|
-
"""
|
|
40
|
-
if not value:
|
|
41
|
-
return True
|
|
42
|
-
|
|
43
|
-
normalized = str(value).strip().strip('"').strip("'")
|
|
44
|
-
|
|
45
|
-
# Check exact placeholder if provided (for build-injected constants)
|
|
46
|
-
if placeholder and normalized == placeholder:
|
|
47
|
-
return True
|
|
48
|
-
|
|
49
|
-
# Check common placeholder literals from env/config.
|
|
50
|
-
# Keep checks strict to avoid false positives for real secret values.
|
|
51
|
-
placeholder_literals = {
|
|
52
|
-
"placeholder",
|
|
53
|
-
"simkl_client_id",
|
|
54
|
-
"simkl_client_secret",
|
|
55
|
-
"simkl_client_id_placeholder",
|
|
56
|
-
"simkl_client_secret_placeholder",
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
normalized_lower = normalized.lower()
|
|
60
|
-
if normalized_lower in placeholder_literals:
|
|
61
|
-
return True
|
|
62
|
-
|
|
63
|
-
if normalized_lower.startswith("simkl_client_") and normalized_lower.endswith("_placeholder"):
|
|
64
|
-
return True
|
|
65
|
-
|
|
66
|
-
return False
|
|
67
|
-
|
|
68
31
|
APP_NAME_FOR_PATH = "simkl-mps"
|
|
69
32
|
USER_SUBDIR_FOR_PATH = "kavin" # Updated from kavinthangavel
|
|
70
33
|
try:
|
|
@@ -110,9 +73,9 @@ def get_credentials():
|
|
|
110
73
|
client_id = None
|
|
111
74
|
client_secret = None
|
|
112
75
|
|
|
113
|
-
if
|
|
76
|
+
if SIMKL_CLIENT_ID and SIMKL_CLIENT_ID != CLIENT_ID_PLACEHOLDER:
|
|
114
77
|
client_id = SIMKL_CLIENT_ID
|
|
115
|
-
if
|
|
78
|
+
if SIMKL_CLIENT_SECRET and SIMKL_CLIENT_SECRET != CLIENT_SECRET_PLACEHOLDER:
|
|
116
79
|
client_secret = SIMKL_CLIENT_SECRET
|
|
117
80
|
|
|
118
81
|
if client_id and client_secret:
|
|
@@ -120,13 +83,13 @@ def get_credentials():
|
|
|
120
83
|
else:
|
|
121
84
|
logger.debug("Build-injected credentials missing/placeholder, trying runtime sources...")
|
|
122
85
|
|
|
123
|
-
# Check environment variables
|
|
86
|
+
# Check environment variables
|
|
124
87
|
env_client_id = os.environ.get("SIMKL_CLIENT_ID")
|
|
125
88
|
env_client_secret = os.environ.get("SIMKL_CLIENT_SECRET")
|
|
126
89
|
|
|
127
|
-
if env_client_id
|
|
90
|
+
if env_client_id:
|
|
128
91
|
client_id = env_client_id
|
|
129
|
-
if env_client_secret
|
|
92
|
+
if env_client_secret:
|
|
130
93
|
client_secret = env_client_secret
|
|
131
94
|
|
|
132
95
|
# Fall back to app env file used by end users (.simkl_mps.env)
|
|
@@ -135,13 +98,12 @@ def get_credentials():
|
|
|
135
98
|
logger.debug(f"Loading runtime credentials from {env_file_path}")
|
|
136
99
|
runtime_config = dotenv_values(env_file_path)
|
|
137
100
|
|
|
138
|
-
# Validate credentials from runtime config file against placeholders
|
|
139
101
|
runtime_client_id = runtime_config.get("SIMKL_CLIENT_ID")
|
|
140
102
|
runtime_client_secret = runtime_config.get("SIMKL_CLIENT_SECRET")
|
|
141
103
|
|
|
142
|
-
if runtime_client_id
|
|
104
|
+
if runtime_client_id:
|
|
143
105
|
client_id = client_id or runtime_client_id
|
|
144
|
-
if runtime_client_secret
|
|
106
|
+
if runtime_client_secret:
|
|
145
107
|
client_secret = client_secret or runtime_client_secret
|
|
146
108
|
|
|
147
109
|
# Final fallback for local development
|
|
@@ -149,13 +111,12 @@ def get_credentials():
|
|
|
149
111
|
logger.debug(f"Loading development credentials from {DEV_CREDS_PATH}")
|
|
150
112
|
dev_config = dotenv_values(DEV_CREDS_PATH)
|
|
151
113
|
|
|
152
|
-
# Validate credentials from dev config against placeholders
|
|
153
114
|
dev_client_id = dev_config.get("SIMKL_CLIENT_ID")
|
|
154
115
|
dev_client_secret = dev_config.get("SIMKL_CLIENT_SECRET")
|
|
155
116
|
|
|
156
|
-
if dev_client_id
|
|
117
|
+
if dev_client_id:
|
|
157
118
|
client_id = client_id or dev_client_id
|
|
158
|
-
if dev_client_secret
|
|
119
|
+
if dev_client_secret:
|
|
159
120
|
client_secret = client_secret or dev_client_secret
|
|
160
121
|
|
|
161
122
|
access_token = None
|
|
@@ -165,24 +126,17 @@ def get_credentials():
|
|
|
165
126
|
logger.debug(f"Reading credentials from {env_file_path} inside get_credentials()")
|
|
166
127
|
config = dotenv_values(env_file_path)
|
|
167
128
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
if raw_access_token and not _is_placeholder_credential(raw_access_token):
|
|
171
|
-
access_token = raw_access_token
|
|
172
|
-
|
|
173
|
-
# Validate user ID against placeholders
|
|
174
|
-
raw_user_id = config.get("SIMKL_USER_ID")
|
|
175
|
-
if raw_user_id and not _is_placeholder_credential(raw_user_id):
|
|
176
|
-
user_id = raw_user_id
|
|
129
|
+
access_token = config.get("SIMKL_ACCESS_TOKEN")
|
|
130
|
+
user_id = config.get("SIMKL_USER_ID")
|
|
177
131
|
|
|
178
132
|
if user_id:
|
|
179
133
|
logger.debug(f"Found user ID in env file: {user_id}")
|
|
180
134
|
else:
|
|
181
|
-
logger.debug("User ID not found in env file
|
|
135
|
+
logger.debug("User ID not found in env file")
|
|
182
136
|
|
|
183
137
|
if not access_token:
|
|
184
138
|
logger.warning(
|
|
185
|
-
f"Found env file at {env_file_path}, but SIMKL_ACCESS_TOKEN key is missing
|
|
139
|
+
f"Found env file at {env_file_path}, but SIMKL_ACCESS_TOKEN key is missing or empty."
|
|
186
140
|
)
|
|
187
141
|
else:
|
|
188
142
|
logger.debug(f"Env file not found at {env_file_path} inside get_credentials()")
|
|
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
|
|
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
|
|
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
|
|
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
|
{simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/watch-history-viewer/fonts/Inter-Regular.woff2
RENAMED
|
File without changes
|
{simkl_mps-2.3.2 → simkl_mps-2.3.4}/simkl_mps/watch-history-viewer/fonts/Inter-SemiBold.woff2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|