Example #1
0
    def __init__(self, updateFun=None, downloadNew=True):
        # download queue
        self.queueDQ = []
        self.lockDQ = threading.Lock()
        self.workThread = None

        # already available
        self.queueAA = []
        self.lockAA = threading.Lock()

        #this function will be called after a new icon will be available
        self.updateFun = updateFun

        if not os_path.exists(self.DOWNLOADED_IMAGE_PATH):
            iptvtools_mkdirs(self.DOWNLOADED_IMAGE_PATH)

        #load available icon from disk
        self.loadHistoryFromDisk()

        self.stopThread = False

        self.checkSpace = 0  # if 0 the left space on disk will be checked
        self.downloadNew = downloadNew

        pass
Example #2
0
 def __init__(self, updateFun = None, downloadNew = True):
     # download queue
     self.queueDQ = []
     self.lockDQ = threading.Lock()
     self.workThread = None
     
     # already available
     self.queueAA = []
     self.lockAA = threading.Lock()
     
     #this function will be called after a new icon will be available
     self.updateFun = updateFun
     
     if not os_path.exists(self.DOWNLOADED_IMAGE_PATH):
         iptvtools_mkdirs(self.DOWNLOADED_IMAGE_PATH)
     
     #load available icon from disk
     self.loadHistoryFromDisk()
     
     self.stopThread = False
     
     self.checkSpace = 0 # if 0 the left space on disk will be checked
     self.downloadNew = downloadNew
     
     pass
Example #3
0
    def __init__(self, session):
        self.session = session
        Screen.__init__(self, session)
        self.BRConsole = Console() #j00zek
        self.nagrywanie=False #j00zek

        self.CurrentService = self.session.nav.getCurrentlyPlayingServiceReference()
        #self.session.nav.stopService()
        self.session.nav.event.append(self.__event)

        self["key_red"] = StaticText("Exit")
        #self["key_green"] = StaticText("Config")
        #self["key_yellow"] = StaticText("Show pictures")
        #self["key_blue"] = StaticText("Info")

        self["list"] = MyListComponent()
        self["list"].connectSelChanged(self.onSelectionChanged)
        self["statustext"] = Label("Pobieranie listy...")
        self["actions"] = ActionMap(["WizardActions", "DirectionActions", "ColorActions"],
        {
            "ok": self.ok_pressed,
            "back": self.back_pressed,
            "red": self.red_pressed,
            #"green": self.green_pressed,
            #"yellow": self.yellow_pressed,
            #"blue": self.blue_pressed,
           
        }, -1)     

        self["titel"] = Label()
        self["station"] = Label()
        self["headertext"] = Label()
        self["console"] = Label()
        
        self["cover"] = Cover()
        self["cover"].hide()
        
        self["playerlogo"] = Cover()
        
        self.showMessageNoFreeSpaceForIcon = False
        self.iconManager = None
        if config.plugins.BoardReader.showcover.value:
            if not os_path.exists(config.plugins.BoardReader.SciezkaCache.value):
                iptvtools_mkdirs(config.plugins.BoardReader.SciezkaCache.value)
            if iptvtools_FreeSpace(config.plugins.BoardReader.SciezkaCache.value,10):
                self.iconManager = IconManager(self.checkIconCallBack, True)
            else:
                self.showMessageNoFreeSpaceForIcon = True
                self.iconManager = IconManager(self.checkIconCallBack, False)
  
        self.onClose.append(self.__onClose)
        #self.onLayoutFinish.append(self.selectHost)
        self.onShow.append(self.onStart)
        
        #Defs
        self.searchPattern = ''
        self.searchType = None
        
        self.changeIcon = True
        
        self.started = 0
        self.workThread = None
        
        self.host = None
        self.hostName = ''
        
        self.nextSelIndex = 0
        self.currSelIndex = 0
        
        self.prevSelList = []
        self.categoryList = []
      
        self.currList = []
        self.currSelectedItemName = ""

        self.visible = True
        
    
        #################################################################
        #                      Inits for Proxy Queue
        #################################################################
       
        # register function in main Queue
        global gMainFunctionsQueue
        gMainFunctionsQueue = CFunctionProxyQueue()
        gMainFunctionsQueue.unregisterAllFunctions()
        gMainFunctionsQueue.clearQueue()
            
        gMainFunctionsQueue.registerFunction(self.reloadList)
        gMainFunctionsQueue.registerFunction(self.checkIconCallBack)
        gMainFunctionsQueue.registerFunction(self.updateCover)
        gMainFunctionsQueue.registerFunction(self.displayIcon)
        
        #main Queue
        self.mainTimer = eTimer()
        self.mainTimer.timeout.get().append(self.processProxyQueue)
        # every 100ms Proxy Queue will be checked  
        self.mainTimer.start(100)
Example #4
0
    def __init__(self, session):
        self.session = session
        Screen.__init__(self, session)

        self.session.nav.event.append(self.__event)

        self["key_red"] = StaticText(_("Exit"))

        self["list"] = MyListComponent()
        self["list"].connectSelChanged(self.onSelectionChanged)
        self["statustext"] = Label(_("Downloading list..."))
        self["actions"] = ActionMap(["WizardActions", "DirectionActions", "ColorActions"],
        {
            "ok": self.ok_pressed,
            "back": self.back_pressed,
            "red": self.red_pressed,
        }, -1)     

        self["headertext"] = Label()
        self["console"] = Label()
        
        self["cover"] = Cover()
        self["cover"].hide()
        
        self["playerlogo"] = Cover()
        
        self.showMessageNoFreeSpaceForIcon = False
        self.iconManager = None
        if not os_path.exists("/tmp/BoardsReaderCache/"):
            iptvtools_mkdirs("/tmp/BoardsReaderCache/")
        if iptvtools_FreeSpace("/tmp/BoardsReaderCache/",10):
            self.iconManager = IconManager(self.checkIconCallBack, True)
        else:
            self.showMessageNoFreeSpaceForIcon = True
            self.iconManager = IconManager(self.checkIconCallBack, False)
  
        self.onClose.append(self.__onClose)
        #self.onLayoutFinish.append(self.selectHost)
        self.onShow.append(self.onStart)
        
        #Defs
        self.searchPattern = ''
        self.searchType = None
        
        self.changeIcon = True
        
        self.started = 0
        self.workThread = None
        
        self.host = None
        self.hostName = ''
        
        self.nextSelIndex = 0
        self.currSelIndex = 0
        
        self.prevSelList = []
        self.categoryList = []
      
        self.currList = []
        self.currSelectedItemName = ""

        self.visible = True
        
    
        #################################################################
        #                      Inits for Proxy Queue
        #################################################################
       
        # register function in main Queue
        global gMainFunctionsQueue
        gMainFunctionsQueue = CFunctionProxyQueue()
        gMainFunctionsQueue.unregisterAllFunctions()
        gMainFunctionsQueue.clearQueue()
            
        gMainFunctionsQueue.registerFunction(self.reloadList)
        gMainFunctionsQueue.registerFunction(self.checkIconCallBack)
        gMainFunctionsQueue.registerFunction(self.updateCover)
        gMainFunctionsQueue.registerFunction(self.displayIcon)
        
        #main Queue
        self.mainTimer = eTimer()
        self.mainTimer.timeout.get().append(self.processProxyQueue)
        # every 100ms Proxy Queue will be checked  
        self.mainTimer.start(100)
Example #5
0
    def __init__(self, session):
        self.session = session
        Screen.__init__(self, session)

        self.session.nav.event.append(self.__event)

        self["key_red"] = StaticText(_("Exit"))

        self["list"] = MyListComponent()
        self["list"].connectSelChanged(self.onSelectionChanged)
        self["statustext"] = Label(_("Downloading list..."))
        self["actions"] = ActionMap(
            ["WizardActions", "DirectionActions", "ColorActions"], {
                "ok": self.ok_pressed,
                "back": self.back_pressed,
                "red": self.red_pressed,
            }, -1)

        self["headertext"] = Label()
        self["console"] = Label()

        self["cover"] = Cover()
        self["cover"].hide()

        self["playerlogo"] = Cover()

        self.showMessageNoFreeSpaceForIcon = False
        self.iconManager = None
        if not os_path.exists("/tmp/BoardsReaderCache/"):
            iptvtools_mkdirs("/tmp/BoardsReaderCache/")
        if iptvtools_FreeSpace("/tmp/BoardsReaderCache/", 10):
            self.iconManager = IconManager(self.checkIconCallBack, True)
        else:
            self.showMessageNoFreeSpaceForIcon = True
            self.iconManager = IconManager(self.checkIconCallBack, False)

        self.onClose.append(self.__onClose)
        #self.onLayoutFinish.append(self.selectHost)
        self.onShow.append(self.onStart)

        #Defs
        self.searchPattern = ''
        self.searchType = None

        self.changeIcon = True

        self.started = 0
        self.workThread = None

        self.host = None
        self.hostName = ''

        self.nextSelIndex = 0
        self.currSelIndex = 0

        self.prevSelList = []
        self.categoryList = []

        self.currList = []
        self.currSelectedItemName = ""

        self.visible = True

        #################################################################
        #                      Inits for Proxy Queue
        #################################################################

        # register function in main Queue
        global gMainFunctionsQueue
        gMainFunctionsQueue = CFunctionProxyQueue()
        gMainFunctionsQueue.unregisterAllFunctions()
        gMainFunctionsQueue.clearQueue()

        gMainFunctionsQueue.registerFunction(self.reloadList)
        gMainFunctionsQueue.registerFunction(self.checkIconCallBack)
        gMainFunctionsQueue.registerFunction(self.updateCover)
        gMainFunctionsQueue.registerFunction(self.displayIcon)

        #main Queue
        self.mainTimer = eTimer()
        self.mainTimer.timeout.get().append(self.processProxyQueue)
        # every 100ms Proxy Queue will be checked
        self.mainTimer.start(100)