mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-08 14:43:34 +08:00
refactor(log): add support for configurable log settings in .env
This commit is contained in:
@@ -471,3 +471,15 @@ class SystemUtils:
|
||||
if os.name == "nt":
|
||||
return src.drive == dest.drive
|
||||
return os.stat(src).st_dev == os.stat(dest).st_dev
|
||||
|
||||
@staticmethod
|
||||
def get_config_path() -> Path:
|
||||
"""
|
||||
获取配置路径
|
||||
"""
|
||||
if SystemUtils.is_docker():
|
||||
return Path("/config")
|
||||
elif SystemUtils.is_frozen():
|
||||
return Path(sys.executable).parent / "config"
|
||||
else:
|
||||
return Path(__file__).parents[2] / "config"
|
||||
|
||||
Reference in New Issue
Block a user