use metadata.ini for meta filename
This commit is contained in:
parent
3bb32befe9
commit
bde439ef67
|
@ -43,13 +43,13 @@ class Extension:
|
||||||
|
|
||||||
@functools.cached_property
|
@functools.cached_property
|
||||||
def metadata(self):
|
def metadata(self):
|
||||||
if os.path.isfile(os.path.join(self.path, "sd_webui_metadata.ini")):
|
if os.path.isfile(os.path.join(self.path, "metadata.ini")):
|
||||||
try:
|
try:
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read(os.path.join(self.path, "sd_webui_metadata.ini"))
|
config.read(os.path.join(self.path, "metadata.ini"))
|
||||||
return config
|
return config
|
||||||
except Exception:
|
except Exception:
|
||||||
errors.report(f"Error reading sd_webui_metadata.ini for extension {self.canonical_name}.",
|
errors.report(f"Error reading metadata.ini for extension {self.canonical_name}.",
|
||||||
exc_info=True)
|
exc_info=True)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -177,14 +177,14 @@ def list_extensions():
|
||||||
canonical_name = extension_dirname
|
canonical_name = extension_dirname
|
||||||
requires = None
|
requires = None
|
||||||
|
|
||||||
if os.path.isfile(os.path.join(path, "sd_webui_metadata.ini")):
|
if os.path.isfile(os.path.join(path, "metadata.ini")):
|
||||||
try:
|
try:
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read(os.path.join(path, "sd_webui_metadata.ini"))
|
config.read(os.path.join(path, "metadata.ini"))
|
||||||
canonical_name = config.get("Extension", "Name", fallback=canonical_name)
|
canonical_name = config.get("Extension", "Name", fallback=canonical_name)
|
||||||
requires = config.get("Extension", "Requires", fallback=None)
|
requires = config.get("Extension", "Requires", fallback=None)
|
||||||
except Exception:
|
except Exception:
|
||||||
errors.report(f"Error reading sd_webui_metadata.ini for extension {extension_dirname}. "
|
errors.report(f"Error reading metadata.ini for extension {extension_dirname}. "
|
||||||
f"Will load regardless.", exc_info=True)
|
f"Will load regardless.", exc_info=True)
|
||||||
|
|
||||||
canonical_name = canonical_name.lower().strip()
|
canonical_name = canonical_name.lower().strip()
|
||||||
|
|
Loading…
Reference in New Issue