plexflow 0.0.74__py3-none-any.whl → 0.0.75__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.
@@ -8,3 +8,4 @@ from plexflow.core.context.partials.tgx_context import TgxRequestContext
8
8
  from plexflow.core.context.partials.tgx_batch import TgxBatch
9
9
  from plexflow.core.context.partials.reports import TorrentAnalysisReports
10
10
  from plexflow.core.context.partials.subtitles import Subtitles
11
+ from plexflow.core.context.partials.universal_torrents import UniversalTorrents
@@ -0,0 +1,23 @@
1
+ from plexflow.core.context.partial_context import PartialContext
2
+ from datetime import datetime as dt
3
+ from plexflow.core.torrents.results.universal import UniversalTorrent
4
+ from typing import List
5
+
6
+ class UniversalTorrents(PartialContext):
7
+ def __init__(self, **kwargs) -> None:
8
+ super().__init__(**kwargs)
9
+
10
+ @property
11
+ def sources(self) -> list[str]:
12
+ keys = self.get_keys("universal/torrents/*")
13
+ # extract the source from the key
14
+ return [key.split("/")[-1] for key in keys]
15
+
16
+ def from_source(self, source: str) -> List[UniversalTorrent]:
17
+ return self.get(f"universal/torrents/{source}")
18
+
19
+ def update(self, torrents: List[UniversalTorrent]):
20
+ if len(torrents) == 0:
21
+ return
22
+ source = next(iter(torrents)).source
23
+ self.set(f"universal/torrents/{source}", torrents)
@@ -185,7 +185,7 @@ class UniversalTorrent:
185
185
  Returns:
186
186
  bool: True if the universal torrent is compatible with the subtitle, False otherwise.
187
187
  """
188
- return any(s.name == t.release_name or s.encoder == t.encoder_name for t in self.torrents)
188
+ return any(s.release_name.lower().strip() == t.release_name.lower().strip() or s.parsed_release_name[''] == t.encoder_name for t in self.torrents)
189
189
 
190
190
  def __eq__(self, other):
191
191
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: plexflow
3
- Version: 0.0.74
3
+ Version: 0.0.75
4
4
  Summary: A short description of the package.
5
5
  License: MIT
6
6
  Keywords: keyword1,keyword2,keyword3
@@ -20,7 +20,7 @@ plexflow/core/context/metadata/tmdb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQ
20
20
  plexflow/core/context/metadata/tmdb/__pycache__/context.cpython-311.pyc,sha256=dcvTi-0PnZfbLfsLu5QuX_jpAeQYmZR7ZbjzQMHQov4,2627
21
21
  plexflow/core/context/metadata/tmdb/context.py,sha256=zlI_Zs_1bAdR60xtl4j2_UBhIery1VcsQz2a53l5g20,1521
22
22
  plexflow/core/context/partial_context.py,sha256=Ptad0ZLRgE0FPIJlYzPIGCtrOlxU1mJzScaXzENlgY8,2010
23
- plexflow/core/context/partials/__init__.py,sha256=RJP27rewrn4uKsanH3LSDb4dxg0p10D7uRfdJshXvSc,619
23
+ plexflow/core/context/partials/__init__.py,sha256=QuEI9UwFrymP0LWtU2GKoign3HdkUpoC9HBEA2MvfCo,699
24
24
  plexflow/core/context/partials/__pycache__/__init__.cpython-311.pyc,sha256=x_5HUdt-0vrq9LMmc8Vj0usxqQ_ZHD4WZd4HrvhwAZc,346
25
25
  plexflow/core/context/partials/__pycache__/ids.cpython-311.pyc,sha256=wV7r4FAwonAshns-NGcowqGamtrM_Q_2NbiHQhOLkjg,2638
26
26
  plexflow/core/context/partials/__pycache__/watchlist.cpython-311.pyc,sha256=k-0BM-AvH-zObpwY0XR8CYrT21kPEa0fmeBmf0wscE0,1466
@@ -33,6 +33,7 @@ plexflow/core/context/partials/subtitles.py,sha256=Eax0rdGeTqEHkt9KNiyv097X3I1Dr
33
33
  plexflow/core/context/partials/tgx_batch.py,sha256=TduB09oBOQ8CtmPYsHIeNe7AI-ypKw21zQAX-7qktEs,859
34
34
  plexflow/core/context/partials/tgx_context.py,sha256=_FuhOvKsFqi_uynHxgC9_QIR2CfYmz-uJCRFtGFJmXI,1641
35
35
  plexflow/core/context/partials/torrents.py,sha256=U6tjdsH0qIPwe9b7XZ5ChNIos68WEKn9VgCQe0A8MQ0,772
36
+ plexflow/core/context/partials/universal_torrents.py,sha256=YVykoSo61D_8_jLd6XgwWZ4Gy6sOzhIjTpJsyvPHxuE,846
36
37
  plexflow/core/context/partials/watchlist.py,sha256=XL4H3AXHhyuhuImm3OBfrOmlc9rMvVhBJJGumQijM-c,1108
37
38
  plexflow/core/context/plexflow_context.py,sha256=_Le01owaf_0hW6BwMCvMKrKX0IRHyWGWGYTzxCWmdSE,904
38
39
  plexflow/core/context/plexflow_property.py,sha256=9eLjyHlfKKUhFo_zRwUIq_QaAGE6An4B8_HOxVJbeUo,1169
@@ -353,7 +354,9 @@ plexflow/core/subtitles/providers/oss/utils/response_base.py,sha256=APjsR4OqYrKe
353
354
  plexflow/core/subtitles/providers/oss/utils/responses.py,sha256=QRTjZymSn3EWqMjteXy1apRtNDKej614D2YB1_m_v2c,7954
354
355
  plexflow/core/subtitles/providers/oss/utils/srt.py,sha256=riEuy9_1m4kZEu-Ey8bgvQUfr5ce0_Nu95GFe6Qh_u8,21041
355
356
  plexflow/core/subtitles/results/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
357
+ plexflow/core/subtitles/results/__pycache__/__init__.cpython-312.pyc,sha256=KSV9si5eK6ydXfjkOjJ24xK5kKeQYbw2_s38n-48Gvo,167
356
358
  plexflow/core/subtitles/results/__pycache__/subtitle.cpython-311.pyc,sha256=CjeZEPM8DrolKN7eIIHM2kEN3gdc90yhdZssUN0ImdY,6400
359
+ plexflow/core/subtitles/results/__pycache__/subtitle.cpython-312.pyc,sha256=p61FniRetRyEVqFapGtGt_r_8ldHG30XNyEl7iYx7wM,5984
357
360
  plexflow/core/subtitles/results/subtitle.py,sha256=1_xeg_l93b-gWRJEKrOSA8k1OlNOfJgotFWWsfgiUvM,3852
358
361
  plexflow/core/torrents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
359
362
  plexflow/core/torrents/__pycache__/__init__.cpython-311.pyc,sha256=Ak5TvWroVnHx7z-S-hqYzBrZyP5axDM85dpaSb4yI3o,172
@@ -491,8 +494,10 @@ plexflow/core/torrents/results/__pycache__/__init__.cpython-311.pyc,sha256=FJHx4
491
494
  plexflow/core/torrents/results/__pycache__/__init__.cpython-312.pyc,sha256=ZUXrXdVtbKDOsGXTY2h9h1GTk4atgBsFSsm-ffcVUUc,168
492
495
  plexflow/core/torrents/results/__pycache__/torrent.cpython-311.pyc,sha256=SxfylbSxF9gpzXvNey4Fv9XdKLjwm0a0LYlGFhg7zAY,7655
493
496
  plexflow/core/torrents/results/__pycache__/torrent.cpython-312.pyc,sha256=6-XcS5D4UMNkJEJ-tNn8DwSROZcLYA_jm3pR8Eu-hbY,7420
497
+ plexflow/core/torrents/results/__pycache__/universal.cpython-312.pyc,sha256=Sbvn5JyDCDU58AL_5xUqJ6PDnyilRU3ImVTPz910l8Q,12053
498
+ plexflow/core/torrents/results/__pycache__/utils.cpython-312.pyc,sha256=vqEt3jQLzZ-K_E9WV0kKz4K79AScvcg2xyOUTlAcu70,1136
494
499
  plexflow/core/torrents/results/torrent.py,sha256=xsFFOG8Wh5YslQ4d5lhrhi2I5LHGBTCdC30CU06GAKs,4770
495
- plexflow/core/torrents/results/universal.py,sha256=eU0GyxewT9XkvFbtUIaNNB-Y_aXCl7XPvb5z8VVyE1o,6614
500
+ plexflow/core/torrents/results/universal.py,sha256=jZDk4ahi7cgUfc1kW3SN4nHDQE3FezcvvxRRkYTAyXg,6670
496
501
  plexflow/core/torrents/results/utils.py,sha256=abiiO_QQYDpA5aMyO8WFPxnGu5sL5xfACezE5bwrnJU,691
497
502
  plexflow/events/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
498
503
  plexflow/events/download/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -644,7 +649,7 @@ plexflow/utils/video/__pycache__/audio.cpython-312.pyc,sha256=vXBnJwWgTDFdixMBs-
644
649
  plexflow/utils/video/__pycache__/subtitle.cpython-312.pyc,sha256=PCjpCLydGXaRsQy6cikhgsEs8WlComfOoYPiLFqfVMA,2515
645
650
  plexflow/utils/video/audio.py,sha256=tJ_lNwcjVuBQYD5cYOlXpr__eh8-hnReIgNRgIYOpqo,3380
646
651
  plexflow/utils/video/subtitle.py,sha256=LOGONGxs_RzmqtGP-DBKreOzS1eUFEKo75Q6AfnavW0,1290
647
- plexflow-0.0.74.dist-info/METADATA,sha256=hKPMZVSCZ8bGQFm0-_8YL-IRh5Od5b4L3_CXg38bbyw,2954
648
- plexflow-0.0.74.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
649
- plexflow-0.0.74.dist-info/entry_points.txt,sha256=A-_w_iUmjrSgDtOcX-G5H3NboAAZNzwiFoQbBf4bVjg,1302
650
- plexflow-0.0.74.dist-info/RECORD,,
652
+ plexflow-0.0.75.dist-info/METADATA,sha256=L6gTk_qUSmG7YMo0XNnBm5rEU-mgMRAXhjtqOpuMWSo,2954
653
+ plexflow-0.0.75.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
654
+ plexflow-0.0.75.dist-info/entry_points.txt,sha256=A-_w_iUmjrSgDtOcX-G5H3NboAAZNzwiFoQbBf4bVjg,1302
655
+ plexflow-0.0.75.dist-info/RECORD,,