VLC v1 finished, improve on instructions, improve on infra

This commit is contained in:
Timothyxxx
2024-01-10 23:18:30 +08:00
parent abcafce750
commit 49ece15ac3
14 changed files with 174 additions and 35 deletions

View File

@@ -241,6 +241,18 @@ class PythonController:
logger.error("Failed to get window size. Status code: %d", response.status_code)
return None
def get_vm_wallpaper(self):
"""
Gets the wallpaper of the vm.
"""
response = requests.post(self.http_server + "/wallpaper")
if response.status_code == 200:
logger.info("Wallpaper downloaded successfully")
return response.content
else:
logger.error("Failed to get wallpaper. Status code: %d", response.status_code)
return None
def get_vlc_status(self, host='localhost', port=8080, password='password'):
url = f'http://{host}:{port}/requests/status.xml'