wi1-bot 1.4.2__py3-none-any.whl → 1.4.3__py3-none-any.whl

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.
wi1_bot/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.4.2'
16
- __version_tuple__ = version_tuple = (1, 4, 2)
15
+ __version__ = version = '1.4.3'
16
+ __version_tuple__ = version_tuple = (1, 4, 3)
wi1_bot/config.py CHANGED
@@ -4,20 +4,21 @@ from typing import TypedDict
4
4
 
5
5
  import yaml
6
6
 
7
- _config_path: str | None = None
7
+ _config_path = os.getenv("WB_CONFIG_PATH")
8
8
 
9
- if home := os.getenv("HOME"):
10
- _path = pathlib.Path(home) / ".config" / "wi1-bot" / "config.yaml"
11
- if _path.is_file():
12
- _config_path = str(_path.resolve())
9
+ if _config_path is None:
10
+ if home := os.getenv("HOME"):
11
+ _path = pathlib.Path(home) / ".config" / "wi1-bot" / "config.yaml"
12
+ if _path.is_file():
13
+ _config_path = str(_path.resolve())
13
14
 
14
- if xdg_config_home := os.getenv("XDG_CONFIG_HOME"):
15
- _path = pathlib.Path(xdg_config_home) / "wi1-bot" / "config.yaml"
16
- if _path.is_file():
17
- _config_path = str(_path.resolve())
15
+ if xdg_config_home := os.getenv("XDG_CONFIG_HOME"):
16
+ _path = pathlib.Path(xdg_config_home) / "wi1-bot" / "config.yaml"
17
+ if _path.is_file():
18
+ _config_path = str(_path.resolve())
18
19
 
19
- if pathlib.Path("config.yaml").is_file():
20
- _config_path = "config.yaml"
20
+ if pathlib.Path("config.yaml").is_file():
21
+ _config_path = "config.yaml"
21
22
 
22
23
  if _config_path is None:
23
24
  raise FileNotFoundError(
@@ -127,3 +128,9 @@ class Config(ConfigOptional):
127
128
 
128
129
  with open(_config_path, "r") as f:
129
130
  config: Config = yaml.load(f, Loader=yaml.SafeLoader)
131
+
132
+ if log_dir := os.getenv("WB_LOG_DIR"):
133
+ if "general" not in config:
134
+ config["general"] = {}
135
+
136
+ config["general"]["log_dir"] = log_dir
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wi1-bot
3
- Version: 1.4.2
3
+ Version: 1.4.3
4
4
  Summary: Discord bot for Radarr/Sonarr integration
5
5
  Home-page: https://github.com/wthueb/wi1-bot
6
6
  Author-email: William Huebner <wilhueb@gmail.com>
@@ -36,7 +36,7 @@ Description-Content-Type: text/markdown
36
36
  License-File: LICENSE
37
37
  Requires-Dist: discord.py ==2.3.2
38
38
  Requires-Dist: Flask ==3.0.2
39
- Requires-Dist: mongoengine ==0.28.0
39
+ Requires-Dist: mongoengine ==0.28.1
40
40
  Requires-Dist: pyarr ==5.2.0
41
41
  Requires-Dist: PyYAML ==6.0.1
42
42
  Requires-Dist: requests ==2.31.0
@@ -1,6 +1,6 @@
1
1
  wi1_bot/__init__.py,sha256=11ozJKiUsqDCZ3_mcAHhGYUyGK_Unl54djVSBBExFB4,59
2
- wi1_bot/_version.py,sha256=tX44urJsC0QN5SJ51xsM0HeojA_8Xx7NXFEGAkYlNE4,411
3
- wi1_bot/config.py,sha256=YmO_wLHMBm0PmFEeRru4Y3H4B1a2heDbSHU_sEcgfHs,2916
2
+ wi1_bot/_version.py,sha256=cUUlK35wR7qLNaS4SMOrkRP_HG0nSHq0YEIezhPHr3c,411
3
+ wi1_bot/config.py,sha256=AtzOXvCeat_lb-w_Wy37XyWIpV3LmKh38OGigluJ2nM,3139
4
4
  wi1_bot/push.py,sha256=-Az8c21R3IZAkJVRQmWsbNXMfvBzzpc9pFTWsDy1mJE,789
5
5
  wi1_bot/webhook.py,sha256=cVp6USg1vbfL05TPQSDIUUYPHWDjuPGb1IGsqImao6s,4713
6
6
  wi1_bot/arr/__init__.py,sha256=ZIgkW24GBdS4sJmaiEIhueHOB6s2L8y2s9ahgp1USRI,86
@@ -22,9 +22,9 @@ wi1_bot/scripts/transcode_item.py,sha256=21MeeIZ9wIRhAY-FOEgOdPsg6YOLlSUj59r8NkT
22
22
  wi1_bot/transcoder/__init__.py,sha256=B4xr82UtIFc3tyy_MEZdZKMukYW0yejPnfsGowaTIM0,105
23
23
  wi1_bot/transcoder/transcode_queue.py,sha256=W7r2I7OD8QuxseCEb7_ddOvYXiBBLmKLvCs2IgJJ92I,1856
24
24
  wi1_bot/transcoder/transcoder.py,sha256=3MiOnQaXHmS6oQsNEygd9-SeGH7nIipnTK2f7BJFB6Q,8684
25
- wi1_bot-1.4.2.dist-info/LICENSE,sha256=6V4_mQoPoLJl77_WMsQRQMDG2mnIhDUdfCmMkqM9Qwc,1072
26
- wi1_bot-1.4.2.dist-info/METADATA,sha256=6LkLpNIuvRfDesYyFwIgc-Bc3_SonPsSfB3NMlnG4Og,4517
27
- wi1_bot-1.4.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
28
- wi1_bot-1.4.2.dist-info/entry_points.txt,sha256=G_NEW2uMHHw4pbmVwGZ6cZaBwGpdkv741jNYtuX-1vM,147
29
- wi1_bot-1.4.2.dist-info/top_level.txt,sha256=Q7mTnPLk80Td82YbjlBMO5tvXJoTFHhheHdmwc-c-7I,8
30
- wi1_bot-1.4.2.dist-info/RECORD,,
25
+ wi1_bot-1.4.3.dist-info/LICENSE,sha256=6V4_mQoPoLJl77_WMsQRQMDG2mnIhDUdfCmMkqM9Qwc,1072
26
+ wi1_bot-1.4.3.dist-info/METADATA,sha256=niCQgmOgYsWFR6wp5Ya6aZkhV0MHoaOHJ_CzA5mut3Y,4517
27
+ wi1_bot-1.4.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
28
+ wi1_bot-1.4.3.dist-info/entry_points.txt,sha256=G_NEW2uMHHw4pbmVwGZ6cZaBwGpdkv741jNYtuX-1vM,147
29
+ wi1_bot-1.4.3.dist-info/top_level.txt,sha256=Q7mTnPLk80Td82YbjlBMO5tvXJoTFHhheHdmwc-c-7I,8
30
+ wi1_bot-1.4.3.dist-info/RECORD,,