Example #1
0
 def showContent(self):
     channel = Kartina.Channel.getByID(Kartina.interface, self.parent.Video.currentChannelID)
     self.cicon = channel.getIcon()
     if not self.parent.Video.playingArchive:
         channel.fillEPG(time.strftime("%d%m%y", time.localtime(Kartina.getTime())))
         self.getProgramsFromEPG(channel.getEPG())
         if self.ctime == None:
             channel.fillEPG(time.strftime("%d%m%y", time.localtime(Kartina.getTime()+24*3600)))
             self.getProgramsFromEPG(channel.getEPG())
             if self.ctime == None:
                 self.ctime = Kartina.getTime()
                 self.cprog = "- Nicht verfügbar -"
             if self.cntime == None:
                 self.cntime = Kartina.getTime()
                 self.cnprog = "- Nicht verfügbar -"
         if self.cntime == None:
             self.cntime = Kartina.getTime()
             self.cnprog = "- Nicht verfügbar -"
     else:
         channel.fillEPG(self.parent.Video.EPG.playDay)
         setbreak = False
         for item in channel.getEPG():
             if item != None and len(item) != 6:
                 if setbreak:
                     self.cntime = item[0]
                     break                                       
                 elif item[0] == self.parent.Video.titlePosition:
                     self.ctime = item[0]
                     self.cprog = self.filterNameFromEPG(item[1])
                     setbreak = True
     self.setText(self.ctime, self.cprog, self.cntime, self.cnprog, self.parent.Video.currentChannelID)
     self.setIcon()
     OSD.showContent(self)
Example #2
0
 def __init__(self, videoarea, parent):
     OSDList.__init__(self, videoarea, parent)
     
     ### Variables
     self.currentDay = time.strftime("%d%m%y", time.localtime(Kartina.getTime()))
     self.playDay = time.strftime("%d%m%y", time.localtime(Kartina.getTime()))
     
     ### Layout
     self.lTitle = QtGui.QLabel(self)
     self.lHelp = QtGui.QLabel(self)
     self.lProg1 = QtGui.QLabel(self)
     self.lProg2 = QtGui.QLabel(self)
     self.lProg3 = QtGui.QLabel(self)
     self.lProg4 = QtGui.QLabel(self)
     self.lProg5 = QtGui.QLabel(self)
     self.lProg6 = QtGui.QLabel(self)
     
     self.listOfEntrys.append(self.lProg1)
     self.listOfEntrys.append(self.lProg2)
     self.listOfEntrys.append(self.lProg3)
     self.listOfEntrys.append(self.lProg4)
     self.listOfEntrys.append(self.lProg5)
     self.listOfEntrys.append(self.lProg6)
     
     hBox = QtGui.QHBoxLayout()
     hBox.setContentsMargins(0, 0, 0, 0)
     hBox.setSpacing(0)
     hBox.addWidget(self.lTitle, 1)
     hBox.addWidget(self.lHelp, 0)
     
     channelVBox = QtGui.QVBoxLayout(self)
     channelVBox.addLayout(hBox, 0)
     channelVBox.addWidget(self.lProg1, 1)
     channelVBox.addWidget(self.lProg2, 1)
     channelVBox.addWidget(self.lProg3, 1)
     channelVBox.addWidget(self.lProg4, 1)
     channelVBox.addWidget(self.lProg5, 1)
     channelVBox.addWidget(self.lProg6, 1)
     channelVBox.setContentsMargins(0, 0, 0, 0)
     channelVBox.setSpacing(0)
     
     ### Class Settings
     self.typeOfList = "EPG"
     self.nrOfEntrys = 6
     self.setFontDivider(25)        
     
     ### Class postInit
     OSDList.postInit(self, videoarea)
Example #3
0
 def keyStop(self):
     if OSD.pausedelay != 0 or self.Video.playingArchive:
         OSD.pausedelay = 0
         self.Video.totalJump = 0
         OSD.delayTimer.stop()
         self.Video.loadStream(Kartina.getTime(), True)
         self.Video.Notify.displayMessage("◼")
         self.Video.setMode("normal")
Example #4
0
 def getProgramsFromEPG(self, epg):
     for item in epg:
         if item != None and len(item) != 6:
             if int(item[0]) <= Kartina.getTime():
                 self.ctime = item[0]
                 self.parent.Video.MoreInfo.textInfo = item[1]
                 self.cprog = self.filterNameFromEPG(item[1])                        
             else:
                 self.cntime = item[0]
                 self.cnprog = self.filterNameFromEPG(item[1])
                 break
Example #5
0
 def __init__(self, videoarea, parent):
     OSD.__init__(self, parent)
     
     ### Variables
     self.typeOfList = "List"
     self.nrOfEntrys = 0
     
     self.currentEntry = 0
     self.entryCount = 0
     self.listOfEntrys = []
     self.listOfContent = []
     self.position = Kartina.getTime()
Example #6
0
 def jump(self, jump):
     playTime = self.playTimeBuffer        
     if int(self.playPosition) + playTime + jump <= Kartina.getTime() + Kartina.timeshift - 15*60:
         self.playPosition = int(self.playPosition) + playTime + jump
         OSD.pausedelay = OSD.pausedelay - jump
         self.loadStream(self.playPosition, True)
         if jump > 0:
             notifytext = "▶▶ " + str(int(jump/60)) + " Min"
         else:
             notifytext = "◀◀ " + str(int(abs(jump)/60)) + " Min"
     else:
         notifytext = "☹"
     self.Notify.displayMessage(notifytext)
Example #7
0
 def applyContent(self, i, start, item):
     if item[0] == self.parent.Video.Info.ctime:
         self.highlightEntry(i, "#334C25")
     else:
         self.unHighlightEntry(i)
     if self.currentEntry == i + start:
         self.highlightEntry(i)
         self.position = item[0]
         self.parent.Video.MoreInfo.textInfo = item[1]
     if int(item[0]) <= Kartina.getTime() and Kartina.Channel.getByID(Kartina.interface, self.parent.Video.Clist.listOfContent[self.parent.Video.Clist.currentEntry]).getArchive():
         play = "<font style='color: #27C8FF'>▶</font>"
     else:
         play = ""     
     self.listOfEntrys[i].setText("<font style='color: #FFFFFF; font-size: " + self.fontsize + "px'>&nbsp;<b><font style='color: #000000; background-color: #FFFFFF;'>&nbsp;" + convertTime(item[0]) + "&nbsp;</font> " + play + " " + item[1] + "</b></font>")
Example #8
0
    def __init__(self, parent = None):
        super(VideoPlayer, self).__init__(parent)
        
        self.Instance = vlc.Instance()
        self.MediaPlayer = self.Instance.media_player_new()
        self.MediaPlayer.video_set_scale(0)
        
        self.currentChannelID = Kartina.interface.channelList.getGroups()[0].getChannels()[1].getID()
        
        self.setGeometry(0, 0, 1024, 576)
               
        Palette = self.palette()
        Palette.setColor(QtGui.QPalette.Window, QtGui.QColor(0,0,0))
        self.setPalette(Palette)
        self.setAutoFillBackground(True)
        
        self.playingArchive = False
        self.playPosition = Kartina.getTime()
        self.titlePosition = 0
        
        self.connect(OSD.delayTimer, QtCore.SIGNAL("timeout()"), self.addToDelayTimeBuffer)
        
        self.playTimeBuffer = 0
        self.playTime = QtCore.QTimer(self)
        self.playTime.setInterval(1000)
        self.connect(self.playTime, QtCore.SIGNAL("timeout()"), self.addToPlayTimeBuffer)

        self.OSDRefreshTimer = QtCore.QTimer(self)
        self.OSDRefreshTimer.setInterval(50)
        self.connect(self.OSDRefreshTimer, QtCore.SIGNAL("timeout()"), self.refreshOSD)
        self.OSDRefreshTimer.start()
        
        self.Clist = OSD.OSDChannelList(self.getGeometry(), parent)
        self.EPG = OSD.OSDEPG(self.getGeometry(), parent)
        self.Info = OSD.OSDInfo(self.getGeometry(), parent)
        self.MoreInfo = OSD.OSDMoreInfo(self.getGeometry(), parent)
        self.Notify = OSD.OSDNotify(self.getGeometry(), parent)
        self.ShutDown = OSD.OSDShutDown(self.getGeometry(), parent)
        
        self.loadStream(self.playPosition, True)
Example #9
0
 def prevList(self):
     if time.mktime(time.strptime(self.currentDay, "%d%m%y")) > Kartina.getTime() - 24 * 3600 * 14:
         newday = time.mktime(time.strptime(self.currentDay, "%d%m%y")) - 24 * 3600
         self.currentDay = time.strftime("%d%m%y", time.localtime(newday))
         self.resetEntrys()
         OSDList.prevList(self)  
Example #10
0
 def nextList(self):
     if time.mktime(time.strptime(self.currentDay, "%d%m%y")) < Kartina.getTime() - 24 * 3600:
         newday = time.mktime(time.strptime(self.currentDay, "%d%m%y")) + 24 * 3600
         self.currentDay = time.strftime("%d%m%y", time.localtime(newday))
         self.resetEntrys()
         OSDList.nextList(self)