plexflow 0.0.94__py3-none-any.whl → 0.0.96__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/downloads/candidates/__pycache__/download_candidate.cpython-312.pyc +0 -0
- plexflow/core/downloads/qbit/__pycache__/interface.cpython-312.pyc +0 -0
- plexflow/core/downloads/qbit/__pycache__/schedule.cpython-312.pyc +0 -0
- plexflow/core/downloads/qbit/interface.py +59 -0
- plexflow/core/downloads/qbit/schedule.py +6 -6
- {plexflow-0.0.94.dist-info → plexflow-0.0.96.dist-info}/METADATA +1 -1
- {plexflow-0.0.94.dist-info → plexflow-0.0.96.dist-info}/RECORD +9 -7
- {plexflow-0.0.94.dist-info → plexflow-0.0.96.dist-info}/entry_points.txt +1 -0
- {plexflow-0.0.94.dist-info → plexflow-0.0.96.dist-info}/WHEEL +0 -0
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import qbittorrentapi
|
2
|
+
from typing import List
|
3
|
+
from qbittorrentapi.torrents import TorrentDictionary
|
4
|
+
|
5
|
+
def list_torrents(torrent_hashes: List[str] = None, category: str = None, tag: str = None, **kwargs) -> TorrentDictionary:
|
6
|
+
# instantiate a Client using the appropriate WebUI configuration
|
7
|
+
conn_info = dict(
|
8
|
+
host=kwargs.get("qbit_host"),
|
9
|
+
port=kwargs.get("qbit_port"),
|
10
|
+
username=kwargs.get("qbit_username"),
|
11
|
+
password=kwargs.get("qbit_password"),
|
12
|
+
)
|
13
|
+
qbt_client = qbittorrentapi.Client(**conn_info)
|
14
|
+
|
15
|
+
# or use a context manager:
|
16
|
+
with qbittorrentapi.Client(**conn_info) as qbt_client:
|
17
|
+
return qbt_client.torrents.info(
|
18
|
+
torrent_hashes=torrent_hashes,
|
19
|
+
category=category,
|
20
|
+
tag=tag,
|
21
|
+
)
|
22
|
+
|
23
|
+
def force_start(torrent: TorrentDictionary, **kwargs):
|
24
|
+
# instantiate a Client using the appropriate WebUI configuration
|
25
|
+
conn_info = dict(
|
26
|
+
host=kwargs.get("qbit_host"),
|
27
|
+
port=kwargs.get("qbit_port"),
|
28
|
+
username=kwargs.get("qbit_username"),
|
29
|
+
password=kwargs.get("qbit_password"),
|
30
|
+
)
|
31
|
+
qbt_client = qbittorrentapi.Client(**conn_info)
|
32
|
+
|
33
|
+
# or use a context manager:
|
34
|
+
with qbittorrentapi.Client(**conn_info) as qbt_client:
|
35
|
+
return qbt_client.torrents_setForceStart(enable=True, torrent_hashes=torrent.hash)
|
36
|
+
|
37
|
+
def is_completed(torrent: TorrentDictionary) -> bool:
|
38
|
+
return torrent.state in [
|
39
|
+
"seeding",
|
40
|
+
"completed",
|
41
|
+
"uploading",
|
42
|
+
"stalled_uploading",
|
43
|
+
"stalledUP",
|
44
|
+
"forcedUP",
|
45
|
+
]
|
46
|
+
|
47
|
+
def is_downloading(torrent: TorrentDictionary) -> bool:
|
48
|
+
return torrent.state in [
|
49
|
+
"downloading",
|
50
|
+
"stalled_downloading",
|
51
|
+
"checking",
|
52
|
+
"stalledDL",
|
53
|
+
"forcedDL",
|
54
|
+
]
|
55
|
+
|
56
|
+
def is_errored(torrent: TorrentDictionary) -> bool:
|
57
|
+
return torrent.state in [
|
58
|
+
"errored",
|
59
|
+
]
|
@@ -3,13 +3,13 @@ from plexflow.core.downloads.candidates.download_candidate import DownloadCandid
|
|
3
3
|
from typing import List
|
4
4
|
|
5
5
|
|
6
|
-
def schedule_download(magnet: str, category: str = None, tags: List[str] = ()):
|
6
|
+
def schedule_download(magnet: str, category: str = None, tags: List[str] = (), save_path: str = None, **kwargs):
|
7
7
|
# instantiate a Client using the appropriate WebUI configuration
|
8
8
|
conn_info = dict(
|
9
|
-
host=
|
10
|
-
port=
|
11
|
-
username="
|
12
|
-
password="
|
9
|
+
host=kwargs.get("qbit_host"),
|
10
|
+
port=kwargs.get("qbit_port"),
|
11
|
+
username=kwargs.get("qbit_username"),
|
12
|
+
password=kwargs.get("qbit_password"),
|
13
13
|
)
|
14
14
|
qbt_client = qbittorrentapi.Client(**conn_info)
|
15
15
|
|
@@ -17,7 +17,7 @@ def schedule_download(magnet: str, category: str = None, tags: List[str] = ()):
|
|
17
17
|
with qbittorrentapi.Client(**conn_info) as qbt_client:
|
18
18
|
if qbt_client.torrents_add(
|
19
19
|
urls=magnet,
|
20
|
-
save_path=
|
20
|
+
save_path=save_path,
|
21
21
|
content_layout='Subfolder',
|
22
22
|
tags=tags,
|
23
23
|
category=category) != "Ok.":
|
@@ -63,7 +63,7 @@ plexflow/core/downloads/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
|
|
63
63
|
plexflow/core/downloads/__pycache__/__init__.cpython-312.pyc,sha256=soaT0G2pvzN68xVkNyM9AKW0bhpmjqhIeF35mfoREDI,159
|
64
64
|
plexflow/core/downloads/candidates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
65
65
|
plexflow/core/downloads/candidates/__pycache__/__init__.cpython-312.pyc,sha256=rukNX00PSteBonRk-cayzNRk17ypWfE4noOAR3Ibjn0,170
|
66
|
-
plexflow/core/downloads/candidates/__pycache__/download_candidate.cpython-312.pyc,sha256=
|
66
|
+
plexflow/core/downloads/candidates/__pycache__/download_candidate.cpython-312.pyc,sha256=f4h0U6Cue2z5QaU_Ik7zHTqITe0SLVSeNRLvIVwsB3c,9487
|
67
67
|
plexflow/core/downloads/candidates/__pycache__/utils.cpython-312.pyc,sha256=Jwoj7R4TFzjoXc3uq_Wps3WitzFE9K_miKp9XuT_l8Y,2079
|
68
68
|
plexflow/core/downloads/candidates/download_candidate.py,sha256=CUq56hnl624GvrXb5ET0-z1xnNGfbCdJu2MMPItkYnI,5927
|
69
69
|
plexflow/core/downloads/candidates/filtered.py,sha256=HgUY0S3aWAeHASHTjND9hyjCtGNLhUzLOL90G2CDxKg,1842
|
@@ -72,8 +72,10 @@ plexflow/core/downloads/candidates/rank/__pycache__/utils.cpython-312.pyc,sha256
|
|
72
72
|
plexflow/core/downloads/candidates/rank/ranking.py,sha256=p86f3DQmXJNE53gPk9E5RcKA7dgXI4wPQsIh9ae1uxY,2490
|
73
73
|
plexflow/core/downloads/candidates/rank/utils.py,sha256=R4Ai4KmZRONo9vd2rf32DdGxVkANHYFwSjrO5WVjX9U,100
|
74
74
|
plexflow/core/downloads/candidates/utils.py,sha256=ahI6bvk7CHT_O0BEXsd7FtC180Swlt9Phj6_op1mhYA,1777
|
75
|
-
plexflow/core/downloads/qbit/__pycache__/
|
76
|
-
plexflow/core/downloads/qbit/schedule.
|
75
|
+
plexflow/core/downloads/qbit/__pycache__/interface.cpython-312.pyc,sha256=YEgG578GU-8Un84wDn1ApL6SaA4LZgyO3wBJV7LVBcI,2617
|
76
|
+
plexflow/core/downloads/qbit/__pycache__/schedule.cpython-312.pyc,sha256=ESOLrk6sLpb1mtijuDGNKvAHaYopVQBwSDzdt8dFNow,1350
|
77
|
+
plexflow/core/downloads/qbit/interface.py,sha256=CvhpWidJpuWDWITbWe9NIgXXVflrmrdnesVqt18BSGY,1873
|
78
|
+
plexflow/core/downloads/qbit/schedule.py,sha256=5w3JpbIGRc5xS_ZjfKXMXywi-2NXL_2y_Izx0DmUGnE,907
|
77
79
|
plexflow/core/env/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
78
80
|
plexflow/core/env/env.py,sha256=8cK49WiKD_H3B9K0QiMu7pkXTld40ojRB3sK7noQM44,953
|
79
81
|
plexflow/core/genai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -679,7 +681,7 @@ plexflow/utils/video/__pycache__/audio.cpython-312.pyc,sha256=vXBnJwWgTDFdixMBs-
|
|
679
681
|
plexflow/utils/video/__pycache__/subtitle.cpython-312.pyc,sha256=PCjpCLydGXaRsQy6cikhgsEs8WlComfOoYPiLFqfVMA,2515
|
680
682
|
plexflow/utils/video/audio.py,sha256=tJ_lNwcjVuBQYD5cYOlXpr__eh8-hnReIgNRgIYOpqo,3380
|
681
683
|
plexflow/utils/video/subtitle.py,sha256=LOGONGxs_RzmqtGP-DBKreOzS1eUFEKo75Q6AfnavW0,1290
|
682
|
-
plexflow-0.0.
|
683
|
-
plexflow-0.0.
|
684
|
-
plexflow-0.0.
|
685
|
-
plexflow-0.0.
|
684
|
+
plexflow-0.0.96.dist-info/METADATA,sha256=IwNJMCN6obFbsOMUbmHMomxPVEyNzU6MWexbAlV-4JQ,3007
|
685
|
+
plexflow-0.0.96.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
686
|
+
plexflow-0.0.96.dist-info/entry_points.txt,sha256=uZc6ohXod3uudTgfeTqnkXBS4Cb7eajdjeqZc3P0PX4,1456
|
687
|
+
plexflow-0.0.96.dist-info/RECORD,,
|
@@ -10,6 +10,7 @@ get_movie=scripts.metadata.auto.get_movie:main
|
|
10
10
|
get_show=scripts.metadata.auto.get_show:main
|
11
11
|
groq_transcribe=scripts.transcribe.groq_transcribe:main
|
12
12
|
human_like=scripts.antibot.human_like:main
|
13
|
+
interface=scripts.downloads.qbit.interface:main
|
13
14
|
match_torrent_imdb=scripts.torrents.match_torrent_imdb:main
|
14
15
|
mistral=scripts.mistral.mistral:main
|
15
16
|
on_download_completed=scripts.torrents.on_download_completed:main
|
File without changes
|