wi1-bot 1.4.2__tar.gz → 1.4.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.
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/.github/workflows/pypi-publish.yml +1 -1
- wi1-bot-1.4.4/.gitignore +8 -0
- wi1-bot-1.4.4/Dockerfile +20 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/PKG-INFO +2 -1
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/README.md +1 -0
- wi1-bot-1.4.4/compose.yaml +16 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/config.yaml.template +1 -1
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/pyproject.toml +1 -1
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/_version.py +2 -2
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/config.py +18 -11
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/transcoder/transcoder.py +4 -1
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot.egg-info/PKG-INFO +2 -1
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot.egg-info/SOURCES.txt +3 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot.egg-info/requires.txt +1 -1
- /wi1-bot-1.4.2/.gitignore → /wi1-bot-1.4.4/.dockerignore +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/.pre-commit-config.yaml +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/.vscode/launch.json +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/.vscode/settings.json +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/LICENSE +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/setup.cfg +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/tests/movie_downloaded.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/__init__.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/arr/__init__.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/arr/download.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/arr/episode.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/arr/movie.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/arr/radarr.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/arr/sonarr.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/discord/__init__.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/discord/bot.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/discord/cogs/__init__.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/discord/cogs/movie.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/discord/cogs/series.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/discord/helpers.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/push.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/scripts/__init__.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/scripts/add_tag.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/scripts/start.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/scripts/transcode_item.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/transcoder/__init__.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/transcoder/transcode_queue.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot/webhook.py +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot.egg-info/dependency_links.txt +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot.egg-info/entry_points.txt +0 -0
- {wi1-bot-1.4.2 → wi1-bot-1.4.4}/wi1_bot.egg-info/top_level.txt +0 -0
wi1-bot-1.4.4/.gitignore
ADDED
wi1-bot-1.4.4/Dockerfile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
FROM python:3.10
|
2
|
+
|
3
|
+
RUN apt-get update && apt-get install -y ffmpeg
|
4
|
+
|
5
|
+
WORKDIR /app
|
6
|
+
|
7
|
+
COPY . .
|
8
|
+
|
9
|
+
RUN pip install .
|
10
|
+
|
11
|
+
ENV WB_CONFIG_PATH=/app/config/config.yaml
|
12
|
+
ENV WB_LOG_DIR=/app/logs
|
13
|
+
|
14
|
+
RUN mkdir -p config
|
15
|
+
RUN mkdir -p logs
|
16
|
+
|
17
|
+
EXPOSE 9000
|
18
|
+
|
19
|
+
ENTRYPOINT ["python", "-m", "wi1_bot.scripts.start"]
|
20
|
+
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: wi1-bot
|
3
|
-
Version: 1.4.
|
3
|
+
Version: 1.4.4
|
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>
|
@@ -57,6 +57,7 @@ Requires Python >=3.10.
|
|
57
57
|
|
58
58
|
### TODO
|
59
59
|
|
60
|
+
- use sqlite
|
60
61
|
- have config.discord.users be a dict with 'quotas' and 'name' for *arr tags
|
61
62
|
- Better pushover notifications
|
62
63
|
- Failures for pretty much everything
|
@@ -0,0 +1,16 @@
|
|
1
|
+
services:
|
2
|
+
wi1-bot:
|
3
|
+
container_name: wi1-bot
|
4
|
+
image: wthueb/wi1-bot
|
5
|
+
runtime: nvidia
|
6
|
+
deploy:
|
7
|
+
resources:
|
8
|
+
reservations:
|
9
|
+
devices:
|
10
|
+
- capabilities:
|
11
|
+
- gpu
|
12
|
+
environment:
|
13
|
+
- WB_CONFIG_PATH=/data/config.yaml
|
14
|
+
- WB_LOG_PATH=/data/logs
|
15
|
+
volumes:
|
16
|
+
- .:/data
|
@@ -4,20 +4,21 @@ from typing import TypedDict
|
|
4
4
|
|
5
5
|
import yaml
|
6
6
|
|
7
|
-
_config_path
|
7
|
+
_config_path = os.getenv("WB_CONFIG_PATH")
|
8
8
|
|
9
|
-
if
|
10
|
-
|
11
|
-
|
12
|
-
|
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
|
-
|
16
|
-
|
17
|
-
|
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
|
-
|
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
|
@@ -112,7 +112,10 @@ class Transcoder:
|
|
112
112
|
if status != 0:
|
113
113
|
self.logger.error(f"ffmpeg failed (status {status}): {last_output}")
|
114
114
|
|
115
|
-
if
|
115
|
+
if (
|
116
|
+
"No such file or directory" in last_output
|
117
|
+
and "shared object file" not in last_output
|
118
|
+
):
|
116
119
|
self.logger.debug(
|
117
120
|
f"file does not exist: {path}, skipping transcoding"
|
118
121
|
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: wi1-bot
|
3
|
-
Version: 1.4.
|
3
|
+
Version: 1.4.4
|
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>
|
@@ -57,6 +57,7 @@ Requires Python >=3.10.
|
|
57
57
|
|
58
58
|
### TODO
|
59
59
|
|
60
|
+
- use sqlite
|
60
61
|
- have config.discord.users be a dict with 'quotas' and 'name' for *arr tags
|
61
62
|
- Better pushover notifications
|
62
63
|
- Failures for pretty much everything
|
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
|