plexflow 0.0.80__py3-none-any.whl → 0.0.82__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.
@@ -9,6 +9,8 @@ class Torrent(ABC):
9
9
  This is an abstract base class that represents a Torrent.
10
10
  Any class that inherits from this must implement all the properties.
11
11
  """
12
+ _native_dutch_subtitles = []
13
+ _native_english_subtitles = []
12
14
 
13
15
  @property
14
16
  @abstractmethod
@@ -152,11 +154,19 @@ class Torrent(ABC):
152
154
 
153
155
  @property
154
156
  def has_native_dutch_subtitles(self):
155
- return False
157
+ return len(self._native_dutch_subtitles) > 0
156
158
 
157
159
  @property
158
160
  def has_native_english_subtitles(self):
159
- return False
161
+ return len(self._native_english_subtitles) > 0
162
+
163
+ def add_native_dutch_subtitle(self, name: str):
164
+ if len(name.strip()) > 0:
165
+ self._native_dutch_subtitles.append(name)
166
+
167
+ def add_native_english_subtitle(self, name: str):
168
+ if len(name.strip()) > 0:
169
+ self._native_english_subtitles.append(name)
160
170
 
161
171
  @property
162
172
  def is_bad_quality(self):
@@ -48,7 +48,7 @@ class SubtitleSearcher:
48
48
  pattern : re.Pattern
49
49
  a compiled regular expression pattern
50
50
  """
51
- pattern = re.compile(rf'\b(text|subtitles?)\b(.*?)\b({hint_word})\b', re.IGNORECASE | re.DOTALL | re.UNICODE)
51
+ pattern = re.compile(rf'\b(text|subs|subtitles?)\b(.*?)\b({hint_word})\.?\b', re.IGNORECASE | re.DOTALL | re.UNICODE)
52
52
  return pattern
53
53
 
54
54
  def search_subtitles(self, text):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: plexflow
3
- Version: 0.0.80
3
+ Version: 0.0.82
4
4
  Summary: A short description of the package.
5
5
  License: MIT
6
6
  Keywords: keyword1,keyword2,keyword3
@@ -518,7 +518,7 @@ plexflow/core/torrents/results/__pycache__/torrent.cpython-311.pyc,sha256=Sxfylb
518
518
  plexflow/core/torrents/results/__pycache__/torrent.cpython-312.pyc,sha256=gVBo7bTDY_6m9MmdgYy6fcnnoVQkXZiRI2iDANyG5RA,7776
519
519
  plexflow/core/torrents/results/__pycache__/universal.cpython-312.pyc,sha256=fWAmvqL76rp3K0_ydGNEHFJe-05duOvvo76ZpYjZQYE,14162
520
520
  plexflow/core/torrents/results/__pycache__/utils.cpython-312.pyc,sha256=vqEt3jQLzZ-K_E9WV0kKz4K79AScvcg2xyOUTlAcu70,1136
521
- plexflow/core/torrents/results/torrent.py,sha256=vsQNeG0PBMwIiuPhnbgtgnl1q7oGiOCN64ClxQDqPz4,4928
521
+ plexflow/core/torrents/results/torrent.py,sha256=WJD_YcZP7PSIRLz-0EJF8FzW5_vzWu4EZiqQeygF8Dw,5348
522
522
  plexflow/core/torrents/results/universal.py,sha256=ycprOMT1Px8IthmB82YhmnxeNt7P3GAcrOlEkpKoaQk,7706
523
523
  plexflow/core/torrents/results/utils.py,sha256=abiiO_QQYDpA5aMyO8WFPxnGu5sL5xfACezE5bwrnJU,691
524
524
  plexflow/events/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -630,7 +630,7 @@ plexflow/utils/strings/json_extract.py,sha256=590oY1LMnbe9COm3fD6z74OtOzxeXd3Hrf
630
630
  plexflow/utils/strings/language.py,sha256=J9-wqmCdxf9Ws5_X1tV4vX4d7AGkKci0eaBE4Lit0j0,269
631
631
  plexflow/utils/strings/sanitize.py,sha256=V-58iC4-0xIb-dgK595JbPNyyB9jZbY1xHMazXnQyuI,274
632
632
  plexflow/utils/subtitle/__pycache__/search.cpython-312.pyc,sha256=VFulOf14P0m9ncFRxXwENemR8wNolA8xZykpfdAq4eg,3542
633
- plexflow/utils/subtitle/search.py,sha256=MbLJFeU9LDdFnXZXAI86YroBfD4X4Jp0YynLsnEvQ-c,2433
633
+ plexflow/utils/subtitle/search.py,sha256=HW_JOrj-cpRrVnxWh56XjRWhb98E73V1V5QHCq2y7CM,2441
634
634
  plexflow/utils/tasks/__pycache__/decorators.cpython-311.pyc,sha256=8zuAsEfYLEBQQ4DGKqkx-JFCjd73kGhAiPblBNFa2cQ,1675
635
635
  plexflow/utils/tasks/__pycache__/tasks.cpython-311.pyc,sha256=8RRMTHAy-t6yW0rlDX9wpZyO-9Cg4SQoD-NVasL94SQ,1670
636
636
  plexflow/utils/tasks/decorators.py,sha256=1pF3bVFO2YCJd2gFNVYdmaQpbV3nRP1RxJ_OhLU-g7E,3051
@@ -675,7 +675,7 @@ plexflow/utils/video/__pycache__/audio.cpython-312.pyc,sha256=vXBnJwWgTDFdixMBs-
675
675
  plexflow/utils/video/__pycache__/subtitle.cpython-312.pyc,sha256=PCjpCLydGXaRsQy6cikhgsEs8WlComfOoYPiLFqfVMA,2515
676
676
  plexflow/utils/video/audio.py,sha256=tJ_lNwcjVuBQYD5cYOlXpr__eh8-hnReIgNRgIYOpqo,3380
677
677
  plexflow/utils/video/subtitle.py,sha256=LOGONGxs_RzmqtGP-DBKreOzS1eUFEKo75Q6AfnavW0,1290
678
- plexflow-0.0.80.dist-info/METADATA,sha256=Nj8odCgJWmrRxxtDCh4ccAlaooaub7QN4d1xOJD9Itg,2954
679
- plexflow-0.0.80.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
680
- plexflow-0.0.80.dist-info/entry_points.txt,sha256=aEqDHlozu_zjWrl2sibtrqtQHMgU8kSJZrE782CP47g,1362
681
- plexflow-0.0.80.dist-info/RECORD,,
678
+ plexflow-0.0.82.dist-info/METADATA,sha256=p43KOXmcp-N8e8CTqksho8gjNBv5EmF7Hbz2HAda4WU,2954
679
+ plexflow-0.0.82.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
680
+ plexflow-0.0.82.dist-info/entry_points.txt,sha256=aEqDHlozu_zjWrl2sibtrqtQHMgU8kSJZrE782CP47g,1362
681
+ plexflow-0.0.82.dist-info/RECORD,,