wi1-bot 2.0.1__tar.gz → 2.0.2__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.
Files changed (41) hide show
  1. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/PKG-INFO +2 -1
  2. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/README.md +1 -0
  3. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/transcoder/transcoder.py +14 -2
  4. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/.dockerignore +0 -0
  5. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/.envrc +0 -0
  6. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/.github/workflows/docker.yaml +0 -0
  7. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/.github/workflows/pypi-publish.yml +0 -0
  8. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/.gitignore +0 -0
  9. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/.pre-commit-config.yaml +0 -0
  10. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/Dockerfile +0 -0
  11. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/LICENSE +0 -0
  12. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/compose.yaml +0 -0
  13. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/config.yaml.template +0 -0
  14. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/flake.nix +0 -0
  15. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/pyproject.toml +0 -0
  16. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/tests/movie_downloaded.py +0 -0
  17. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/uv.lock +0 -0
  18. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/__init__.py +0 -0
  19. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/arr/__init__.py +0 -0
  20. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/arr/download.py +0 -0
  21. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/arr/episode.py +0 -0
  22. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/arr/movie.py +0 -0
  23. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/arr/radarr.py +0 -0
  24. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/arr/sonarr.py +0 -0
  25. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/arr/util.py +0 -0
  26. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/config.py +0 -0
  27. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/discord/__init__.py +0 -0
  28. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/discord/bot.py +0 -0
  29. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/discord/cogs/__init__.py +0 -0
  30. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/discord/cogs/movie.py +0 -0
  31. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/discord/cogs/series.py +0 -0
  32. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/discord/helpers.py +0 -0
  33. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/push.py +0 -0
  34. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/scripts/__init__.py +0 -0
  35. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/scripts/add_tag.py +0 -0
  36. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/scripts/rescan.py +0 -0
  37. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/scripts/start.py +0 -0
  38. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/scripts/transcode_item.py +0 -0
  39. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/transcoder/__init__.py +0 -0
  40. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/transcoder/transcode_queue.py +0 -0
  41. {wi1_bot-2.0.1 → wi1_bot-2.0.2}/wi1_bot/webhook.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wi1-bot
3
- Version: 2.0.1
3
+ Version: 2.0.2
4
4
  Summary: Discord bot for Radarr/Sonarr integration
5
5
  Project-URL: Homepage, https://github.com/wthueb/wi1-bot
6
6
  Author-email: William Huebner <wilhueb@gmail.com>
@@ -39,6 +39,7 @@ Requires Python >=3.11.
39
39
 
40
40
  ### TODO
41
41
 
42
+ - use overseerr for search/requests
42
43
  - use sqlite
43
44
  - dynamically copy streams
44
45
  - i.e. if mov_text in input, -c:s srt
@@ -19,6 +19,7 @@ Requires Python >=3.11.
19
19
 
20
20
  ### TODO
21
21
 
22
+ - use overseerr for search/requests
22
23
  - use sqlite
23
24
  - dynamically copy streams
24
25
  - i.e. if mov_text in input, -c:s srt
@@ -1,5 +1,6 @@
1
1
  import logging
2
2
  import pathlib
3
+ import re
3
4
  import shlex
4
5
  import shutil
5
6
  import subprocess
@@ -14,6 +15,14 @@ from wi1_bot.config import config
14
15
 
15
16
  from .transcode_queue import TranscodeItem, queue
16
17
 
18
+ # https://github.com/Radarr/Radarr/blob/e29be26fc9a5570bdf37a1b9504b3c0162be7715/src/NzbDrone.Core/Parser/Parser.cs#L134
19
+ CLEAN_RELEASE_GROUP_REGEX = re.compile(
20
+ r"(-(RP|1|NZBGeek|Obfuscated|Obfuscation|Scrambled|sample|Pre|postbot|xpost|Rakuv[a-z0-9]*|WhiteRev|BUYMORE|AsRequested|AlternativeToRequested|GEROV|Z0iDS3N|Chamele0n|4P|4Planet|AlteZachen|RePACKPOST))+",
21
+ re.IGNORECASE,
22
+ )
23
+ # https://github.com/Radarr/Radarr/blob/e29be26fc9a5570bdf37a1b9504b3c0162be7715/src/NzbDrone.Core/Parser/Parser.cs#L138
24
+ CLEAN_TORRENT_SUFFIX_REGEX = re.compile(r"\[(?:ettv|rartv|rarbg|cttv|publichd)\]", re.IGNORECASE)
25
+
17
26
 
18
27
  class SignalInterrupt(Exception):
19
28
  pass
@@ -76,7 +85,10 @@ class Transcoder:
76
85
  tmp_folder = pathlib.Path("/tmp/wi1-bot")
77
86
  tmp_folder.mkdir(exist_ok=True)
78
87
 
79
- transcode_to = tmp_folder / f"{path.stem}-TRANSCODED.mkv"
88
+ filename = path.stem
89
+ filename = CLEAN_RELEASE_GROUP_REGEX.sub("", filename)
90
+ filename = CLEAN_TORRENT_SUFFIX_REGEX.sub("", filename)
91
+ transcode_to = tmp_folder / f"{filename}-TRANSCODED.mkv"
80
92
 
81
93
  command = self._build_ffmpeg_command(item, transcode_to)
82
94
 
@@ -273,4 +285,4 @@ class Transcoder:
273
285
  if __name__ == "__main__":
274
286
  logging.basicConfig(level=logging.DEBUG)
275
287
  t = Transcoder()
276
- t._worker()
288
+ t._worker() # pyright: ignore[reportPrivateUsage]
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