cs2tracker 2.1.3__tar.gz → 2.1.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.

Potentially problematic release.


This version of cs2tracker might be problematic. Click here for more details.

Files changed (26) hide show
  1. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/PKG-INFO +1 -1
  2. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/cs2tracker/_version.py +2 -2
  3. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/cs2tracker/scraper.py +13 -8
  4. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/cs2tracker.egg-info/PKG-INFO +1 -1
  5. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/.flake8 +0 -0
  6. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/.gitignore +0 -0
  7. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/.isort.cfg +0 -0
  8. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/.pre-commit-config.yaml +0 -0
  9. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/.pylintrc +0 -0
  10. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/LICENSE.md +0 -0
  11. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/MANIFEST.in +0 -0
  12. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/README.md +0 -0
  13. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/cs2tracker/__init__.py +0 -0
  14. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/cs2tracker/__main__.py +0 -0
  15. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/cs2tracker/application.py +0 -0
  16. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/cs2tracker/constants.py +0 -0
  17. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/cs2tracker/data/config.ini +0 -0
  18. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/cs2tracker/main.py +0 -0
  19. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/cs2tracker.egg-info/SOURCES.txt +0 -0
  20. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/cs2tracker.egg-info/dependency_links.txt +0 -0
  21. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/cs2tracker.egg-info/entry_points.txt +0 -0
  22. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/cs2tracker.egg-info/requires.txt +0 -0
  23. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/cs2tracker.egg-info/top_level.txt +0 -0
  24. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/pyproject.toml +0 -0
  25. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/requirements.txt +0 -0
  26. {cs2tracker-2.1.3 → cs2tracker-2.1.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cs2tracker
3
- Version: 2.1.3
3
+ Version: 2.1.4
4
4
  Summary: Tracking the steam market prices of CS2 items
5
5
  Home-page: https://github.com/ashiven/cs2tracker
6
6
  Author: Jannik Novak
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '2.1.3'
21
- __version_tuple__ = version_tuple = (2, 1, 3)
20
+ __version__ = version = '2.1.4'
21
+ __version_tuple__ = version_tuple = (2, 1, 4)
@@ -28,8 +28,13 @@ from cs2tracker.constants import (
28
28
  MAX_LINE_LEN = 72
29
29
  SEPARATOR = "-"
30
30
  PRICE_INFO = "Owned: {} Steam market price: ${} Total: ${}\n"
31
- BACKGROUND_TASK_NAME = "CS2Tracker Daily Calculation"
32
- BACKGROUND_TASK_TIME = "12:00"
31
+
32
+ WIN_BACKGROUND_TASK_NAME = "CS2Tracker Daily Calculation"
33
+ WIN_BACKGROUND_TASK_SCHEDULE = "DAILY"
34
+ WIN_BACKGROUND_TASK_TIME = "12:00"
35
+ WIN_BACKGROUND_TASK_CMD = (
36
+ f"powershell -WindowStyle Hidden -Command \"Start-Process '{BATCH_FILE}' -WindowStyle Hidden\""
37
+ )
33
38
 
34
39
 
35
40
  class Scraper:
@@ -311,7 +316,7 @@ class Scraper:
311
316
  :return: True if a background task is found, False otherwise.
312
317
  """
313
318
  if sys.platform.startswith("win"):
314
- cmd = ["schtasks", "/query", "/tn", BACKGROUND_TASK_NAME]
319
+ cmd = ["schtasks", "/query", "/tn", WIN_BACKGROUND_TASK_NAME]
315
320
  return_code = call(cmd, stdout=DEVNULL, stderr=DEVNULL)
316
321
  found = return_code == 0
317
322
  return found
@@ -347,13 +352,13 @@ class Scraper:
347
352
  "schtasks",
348
353
  "/create",
349
354
  "/tn",
350
- BACKGROUND_TASK_NAME,
355
+ WIN_BACKGROUND_TASK_NAME,
351
356
  "/tr",
352
- BATCH_FILE,
357
+ WIN_BACKGROUND_TASK_CMD,
353
358
  "/sc",
354
- "DAILY",
359
+ WIN_BACKGROUND_TASK_SCHEDULE,
355
360
  "/st",
356
- BACKGROUND_TASK_TIME,
361
+ WIN_BACKGROUND_TASK_TIME,
357
362
  ]
358
363
  return_code = call(cmd, stdout=DEVNULL, stderr=DEVNULL)
359
364
  if return_code == 0:
@@ -361,7 +366,7 @@ class Scraper:
361
366
  else:
362
367
  self.console.print("[bold red][!] Failed to enable background task.")
363
368
  else:
364
- cmd = ["schtasks", "/delete", "/tn", BACKGROUND_TASK_NAME, "/f"]
369
+ cmd = ["schtasks", "/delete", "/tn", WIN_BACKGROUND_TASK_NAME, "/f"]
365
370
  return_code = call(cmd, stdout=DEVNULL, stderr=DEVNULL)
366
371
  if return_code == 0:
367
372
  self.console.print("[bold green][-] Background task disabled.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cs2tracker
3
- Version: 2.1.3
3
+ Version: 2.1.4
4
4
  Summary: Tracking the steam market prices of CS2 items
5
5
  Home-page: https://github.com/ashiven/cs2tracker
6
6
  Author: Jannik Novak
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