plexflow 0.0.107__py3-none-any.whl → 0.0.109__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/plex/__pycache__/__init__.cpython-312.pyc +0 -0
- plexflow/core/plex/api/context/__pycache__/authorized.cpython-312.pyc +0 -0
- plexflow/core/plex/api/context/__pycache__/library.cpython-312.pyc +0 -0
- plexflow/core/plex/library/__pycache__/__init__.cpython-312.pyc +0 -0
- plexflow/core/plex/library/__pycache__/library.cpython-312.pyc +0 -0
- plexflow/core/plex/library/folders/plex_movie_folder.py +6 -3
- plexflow/core/plex/library/library.py +11 -0
- plexflow/core/plex/token/__pycache__/__init__.cpython-312.pyc +0 -0
- plexflow/core/plex/token/__pycache__/auto_token.cpython-312.pyc +0 -0
- plexflow/utils/api/__pycache__/__init__.cpython-312.pyc +0 -0
- plexflow/utils/api/context/__pycache__/http.cpython-312.pyc +0 -0
- {plexflow-0.0.107.dist-info → plexflow-0.0.109.dist-info}/METADATA +1 -1
- {plexflow-0.0.107.dist-info → plexflow-0.0.109.dist-info}/RECORD +15 -12
- {plexflow-0.0.107.dist-info → plexflow-0.0.109.dist-info}/entry_points.txt +1 -0
- {plexflow-0.0.107.dist-info → plexflow-0.0.109.dist-info}/WHEEL +0 -0
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -21,12 +21,15 @@ class PlexMovieFolder(PlexFolder):
|
|
21
21
|
self.assets.append(subtitle_asset)
|
22
22
|
self.subtitle_index = self.subtitle_index + 1 if self.subtitle_index else 1
|
23
23
|
|
24
|
-
def create(self):
|
24
|
+
def create(self, dry_run: bool = False):
|
25
25
|
for asset in self.assets:
|
26
26
|
source = asset.source_path
|
27
27
|
target = asset.target_path
|
28
28
|
|
29
|
-
|
29
|
+
if not dry_run:
|
30
|
+
target.parent.mkdir(parents=True, exist_ok=True)
|
30
31
|
|
31
32
|
logging.info(f"moving {source} to {target}")
|
32
|
-
|
33
|
+
|
34
|
+
if not dry_run:
|
35
|
+
sh.move(src=str(source), dst=str(target))
|
@@ -29,6 +29,17 @@ def get_library_id(library_name: str) -> int:
|
|
29
29
|
return section["key"]
|
30
30
|
raise ValueError(f"Library '{library_name}' not found.")
|
31
31
|
|
32
|
+
def refresh_library(library_name: str) -> bool:
|
33
|
+
library_id = get_library_id(library_name)
|
34
|
+
context = PlexLibraryRequestContext()
|
35
|
+
context.get(f"/library/sections/{library_id}/refresh")
|
36
|
+
|
37
|
+
def refresh_movies_library(library_name: str = "Films") -> bool:
|
38
|
+
return refresh_library(library_name=library_name)
|
39
|
+
|
40
|
+
def refresh_tv_library(library_name: str = "Series") -> bool:
|
41
|
+
return refresh_library(library_name=library_name)
|
42
|
+
|
32
43
|
def is_media_in_library(guid: str, library_name: str, media_type: str) -> bool:
|
33
44
|
"""
|
34
45
|
Check if a media exists in a Plex library based on its GUID.
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -251,10 +251,11 @@ plexflow/core/metadata/providers/universal/old.py,sha256=_o_BNDXJnSq5S6qTMsNNBy3
|
|
251
251
|
plexflow/core/metadata/providers/universal/show.py,sha256=wbOMO08hrJyX5WjY5hn7ZFU-nXmjZSIWXwjMgHHhCE4,3600
|
252
252
|
plexflow/core/plex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
253
253
|
plexflow/core/plex/__pycache__/__init__.cpython-311.pyc,sha256=o4gGMMqIGn76K2SswHK_TRMj4Vu_qtdzr4hzsDGLjqo,168
|
254
|
-
plexflow/core/plex/__pycache__/__init__.cpython-312.pyc,sha256=
|
254
|
+
plexflow/core/plex/__pycache__/__init__.cpython-312.pyc,sha256=wPLlqh8DRnmJd2cth67496tklUb0uzxwZMMxdlnAdz0,154
|
255
255
|
plexflow/core/plex/__pycache__/library.cpython-311.pyc,sha256=drDZKEiegqRYaUC56CheL1uT95TzsYBkHOBZ_sd_Nec,1343
|
256
|
-
plexflow/core/plex/api/context/__pycache__/authorized.cpython-312.pyc,sha256=
|
256
|
+
plexflow/core/plex/api/context/__pycache__/authorized.cpython-312.pyc,sha256=CZa2V99SrIrCXYALIuGdGHeBV7j_4IAZ9YyyyeTMVqk,1240
|
257
257
|
plexflow/core/plex/api/context/__pycache__/discover.cpython-312.pyc,sha256=MnABH8Iy5vQZURiNWNhYDLyobDoArXMyb4VZuG0gtBE,1186
|
258
|
+
plexflow/core/plex/api/context/__pycache__/library.cpython-312.pyc,sha256=UkbC9hNCpujR9iKTzHrWpVysCqCYcd85VdDhn73O1sY,1323
|
258
259
|
plexflow/core/plex/api/context/authorized.py,sha256=o7SP1yOqiPjTNbAaeyDOHk7KRAqkWtRyCttgm4jyjK4,704
|
259
260
|
plexflow/core/plex/api/context/discover.py,sha256=WnglqoyysOEN6YmvT_O-nB1CbghJsL8flcruZ0Ovlak,714
|
260
261
|
plexflow/core/plex/api/context/library.py,sha256=b9m3K_KEIn_o6akwml0MQjgh-L7p8SZDWTKMjG1mFY4,742
|
@@ -275,18 +276,20 @@ plexflow/core/plex/hooks/plex_authorized.py,sha256=JQUNSCZssmP31EDJhHa0Y8eho4ib3
|
|
275
276
|
plexflow/core/plex/hooks/plexflow_database.py,sha256=ftdsrwT8AMogSqqfT_P1db5e69Fya7bnEszsvdCLZIo,316
|
276
277
|
plexflow/core/plex/library/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
277
278
|
plexflow/core/plex/library/__pycache__/__init__.cpython-311.pyc,sha256=9m-aTcoSl9y-zVp2COTYRH3moEp_MXOGs8xnpfGyyP4,176
|
279
|
+
plexflow/core/plex/library/__pycache__/__init__.cpython-312.pyc,sha256=WbfQgOztEHUetNJ0maAX2U1eYLdTqIuivfoejtjoaIc,162
|
278
280
|
plexflow/core/plex/library/__pycache__/library.cpython-311.pyc,sha256=yL69reegO6xlOsd_QA2uLQU0Eo7By8gE4ldB_X-0IDc,4559
|
281
|
+
plexflow/core/plex/library/__pycache__/library.cpython-312.pyc,sha256=6-TJWeb3YFArriMpzfMswXsBrlp3antN7QvUxr4LBaM,4518
|
279
282
|
plexflow/core/plex/library/folders/assets/plex_asset.py,sha256=awY8vhg3KoU2uCB18y5MleE3aAUdVDTnN1OaTmm2oJc,530
|
280
283
|
plexflow/core/plex/library/folders/assets/plex_subtitle_asset.py,sha256=51itoIUbHco2HW0Mh9mGNddqwMrZA2ajwuyhVzPcXkI,521
|
281
284
|
plexflow/core/plex/library/folders/assets/plex_video_asset.py,sha256=F_7RtdtblYQJc_gp9nUVxIfS4BeHl0eZDgYmTMg2zos,208
|
282
285
|
plexflow/core/plex/library/folders/plex_folder.py,sha256=GZnyQO6bzcire-2mxPjIPJrq8J0S_4uVsOfVCiHo2E0,387
|
283
|
-
plexflow/core/plex/library/folders/plex_movie_folder.py,sha256=
|
284
|
-
plexflow/core/plex/library/library.py,sha256
|
286
|
+
plexflow/core/plex/library/folders/plex_movie_folder.py,sha256=zPdA8cfTEiLBXdU0IMfJ-v5NVYIHnUBzgdfNcWremRs,1526
|
287
|
+
plexflow/core/plex/library/library.py,sha256=taLi0e7iY0usZPDHXwPfLmxQI5vyMyo8eJtOSHNKtww,3644
|
285
288
|
plexflow/core/plex/token/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
286
289
|
plexflow/core/plex/token/__pycache__/__init__.cpython-311.pyc,sha256=trdQUL3OxH5EHEmWYV9U1xf7PK9ig9RDpauyqI7uh34,174
|
287
|
-
plexflow/core/plex/token/__pycache__/__init__.cpython-312.pyc,sha256=
|
290
|
+
plexflow/core/plex/token/__pycache__/__init__.cpython-312.pyc,sha256=rIQN9_UVduAPposcqZUJL1RZNmPZJ9MpTadq18aFAd4,160
|
288
291
|
plexflow/core/plex/token/__pycache__/auto_token.cpython-311.pyc,sha256=jqMgOohLLdzR1pwpl3XVnQ7exp5jftTwok7B_MxYW-s,4465
|
289
|
-
plexflow/core/plex/token/__pycache__/auto_token.cpython-312.pyc,sha256=
|
292
|
+
plexflow/core/plex/token/__pycache__/auto_token.cpython-312.pyc,sha256=1uRpJbyiWsDE7Vo1AQniVXp-YXnrkqMZuXDemoEaGrI,4234
|
290
293
|
plexflow/core/plex/token/auto_token.py,sha256=CcAd6KcnI7ul5TxpdYVw_7T0ab2K3YTi8DcqHtjKt4Q,3615
|
291
294
|
plexflow/core/plex/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
292
295
|
plexflow/core/plex/utils/__pycache__/__init__.cpython-311.pyc,sha256=2b2qu_365BZcXqAU5s34hzrvKC0s2_W8OReMDlBr3Sc,174
|
@@ -568,8 +571,8 @@ plexflow/utils/antibot/__pycache__/human_like_requests.cpython-312.pyc,sha256=6f
|
|
568
571
|
plexflow/utils/antibot/human_like_requests.py,sha256=-UKo2LgJtgp7CYggxPsUT74vfXyYosdbg5f-DzaEgQU,6116
|
569
572
|
plexflow/utils/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
570
573
|
plexflow/utils/api/__pycache__/__init__.cpython-311.pyc,sha256=h5sUevkaKlWYQz-ECxScMFrE-yT8mYwUQI6CEmHaMe8,168
|
571
|
-
plexflow/utils/api/__pycache__/__init__.cpython-312.pyc,sha256=
|
572
|
-
plexflow/utils/api/context/__pycache__/http.cpython-312.pyc,sha256=
|
574
|
+
plexflow/utils/api/__pycache__/__init__.cpython-312.pyc,sha256=0hh_Jx5MF9MfULyOW7p2g9u9eaZ6QxYX0fG8_lN46Ys,154
|
575
|
+
plexflow/utils/api/context/__pycache__/http.cpython-312.pyc,sha256=US7URBJb5VkC0tBqs6wIHihhBBHdXi0Tp9sZZ1TEECU,6440
|
573
576
|
plexflow/utils/api/context/http.py,sha256=TRpEe9_QUEfkVZIMqcAtDJ7Lu5Xl53KyiwBiTHVpbms,4120
|
574
577
|
plexflow/utils/api/rest/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
575
578
|
plexflow/utils/api/rest/__pycache__/__init__.cpython-311.pyc,sha256=WWFZn7TmRF2ToVVOLwB03WIieIZDONWxTGLNPu6Kz-o,173
|
@@ -688,7 +691,7 @@ plexflow/utils/video/__pycache__/audio.cpython-312.pyc,sha256=vXBnJwWgTDFdixMBs-
|
|
688
691
|
plexflow/utils/video/__pycache__/subtitle.cpython-312.pyc,sha256=PCjpCLydGXaRsQy6cikhgsEs8WlComfOoYPiLFqfVMA,2515
|
689
692
|
plexflow/utils/video/audio.py,sha256=tJ_lNwcjVuBQYD5cYOlXpr__eh8-hnReIgNRgIYOpqo,3380
|
690
693
|
plexflow/utils/video/subtitle.py,sha256=qPvvBjlPj0fynJJvGJgGeKt9ey26R-cF6EoLaYt9iXU,1333
|
691
|
-
plexflow-0.0.
|
692
|
-
plexflow-0.0.
|
693
|
-
plexflow-0.0.
|
694
|
-
plexflow-0.0.
|
694
|
+
plexflow-0.0.109.dist-info/METADATA,sha256=6F1QRG0TQZ10hajMo70MMBTpcai9eWnCJwbb8l28ugM,3051
|
695
|
+
plexflow-0.0.109.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
696
|
+
plexflow-0.0.109.dist-info/entry_points.txt,sha256=SSLjrLcZa2880346VUIsCG9vcLsquf-RTX9pkdNaTO8,1498
|
697
|
+
plexflow-0.0.109.dist-info/RECORD,,
|
@@ -19,6 +19,7 @@ plex_activity_feed=scripts.plex.discover.get_activity_feed:main
|
|
19
19
|
publish_hello_world=scripts.kafka.publish_hello_world:main
|
20
20
|
read_from_gmail=scripts.plex.discover.read_from_gmail:main
|
21
21
|
redis_hook=scripts.redis.redis_hook:main
|
22
|
+
refresh=scripts.plex.library.refresh:main
|
22
23
|
schedule=scripts.downloads.qbit.schedule:main
|
23
24
|
subscribe_hello_world=scripts.kafka.subscribe_hello_world:main
|
24
25
|
tgx_context=scripts.torrents.tgx_context:main
|
File without changes
|