Make up missing getters and metrics; Update VLC scripts; Start to work on Chrome, update examples instructions
This commit is contained in:
@@ -9,12 +9,12 @@ def get_vlc_playing_info(env, config: Dict[str, str]):
|
||||
"""
|
||||
Gets the current playing information from VLC's HTTP interface.
|
||||
"""
|
||||
_path = os.path.join(env.cache_dir, config["dest"])
|
||||
|
||||
host = env.vm_ip
|
||||
port = 8080
|
||||
password = 'password'
|
||||
|
||||
_path = os.path.join(env.cache_dir, config["dest"])
|
||||
content = env.controller.get_vlc_status(host, port, password)
|
||||
with open(_path, "wb") as f:
|
||||
f.write(content)
|
||||
@@ -26,22 +26,24 @@ def get_vlc_config(env, config: Dict[str, str]):
|
||||
"""
|
||||
Reads the VLC configuration file to check setting.
|
||||
"""
|
||||
_path = os.path.join(env.cache_dir, config["dest"])
|
||||
|
||||
os_type = env.controller.execute_python_command("import platform; print(platform.system())")['output'].strip()
|
||||
os_type = env.vm_platform
|
||||
|
||||
# fixme: depends on how we config and install the vlc in virtual machine, need to be aligned and double-checked
|
||||
if os_type == "Linux":
|
||||
config_path = \
|
||||
env.controller.execute_python_command("import os; print(os.path.expanduser('~/.config/vlc/vlcrc'))")[
|
||||
'output'].strip()
|
||||
env.controller.execute_python_command("import os; print(os.path.expanduser('~/.config/vlc/vlcrc'))")[
|
||||
'output'].strip()
|
||||
elif os_type == "Darwin":
|
||||
config_path = env.controller.execute_python_command(
|
||||
"import os; print(os.path.expanduser('~/Library/Preferences/org.videolan.vlc/vlcrc'))")['output'].strip()
|
||||
elif os_type == "Windows":
|
||||
config_path = env.controller.execute_python_command(
|
||||
"import os; print(os.path.expanduser('~\\AppData\\Roaming\\vlc\\vlcrc'))")['output'].strip()
|
||||
else:
|
||||
raise Exception("Unsupported operating system", os_type)
|
||||
|
||||
_path = os.path.join(env.cache_dir, config["dest"])
|
||||
content = env.controller.get_file(config_path)
|
||||
with open(_path, "wb") as f:
|
||||
f.write(content)
|
||||
|
||||
Reference in New Issue
Block a user