mirror of
https://github.com/LukeHagar/plexpy.git
synced 2025-12-06 04:20:52 +00:00
59 lines
1.5 KiB
Python
59 lines
1.5 KiB
Python
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
|
|
from plex_api_client import PlexAPI
|
|
from plex_api_client.models import operations
|
|
|
|
|
|
def test_video_get_timeline_():
|
|
s = PlexAPI(
|
|
access_token="<YOUR_API_KEY_HERE>",
|
|
)
|
|
|
|
assert s is not None
|
|
|
|
res = s.video.get_timeline(
|
|
request={
|
|
"rating_key": 23409,
|
|
"key": "/library/metadata/23409",
|
|
"state": operations.State.PLAYING,
|
|
"has_mde": 1,
|
|
"time": 2000,
|
|
"duration": 10000,
|
|
"context": "home:hub.continueWatching",
|
|
"play_queue_item_id": 1,
|
|
"play_back_time": 2000,
|
|
"row": 1,
|
|
}
|
|
)
|
|
assert res.status_code == 200
|
|
|
|
|
|
def test_video_start_universal_transcode_():
|
|
s = PlexAPI(
|
|
access_token="<YOUR_API_KEY_HERE>",
|
|
)
|
|
|
|
assert s is not None
|
|
|
|
res = s.video.start_universal_transcode(
|
|
request={
|
|
"has_mde": 1,
|
|
"path": "/library/metadata/23409",
|
|
"media_index": 0,
|
|
"part_index": 0,
|
|
"protocol": "hls",
|
|
"fast_seek": 0,
|
|
"direct_play": 0,
|
|
"direct_stream": 0,
|
|
"subtitle_size": 100,
|
|
"subtites": "burn",
|
|
"audio_boost": 100,
|
|
"location": "lan",
|
|
"media_buffer_size": 102400,
|
|
"session": "zvcage8b7rkioqcm8f4uns4c",
|
|
"add_debug_overlay": 0,
|
|
"auto_adjust_quality": 0,
|
|
}
|
|
)
|
|
assert res.status_code == 200
|