mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-25 09:12:38 +00:00
a430bffe57
- added tld library, so "Common Fixes" mod can detect domain names and won't add spaces after each dot in them. - fix HI_before_colon_noncaps, so it won't remove http: from URLs.
22 lines
510 B
Python
22 lines
510 B
Python
from os.path import abspath, join
|
|
|
|
from .conf import get_setting
|
|
|
|
__author__ = 'Artur Barseghyan'
|
|
__copyright__ = '2013-2020 Artur Barseghyan'
|
|
__license__ = 'MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later'
|
|
__all__ = (
|
|
'project_dir',
|
|
'PROJECT_DIR',
|
|
)
|
|
|
|
|
|
def project_dir(base: str) -> str:
|
|
"""Project dir."""
|
|
tld_names_local_path_parent = get_setting('NAMES_LOCAL_PATH_PARENT')
|
|
return abspath(
|
|
join(tld_names_local_path_parent, base).replace('\\', '/')
|
|
)
|
|
|
|
|
|
PROJECT_DIR = project_dir
|