MCPcopy
hub / github.com/Guovin/iptv-api / resource_path

Function resource_path

utils/config.py:9–22  ·  view source on GitHub ↗

Get the resource path

(relative_path, persistent=False)

Source from the content-addressed store, hash-verified

7
8
9def resource_path(relative_path, persistent=False):
10 """
11 Get the resource path
12 """
13 base_path = os.path.abspath(".")
14 total_path = os.path.join(base_path, relative_path)
15 if persistent or os.path.exists(total_path):
16 return total_path
17 else:
18 try:
19 base_path = sys._MEIPASS
20 return os.path.join(base_path, relative_path)
21 except Exception:
22 return total_path
23
24
25def get_resolution_value(resolution_str):

Callers 13

_load_localeFunction · 0.90
update_fileFunction · 0.90
get_result_file_contentFunction · 0.90
get_urls_from_fileFunction · 0.90
get_name_urls_from_fileFunction · 0.90
get_name_uri_from_dirFunction · 0.90
get_version_infoFunction · 0.90
get_subscribe_entriesFunction · 0.90
count_disabled_urlsFunction · 0.90
disable_urls_in_fileFunction · 0.90
loadMethod · 0.70
saveMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected