Files
jellycon/resources/lib/datamanager.py

37 lines
749 B
Python
Raw Normal View History

# Gnu General Public License - see LICENSE.TXT
2014-10-30 14:29:19 +11:00
import hashlib
import os
import threading
import json
import encodings
2014-10-30 14:29:19 +11:00
import xbmcaddon
import xbmc
2017-03-10 09:32:49 +11:00
from downloadutils import DownloadUtils
2017-03-17 07:10:35 +11:00
from simple_logging import SimpleLogging
from utils import getChecksum
from kodi_utils import HomeWindow
2014-10-30 14:29:19 +11:00
log = SimpleLogging(__name__)
2017-03-10 10:45:38 +11:00
class DataManager():
cacheDataResult = None
dataUrl = None
cacheDataPath = None
canRefreshNow = False
def __init__(self, *args):
2017-07-08 10:34:30 +10:00
log.debug("DataManager __init__")
2014-10-30 14:29:19 +11:00
def loadJasonData(self, jsonData):
return json.loads(jsonData)
2014-10-30 14:29:19 +11:00
def GetContent(self, url):
jsonData = DownloadUtils().downloadUrl(url)
2017-12-07 19:54:09 +11:00
result = self.loadJasonData(jsonData)
return result
2017-04-19 13:23:44 +10:00
2014-10-30 14:29:19 +11:00