config.py: fix videoteca mediaserver

This commit is contained in:
Intel1
2018-06-26 12:49:46 -05:00
committed by GitHub
parent 29d19cf763
commit ba44e9653c

View File

@@ -310,6 +310,23 @@ def verify_directories_created():
logger.debug("Creating %s: %s" % (path, saved_path))
filetools.mkdir(saved_path)
config_paths = [["folder_movies", "CINE"],
["folder_tvshows", "SERIES"]]
for path, default in config_paths:
saved_path = get_setting(path)
if not saved_path:
saved_path = default
set_setting(path, saved_path)
content_path = filetools.join(get_videolibrary_path(), saved_path)
if not filetools.exists(content_path):
logger.debug("Creating %s: %s" % (path, content_path))
# si se crea el directorio
filetools.mkdir(content_path)
def get_local_ip():
import socket
@@ -372,6 +389,7 @@ if not os.path.exists(get_data_path()):
TRANSLATION_FILE_PATH = os.path.join(get_runtime_path(), "resources", "language", "Spanish", "strings.po")
load_settings()
# modo adulto:
# sistema actual 0: Nunca, 1:Siempre, 2:Solo hasta que se reinicie sesión
# si es == 2 lo desactivamos.