plexflow 0.0.135__py3-none-any.whl → 0.0.137__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.
@@ -30,14 +30,14 @@ class Ranked:
30
30
  def append_nosub(self, candidate: DownloadCandidate, rank: float):
31
31
  self.ranked['nosub'].append(RankedCandidate(rank, candidate))
32
32
 
33
- def native_candidates(self, language: str):
34
- return sorted(self.ranked['native'][language], key=lambda rc: rc.rank, reverse=True)
33
+ def native_candidates(self, language: str, tv_mode: bool = False):
34
+ return sorted(self.ranked['native'][language], key=lambda rc: rc.rank if not tv_mode else rc.candidate.max_seeds, reverse=True)
35
35
 
36
- def encoder_candidates(self, language: str):
37
- return sorted(self.ranked['encoder'][language], key=lambda rc: rc.rank, reverse=True)
36
+ def encoder_candidates(self, language: str, tv_mode: bool = False):
37
+ return sorted(self.ranked['encoder'][language], key=lambda rc: rc.rank if not tv_mode else rc.candidate.max_seeds, reverse=True)
38
38
 
39
- def nosub_candidates(self):
40
- return sorted(self.ranked['nosub'], key=lambda rc: rc.rank, reverse=True)
39
+ def nosub_candidates(self, tv_mode: bool = False):
40
+ return sorted(self.ranked['nosub'], key=lambda rc: rc.rank if not tv_mode else rc.candidate.max_seeds, reverse=True)
41
41
 
42
42
 
43
43
  def rank_candidates(candidates: List[DownloadCandidate]):
@@ -7,7 +7,7 @@ import json
7
7
  def plexflow(task_func):
8
8
  def wrapper(*args, **kwargs):
9
9
  task_mode = os.getenv("TASK_MODE", "default")
10
- default_ttl = 3600
10
+ default_ttl = int(os.getenv("DEFAULT_CONTEXT_TTL", 3600 * 24 * 7 * 2)) # 2 weeks
11
11
 
12
12
  if task_mode == "k8s":
13
13
  dag_run_id = os.getenv("AIRFLOW_RUN_ID", None)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: plexflow
3
- Version: 0.0.135
3
+ Version: 0.0.137
4
4
  Summary: A short description of the package.
5
5
  License: MIT
6
6
  Keywords: keyword1,keyword2,keyword3
@@ -74,7 +74,7 @@ plexflow/core/downloads/candidates/download_candidate.py,sha256=6lQbtNw8uGr5B8qr
74
74
  plexflow/core/downloads/candidates/filtered.py,sha256=HgUY0S3aWAeHASHTjND9hyjCtGNLhUzLOL90G2CDxKg,1842
75
75
  plexflow/core/downloads/candidates/rank/__pycache__/ranking.cpython-312.pyc,sha256=PyFgF-AfVisFErJ9PHeHb8RYLc4WIeRXQL3WSU83MnU,4298
76
76
  plexflow/core/downloads/candidates/rank/__pycache__/utils.cpython-312.pyc,sha256=YS3mCbqz2dnIvZuODAW8hAi9iDOp3HQDde0WVl4CBo0,426
77
- plexflow/core/downloads/candidates/rank/ranking.py,sha256=p86f3DQmXJNE53gPk9E5RcKA7dgXI4wPQsIh9ae1uxY,2490
77
+ plexflow/core/downloads/candidates/rank/ranking.py,sha256=vWsxtoDTX0sYWs-y_TxxhPhpaacZ07EtIEK9u4YP7S0,2688
78
78
  plexflow/core/downloads/candidates/rank/utils.py,sha256=R4Ai4KmZRONo9vd2rf32DdGxVkANHYFwSjrO5WVjX9U,100
79
79
  plexflow/core/downloads/candidates/utils.py,sha256=BnuDSRjU9mVYSh9ejKgfvlLi0bWEqc07uLyskC-bYhw,1874
80
80
  plexflow/core/downloads/qbit/__pycache__/interface.cpython-312.pyc,sha256=szUoTWpZNpHwJ0OnXer8ZLeAYIvHND-rX1lB2Juv-J4,3335
@@ -670,7 +670,7 @@ plexflow/utils/subtitle/__pycache__/search.cpython-312.pyc,sha256=RiMTyALG74DJn6
670
670
  plexflow/utils/subtitle/search.py,sha256=HW_JOrj-cpRrVnxWh56XjRWhb98E73V1V5QHCq2y7CM,2441
671
671
  plexflow/utils/tasks/__pycache__/decorators.cpython-311.pyc,sha256=8zuAsEfYLEBQQ4DGKqkx-JFCjd73kGhAiPblBNFa2cQ,1675
672
672
  plexflow/utils/tasks/__pycache__/tasks.cpython-311.pyc,sha256=8RRMTHAy-t6yW0rlDX9wpZyO-9Cg4SQoD-NVasL94SQ,1670
673
- plexflow/utils/tasks/decorators.py,sha256=1pF3bVFO2YCJd2gFNVYdmaQpbV3nRP1RxJ_OhLU-g7E,3051
673
+ plexflow/utils/tasks/decorators.py,sha256=ViXNX7Sl1Voh9lOGzwz0OBlzGjbfFc9lr1fTQpOVYJM,3113
674
674
  plexflow/utils/tasks/k8s/task.py,sha256=oCfOBjitZ48D1M52w2dpf7HaHZTmvYV9YS_ccixLs0w,2709
675
675
  plexflow/utils/thread_safe/__pycache__/safe_list.cpython-312.pyc,sha256=v5skxCDKmE_T4Ggodqcc5o44GySq05dU0m08OdslANo,4032
676
676
  plexflow/utils/thread_safe/__pycache__/safe_set.cpython-312.pyc,sha256=z0FdFIU076Mv4lTGkcoxn1IOo5HIfwcwj4oWiPj5oAc,4858
@@ -715,7 +715,7 @@ plexflow/utils/video/__pycache__/audio.cpython-312.pyc,sha256=kmzGDCHSC1hWyHwRut
715
715
  plexflow/utils/video/__pycache__/subtitle.cpython-312.pyc,sha256=PCjpCLydGXaRsQy6cikhgsEs8WlComfOoYPiLFqfVMA,2515
716
716
  plexflow/utils/video/audio.py,sha256=Pd8OuQHX2QN-lc5iYkB0Vo1OEHmTcvDYH-uKud1f1q4,5262
717
717
  plexflow/utils/video/subtitle.py,sha256=qPvvBjlPj0fynJJvGJgGeKt9ey26R-cF6EoLaYt9iXU,1333
718
- plexflow-0.0.135.dist-info/METADATA,sha256=qetVcH5dlSM5uAjUB-HiK_UxfH33JCPyEgz8D_AhiX0,2971
719
- plexflow-0.0.135.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
720
- plexflow-0.0.135.dist-info/entry_points.txt,sha256=9RJC3ikOQORHNOn573EdwJOBUnFU_4EGHbtNUM5pjjY,1557
721
- plexflow-0.0.135.dist-info/RECORD,,
718
+ plexflow-0.0.137.dist-info/METADATA,sha256=IJzPau1bwLZ1WkCMrh-B2Me_wiSp5rqdO4WLvPbPwrE,2971
719
+ plexflow-0.0.137.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
720
+ plexflow-0.0.137.dist-info/entry_points.txt,sha256=9RJC3ikOQORHNOn573EdwJOBUnFU_4EGHbtNUM5pjjY,1557
721
+ plexflow-0.0.137.dist-info/RECORD,,