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

Function resource_path

utils/tools.py:589–602  ·  view source on GitHub ↗

Get the resource path

(relative_path, persistent=False)

Source from the content-addressed store, hash-verified

587
588
589def resource_path(relative_path, persistent=False):
590 """
591 Get the resource path
592 """
593 base_path = os.path.abspath(".")
594 total_path = os.path.join(base_path, relative_path)
595 if persistent or os.path.exists(total_path):
596 return total_path
597 else:
598 try:
599 base_path = sys._MEIPASS
600 return os.path.join(base_path, relative_path)
601 except Exception:
602 return total_path
603
604
605def write_content_into_txt(content, path=None, position=None, callback=None):

Callers 15

__init__Method · 0.90
get_channel_itemsFunction · 0.90
load_whitelist_mapsFunction · 0.90
get_section_entriesFunction · 0.90
__init__Method · 0.90
rtmp.pyFile · 0.90
faviconFunction · 0.90
show_logoFunction · 0.90
init_uiMethod · 0.90
edit_fileMethod · 0.90
edit_epg_fileMethod · 0.90
create_tray_iconMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected