plexflow 0.0.97__py3-none-any.whl → 0.0.99__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.
- plexflow/core/context/partial_context.py +10 -0
- plexflow/core/context/partials/__init__.py +1 -0
- plexflow/core/context/partials/completed_downloads.py +28 -0
- {plexflow-0.0.97.dist-info → plexflow-0.0.99.dist-info}/METADATA +1 -1
- {plexflow-0.0.97.dist-info → plexflow-0.0.99.dist-info}/RECORD +7 -6
- {plexflow-0.0.97.dist-info → plexflow-0.0.99.dist-info}/WHEEL +0 -0
- {plexflow-0.0.97.dist-info → plexflow-0.0.99.dist-info}/entry_points.txt +0 -0
@@ -17,6 +17,16 @@ class PartialContext:
|
|
17
17
|
universal_id = str(ULID())
|
18
18
|
store.store_temporarily(key=store.make_key(dag_run_id), obj=universal_id)
|
19
19
|
return universal_id
|
20
|
+
|
21
|
+
@staticmethod
|
22
|
+
def update_custom(context_id: str, key: str, value: Any, ttl: int = None):
|
23
|
+
ctx = PartialContext(
|
24
|
+
context_id=context_id,
|
25
|
+
dag_run_id=f"CUSTOM_{context_id}",
|
26
|
+
default_ttl=ttl,
|
27
|
+
)
|
28
|
+
|
29
|
+
ctx.set(key, value, ttl=ttl)
|
20
30
|
|
21
31
|
def __init__(self, context_id: str, dag_run_id: str, default_ttl: int, **kwargs) -> None:
|
22
32
|
self.context_id = context_id
|
@@ -10,3 +10,4 @@ from plexflow.core.context.partials.reports import TorrentAnalysisReports
|
|
10
10
|
from plexflow.core.context.partials.subtitles import Subtitles
|
11
11
|
from plexflow.core.context.partials.universal_torrents import UniversalTorrents
|
12
12
|
from plexflow.core.context.partials.candidates import Candidates
|
13
|
+
from plexflow.core.context.partials.completed_downloads import CompletedDownloads
|
@@ -0,0 +1,28 @@
|
|
1
|
+
from plexflow.core.context.partial_context import PartialContext
|
2
|
+
from typing import List
|
3
|
+
from qbittorrentapi.torrents import TorrentDictionary
|
4
|
+
from plexflow.core.storage.object.plexflow_storage import PlexflowObjectStore
|
5
|
+
|
6
|
+
class CompletedDownloads(PartialContext):
|
7
|
+
def __init__(self, **kwargs) -> None:
|
8
|
+
super().__init__(**kwargs)
|
9
|
+
|
10
|
+
def all(self) -> List[TorrentDictionary]:
|
11
|
+
return self.get("download/completed")
|
12
|
+
|
13
|
+
def update(self, downloads: List[TorrentDictionary]):
|
14
|
+
if len(downloads) == 0:
|
15
|
+
return
|
16
|
+
self.set("download/completed", downloads)
|
17
|
+
|
18
|
+
def torrent(self) -> TorrentDictionary:
|
19
|
+
return self.get("download/torrent")
|
20
|
+
|
21
|
+
@staticmethod
|
22
|
+
def update_completed_torrent(universal_id: str, torrent: TorrentDictionary, **kwargs):
|
23
|
+
PartialContext.update_custom(
|
24
|
+
context_id=universal_id,
|
25
|
+
key="download/torrent",
|
26
|
+
value=torrent,
|
27
|
+
**kwargs
|
28
|
+
)
|
@@ -19,13 +19,14 @@ plexflow/core/context/metadata/context.py,sha256=MoKWnb03_9pnjYacRrfzYN1eVNFbLjO
|
|
19
19
|
plexflow/core/context/metadata/tmdb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
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
|
-
plexflow/core/context/partial_context.py,sha256=
|
23
|
-
plexflow/core/context/partials/__init__.py,sha256=
|
22
|
+
plexflow/core/context/partial_context.py,sha256=684qHyQ-ulkZnXm-CMmhP7ont-9lIi1WEAbLTjyS4kA,2301
|
23
|
+
plexflow/core/context/partials/__init__.py,sha256=6Kr73gP33JOtopWEOK2I1brStbD_1qdB25c7hWVJK9I,846
|
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
|
27
27
|
plexflow/core/context/partials/cache.py,sha256=1QQ6yP69wqJiacuc2idhHsXpyUUCqavqgLk25wQB_tI,508
|
28
28
|
plexflow/core/context/partials/candidates.py,sha256=TnAPeSEolchQ3znT40xKjEQfeCl9qAMLFThWaeT46JY,1033
|
29
|
+
plexflow/core/context/partials/completed_downloads.py,sha256=7BE8VB1NoiURP5H6q9l61TKFAVMB6Z81OtGoJMCIFkA,962
|
29
30
|
plexflow/core/context/partials/context.py,sha256=pFzpAFxwCJdqPuhXJqhs6j4Xyvf0GQtzPRMmL4fcjEA,314
|
30
31
|
plexflow/core/context/partials/ids.py,sha256=QoQ6FbX1OIWrE-iuz-G6kSzBlTt1_I1jyfl2JgKge2o,913
|
31
32
|
plexflow/core/context/partials/movie.py,sha256=VXQ2SspFgGSRgDefg4VlHrH2fns3KRuKlU72ps6527o,3861
|
@@ -681,7 +682,7 @@ plexflow/utils/video/__pycache__/audio.cpython-312.pyc,sha256=vXBnJwWgTDFdixMBs-
|
|
681
682
|
plexflow/utils/video/__pycache__/subtitle.cpython-312.pyc,sha256=PCjpCLydGXaRsQy6cikhgsEs8WlComfOoYPiLFqfVMA,2515
|
682
683
|
plexflow/utils/video/audio.py,sha256=tJ_lNwcjVuBQYD5cYOlXpr__eh8-hnReIgNRgIYOpqo,3380
|
683
684
|
plexflow/utils/video/subtitle.py,sha256=LOGONGxs_RzmqtGP-DBKreOzS1eUFEKo75Q6AfnavW0,1290
|
684
|
-
plexflow-0.0.
|
685
|
-
plexflow-0.0.
|
686
|
-
plexflow-0.0.
|
687
|
-
plexflow-0.0.
|
685
|
+
plexflow-0.0.99.dist-info/METADATA,sha256=t4q923QYitwULLNi20dLOR1cFJw28tmoZdVDgLCXQ00,3007
|
686
|
+
plexflow-0.0.99.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
687
|
+
plexflow-0.0.99.dist-info/entry_points.txt,sha256=uZc6ohXod3uudTgfeTqnkXBS4Cb7eajdjeqZc3P0PX4,1456
|
688
|
+
plexflow-0.0.99.dist-info/RECORD,,
|
File without changes
|
File without changes
|