summaryrefslogtreecommitdiff
path: root/switcher.py
diff options
context:
space:
mode:
authorSophie Schiller <sophie.schiller01@gmail.com>2023-05-01 13:47:22 +0200
committerSophie Schiller <sophie.schiller01@gmail.com>2023-05-01 13:47:22 +0200
commit08a20d02065db4c55d9dfa57225b2329a3d9225e (patch)
treee4490645b30ba5bd46242a03cb17775543a61cd5 /switcher.py
parentb96cf40b72e73b7d6e8f0d4476e811ccba35aa9a (diff)
rename inputs on startup
Diffstat (limited to 'switcher.py')
-rw-r--r--switcher.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/switcher.py b/switcher.py
index c025ce7..6454850 100644
--- a/switcher.py
+++ b/switcher.py
@@ -63,9 +63,6 @@ class PyATEMSwitcher:
def _push_config(self):
conf = self.config.get('settings', {})
-
- # TODO setInputLongName
- # TODO setInputShortName
# TODO media upload to MP1
if 'video_mode' in self.config:
@@ -75,6 +72,13 @@ class PyATEMSwitcher:
)
if self.atem.videoMode.format != video_mode:
self.atem.setVideoModeFormat(video_mode)
+
+ if conf.get('inputs', None):
+ for i in range(1,5):
+ input_name = conf['inputs'][f'hdmi{i}']
+ self.log.debug(f"setting input {i} to name '{input_name}'")
+ self.atem.setInputLongName(i, input_name)
+ self.atem.setInputShortName(i, input_name[0:3])
def _validate_config(self):
if 'ip' not in self.config: