mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Fix unexistant directory crash
For saving data.txt for the connect module
This commit is contained in:
parent
cd602dd94a
commit
6a5399a3a8
1 changed files with 8 additions and 2 deletions
|
@ -6,6 +6,7 @@ import logging
|
||||||
|
|
||||||
import xbmc
|
import xbmc
|
||||||
import xbmcaddon
|
import xbmcaddon
|
||||||
|
import xbmcvfs
|
||||||
|
|
||||||
import clientinfo
|
import clientinfo
|
||||||
import read_embyserver as embyserver
|
import read_embyserver as embyserver
|
||||||
|
@ -43,8 +44,13 @@ class ConnectManager(object):
|
||||||
appVersion=version,
|
appVersion=version,
|
||||||
deviceName=device_name,
|
deviceName=device_name,
|
||||||
deviceId=device_id)
|
deviceId=device_id)
|
||||||
self._connect.setFilePath(xbmc.translatePath(
|
path = xbmc.translatePath(
|
||||||
"special://profile/addon_data/plugin.video.emby/").decode('utf-8'))
|
"special://profile/addon_data/plugin.video.emby/").decode('utf-8')
|
||||||
|
|
||||||
|
if not xbmcvfs.exists(path):
|
||||||
|
xbmcvfs.mkdirs(path)
|
||||||
|
|
||||||
|
self._connect.setFilePath(path)
|
||||||
self.state = self._connect.connect()
|
self.state = self._connect.connect()
|
||||||
log.info("Started with: %s", self.state)
|
log.info("Started with: %s", self.state)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue