Files
2023-01-22 16:20:27 +01:00

22 lines
496 B
Python

#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
try: # Kodi >= 19
from xbmcvfs import translatePath
except ImportError: # Kodi 18
from xbmc import translatePath
import os
import xbmcaddon
from .log import LOG
addon = xbmcaddon.Addon()
profile_dir = translatePath(addon.getAddonInfo('profile'))
LOG("Profile directory: {}".format(profile_dir))
if not os.path.exists(profile_dir):
LOG('Creating {}'.format(profile_dir))
os.makedirs(profile_dir)