✨ Include dafault album image in build.

This commit is contained in:
Robert Honz
2024-04-01 19:54:11 +02:00
parent f9dd50b464
commit 1dcfd98a75
3 changed files with 18 additions and 3 deletions
+10
View File
@@ -2,6 +2,7 @@ import glob
import math
import os
import re
import sys
from pathlib import Path, PosixPath
from pathvalidate import sanitize_filename, sanitize_filepath
@@ -243,3 +244,12 @@ def check_file_exists(path_file: str, extension_ignore: bool = False) -> bool:
result = bool(sum([glob.glob(_file) for _file in path_files], []))
return result
def resource_path(relative_path):
try:
base_path = sys._MEIPASS
except Exception:
base_path = os.path.abspath(".")
return os.path.join(base_path, relative_path)