Skip to content

Commit

Permalink
GetSessionLength impl
Browse files Browse the repository at this point in the history
  • Loading branch information
iluvcapra committed Jan 8, 2023
1 parent 8cdcde9 commit 15d544a
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ track_list = c.get_track_list()
|GetSessionName| ☑️ |
|GetSessionPath| ☑️ |
|GetSessionStartTime| ☑️ |
|GetSessionLength| |
|GetSessionLength| ☑️ |
|SetSessionAudioFormat| |
|SetSessionBitDepth| |
|SetSessionInterleavedState| |
Expand Down
4 changes: 4 additions & 0 deletions examples/session_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
client.run(get_session_start_time_op)
print("Session Start Time: %s" % get_session_start_time_op.start_time)

get_session_length_op = GetSessionLength()
client.run(get_session_length_op)
print("Session Length: %s" % get_session_length_op.session_length)

get_session_ff_op = GetSessionFeetFramesRate()
client.run(get_session_ff_op)
print("Session Feet+Frames Rate: %s" % pt.SessionFeetFramesRate.Name(get_session_ff_op.rate))
Expand Down
3 changes: 2 additions & 1 deletion ptsl/ops/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
from .get_session_feet_frames_rate import GetSessionFeetFramesRate
from .get_session_interleaved_state import GetSessionInterleavedState
from .get_session_audio_pull_settings import GetSessionAudioPullSettings
from .get_session_video_pull_settings import GetSessionVideoPullSettings
from .get_session_video_pull_settings import GetSessionVideoPullSettings
from .get_session_length import GetSessionLength
27 changes: 27 additions & 0 deletions ptsl/ops/get_session_length.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from typing import Optional

from ptsl import PTSL_pb2 as pt

from ptsl.ops import Operation

class GetSessionLength(Operation):

request: None
session_length: str

def __init__(self) -> None:
self.session_length = None
super().__init__()

def command_id(self):
return pt.GetSessionLength

def response_body_prototype(self):
return pt.GetSessionLengthResponseBody()

def on_response_body(self, body: pt.GetSessionLengthResponseBody):
self.session_length = body.session_length




0 comments on commit 15d544a

Please sign in to comment.