Initialize VLC getters and metrics, fix some bugs in infra logic, needs to be refactored later on
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
from .file import get_cloud_file, get_vm_file
|
||||
from .misc import get_rule
|
||||
from .vlc import get_vlc_playing_info
|
||||
|
||||
@@ -3,6 +3,7 @@ from typing import Dict
|
||||
import os
|
||||
import requests
|
||||
|
||||
|
||||
def get_cloud_file(env, config: Dict[str, str]) -> str:
|
||||
"""
|
||||
Config:
|
||||
@@ -25,6 +26,7 @@ def get_cloud_file(env, config: Dict[str, str]) -> str:
|
||||
|
||||
return _path
|
||||
|
||||
|
||||
def get_vm_file(env, config: Dict[str, str]) -> str:
|
||||
"""
|
||||
Config:
|
||||
@@ -33,12 +35,9 @@ def get_vm_file(env, config: Dict[str, str]) -> str:
|
||||
"""
|
||||
|
||||
_path = os.path.join(env.cache_dir, config["dest"])
|
||||
if os.path.exists(_path):
|
||||
return _path
|
||||
|
||||
file = env.controller.get_file(config["path"])
|
||||
with open(_path, "wb") as f:
|
||||
f.write(file)
|
||||
|
||||
return _path
|
||||
|
||||
|
||||
@@ -2,4 +2,5 @@ from .table import compare_table
|
||||
from .table import check_sheet_list, check_xlsx_freeze, check_zoom
|
||||
from .docs import find_default_font, contains_page_break, compare_docx_files, compare_docx_tables, compare_line_spacing, compare_insert_equation
|
||||
from .docs import compare_font_names, compare_subscript_contains, has_page_numbers_in_footers
|
||||
from .docs import is_first_line_centered, check_file_exists, compare_contains_image
|
||||
from .docs import is_first_line_centered, check_file_exists, compare_contains_image
|
||||
from .vlc import is_vlc_playing
|
||||
|
||||
Reference in New Issue
Block a user