Пример #1
0
    def __init__(self, session, addon, lst_items):
        self.addon = addon
        contentHandler = VideoAddonContentHandler(session, self, addon.provider)
        BaseContentScreen.__init__(self, session, contentHandler, lst_items)

        # include DownloadList
        DownloadList.__init__(self)

        # include TipList
        TipBar.__init__(self, [self.CSFD_TIP, self.CONTEXT_TIP, self.INFO_TIP], startOnShown=True)

        self["key_red"] = Label("")
        self["key_green"] = Label(_("Downloads"))
        self["key_yellow"] = Label(_("Shortcuts"))
        self["key_blue"] = Label(_("Settings"))
        self["actions"] = ActionMap(["archivCZSKActions"],
            {
                "ok": self.ok,
                "up": self.up,
                "down": self.down,
                "cancel": self.cancel,
                "green" : self.openAddonDownloads,
                "blue": self.openAddonSettings,
                "yellow": self.openAddonShortcuts,
                "info": self.openInfo,
                "menu": self.menu,
                "csfd": self.openCSFD
            }, -2)

        #self.onUpdateGUI.append(self.updateFullTitle)
        self.onLayoutFinish.append(self.setWindowTitle)
Пример #2
0
    def __init__(self, session, content_provider, lst_items):
        contentHandler = StreamContentHandler(session, self, content_provider)
        BaseContentScreen.__init__(self, session, contentHandler, lst_items)
        self.content_provider = content_provider
        # include DownloadList
        DownloadList.__init__(self)

        # include TipList
        TipBar.__init__(self, [self.CONTEXT_TIP], startOnShown=True)

        self["key_red"] = Label(_("Remove"))
        self["key_green"] = Label(_("Downloads"))
        self["key_yellow"] = Label("")
        self["key_blue"] = Label("")

        self['archive_label'] = Label(_("Stream player"))
        self['streaminfo_label'] = MyConditionalLabel(_("STREAM INFO"),
                                                      self.isStream)
        self['streaminfo'] = MyConditionalLabel("", self.isStream)
        self['protocol_label'] = MyConditionalLabel(_("PROTOCOL:"),
                                                    self.isStream)
        self['protocol'] = MyConditionalLabel("", self.isStream)
        self['playdelay_label'] = MyConditionalLabel(_("PLAY DELAY:"),
                                                     self.isStream)
        self['playdelay'] = MyConditionalLabel("", self.isStream)
        self['livestream_pixmap'] = PixmapConditional()
        self['rtmpbuffer_label'] = MyConditionalLabel(_("RTMP BUFFER:"),
                                                      self.isRtmpStream)
        self['rtmpbuffer'] = MyConditionalLabel("", self.isRtmpStream)
        self['playerbuffer_label'] = MyConditionalLabel(
            _("PLAYER BUFFER:"), self.isGstreamerPlayerSelected)
        self['playerbuffer'] = MyConditionalLabel(
            "", self.isGstreamerPlayerSelected)

        self["actions"] = ActionMap(
            ["archivCZSKActions"], {
                "ok": self.ok,
                "up": self.up,
                "down": self.down,
                "cancel": self.cancel,
                "green": self.openDownloads,
                "menu": self.menu
            }, -2)

        self["StreamAction"] = ActionMap(
            ["StreamActions"], {
                "incBuffer": self.increaseRtmpBuffer,
                "decBuffer": self.decreaseRtmpBuffer,
                "incPlayDelay": self.increasePlayDelay,
                "decPlayDelay": self.decreasePlayDelay,
                "red": self.removeStream,
                "refresh": self.refreshList
            }, -3)

        self.oldService = self.session.nav.getCurrentlyPlayingServiceReference(
        )

        self.onUpdateGUI.append(self.updateStreamInfo)
        self.onLayoutFinish.append(self.updateGUI)
        self.onClose.append(self.__onClose)
Пример #3
0
 def __init__(self, session, provider):
     contentHandler = VideoAddonManagementScreenContentHandler(
         session, self, provider)
     addonItems = provider.get_content({
         'category_addons': 'all_addons',
         'filter_enabled': False
     })
     BaseContentScreen.__init__(self, session, contentHandler, addonItems)
     TipBar.__init__(self, [], startOnShown=False)
     if self.HD:
         self.setSkin('ArchivCZSKContentScreen_HD')
     else:
         self.setSkin('ArchivCZSKContentScreen_SD')
     self.updateGUITimer = eTimer()
     self.updateGUITimer.callback.append(self.updateAddonGUI)
     self.onUpdateGUI.append(self.changeAddon)
     self.onClose.append(self.__onClose)
     self["image"] = Pixmap()
     self["title"] = Label("")
     self["author"] = Label("")
     self["version"] = Label("")
     self["about"] = Label("")
     self["key_red"] = Label("")
     self["key_green"] = Label("")
     self["key_yellow"] = Label("")
     self["key_blue"] = Label("")
     self["actions"] = ActionMap(
         ["archivCZSKActions"], {
             "ok": self.menu,
             "cancel": self.close,
             "up": self.up,
             "down": self.down,
             "menu": self.menu
         }, -2)
     self.onLayoutFinish.append(self.updateAddonGUI)
Пример #4
0
    def __init__(self, session, addon, lst_items):
        self.addon = addon
        contentHandler = VideoAddonContentHandler(session, self, addon.provider)
        BaseContentScreen.__init__(self, session, contentHandler, lst_items)

        # include DownloadList
        DownloadList.__init__(self)

        # include TipList
        TipBar.__init__(self, [self.CSFD_TIP, self.CONTEXT_TIP, self.INFO_TIP], startOnShown=True)

        self["key_red"] = Label("")
        self["key_green"] = Label(_("Downloads"))
        self["key_yellow"] = Label(_("Shortcuts"))
        self["key_blue"] = Label(_("Settings"))
        self["actions"] = ActionMap(["archivCZSKActions"],
            {
                "ok": self.ok,
                "up": self.up,
                "down": self.down,
                "cancel": self.cancel,
                "green" : self.openAddonDownloads,
                "blue": self.openAddonSettings,
                "yellow": self.openAddonShortcuts,
                "info": self.openInfo,
                "menu": self.menu,
                "csfd": self.openCSFD
            }, -2)

        #self.onUpdateGUI.append(self.updateFullTitle)
        self.onLayoutFinish.append(self.setWindowTitle)
Пример #5
0
 def __init__(self, session, provider):
     contentHandler = VideoAddonManagementScreenContentHandler(session, self, provider)
     addonItems = provider.get_content({'category_addons':'all_addons', 'filter_enabled':False})
     BaseContentScreen.__init__(self, session, contentHandler, addonItems)
     TipBar.__init__(self, [], startOnShown = False)
     if self.HD:
         self.setSkin('ArchivCZSKContentScreen_HD')
     else:
         self.setSkin('ArchivCZSKContentScreen_SD')
     self.updateGUITimer = eTimer()
     self.updateGUITimer.callback.append(self.updateAddonGUI)
     self.onUpdateGUI.append(self.changeAddon)
     self.onClose.append(self.__onClose)
     self["image"] = Pixmap()
     self["title"] = Label("")
     self["author"] = Label("")
     self["version"] = Label("")
     self["about"] = Label("")
     self["key_red"] = Label("")
     self["key_green"] = Label("")
     self["key_yellow"] = Label("")
     self["key_blue"] = Label("")
     self["actions"] = ActionMap(["archivCZSKActions"],
          {
                 "ok": self.menu,
                 "cancel": self.close,
                 "up": self.up,
                 "down": self.down,
                 "menu" : self.menu
          }, -2)
     self.onLayoutFinish.append(self.updateAddonGUI)
Пример #6
0
    def __init__(self, session, archivCZSK):
        provider = ArchivCZSKContentProvider(
            archivCZSK, os.path.join(settings.PLUGIN_PATH, 'categories'))
        provider.start()
        contentHandler = ArchivCZSKContentHandler(session, self, provider)
        defaultCategory = config.plugins.archivCZSK.defaultCategory.value
        categoryItem = categoryAddons = None
        if defaultCategory != 'categories':
            categoryItem = provider.get_content({'category': defaultCategory})
            categoryAddons = provider.get_content(
                {'category_addons': defaultCategory})
            categoryAddons is not None and categoryAddons.insert(0, PExit())
        categoryItems = provider.get_content()
        BaseContentScreen.__init__(self, session, contentHandler,
                                   categoryItems)
        if categoryItem is not None and categoryAddons is not None:
            self.save()
            self.load({
                'lst_items': categoryAddons,
                'parent_it': categoryItem,
                'refresh': False
            })
        self.ctx_items.append((_("Add Category"), None, self.addCategory))
        self.provider = provider
        self.updateGUITimer = eTimer()
        self.updateGUITimer.callback.append(self.updateAddonGUI)

        # include DownloadList
        DownloadList.__init__(self)

        # include TipList
        TipBar.__init__(self, [self.CONTEXT_TIP], startOnShown=True)
        self.onUpdateGUI.append(self.changeAddon)
        self.onClose.append(self.__onClose)

        self["image"] = Pixmap()
        self["title"] = Label("")
        self["author"] = Label("")
        self["version"] = Label("")
        self["about"] = Label("")

        self["key_red"] = Label("")
        self["key_green"] = Label(_("Manager"))
        self["key_yellow"] = Label(_("Live streams"))
        self["key_blue"] = Label(_("Settings"))

        self["actions"] = ActionMap(
            ["archivCZSKActions"], {
                "ok": self.ok,
                "cancel": self.cancel,
                "up": self.up,
                "down": self.down,
                "blue": self.openSettings,
                "green": self.openAddonManagement,
                "yellow": self.showStreams,
                "menu": self.menu
            }, -2)
        # after layout show update item "GUI" - edit: shamann
        self.onLayoutFinish.append(self.updateAddonGUI)
Пример #7
0
    def __init__(self, session, addon, lst_items):
        self.addon = addon
        contentHandler = VideoAddonContentHandler(session, self,
                                                  addon.provider)
        BaseContentScreen.__init__(self, session, contentHandler, lst_items)

        # include DownloadList
        DownloadList.__init__(self)

        self.updateGUITimer = eTimer()
        self.updateGUITimer_conn = eConnectCallback(
            self.updateGUITimer.timeout, self.updateAddonGUI)
        self.onUpdateGUI.append(self.changeAddon)
        self.onClose.append(self.__onClose)

        #settigns
        self.showImageEnabled = config.plugins.archivCZSK.downloadPoster.getValue(
        )
        self.maxSavedImages = int(
            config.plugins.archivCZSK.posterImageMax.getValue())
        self.imagePosterDir = os.path.join(
            config.plugins.archivCZSK.posterPath.getValue(),
            'archivczsk_poster')
        self.noImage = os.path.join(settings.PLUGIN_PATH, 'gui', 'icon',
                                    'no_movie_image.png')

        # include TipList
        TipBar.__init__(self, [self.CSFD_TIP, self.CONTEXT_TIP, self.INFO_TIP],
                        startOnShown=True)

        self["key_red"] = Label(_("Changelog"))
        self["key_green"] = Label(_("Downloads"))
        self["key_yellow"] = Label(_("Shortcuts"))
        self["key_blue"] = Label(_("Settings"))
        self["movie_poster_image"] = Pixmap()
        poster_processing = PosterProcessing(self.maxSavedImages,
                                             self.imagePosterDir)
        self.poster = PosterPixmapHandler(self["movie_poster_image"],
                                          poster_processing, self.noImage)
        self["movie_rating"] = Label("")
        self["movie_duration"] = Label("")
        self["movie_plot"] = Label("")

        self["actions"] = ActionMap(
            ["archivCZSKActions"], {
                "ok": self.ok,
                "up": self.up,
                "down": self.down,
                "cancel": self.cancel,
                "red": self.openChangelog,
                "green": self.openAddonDownloads,
                "blue": self.openAddonSettings,
                "yellow": self.openAddonShortcuts,
                "info": self.openInfo,
                "menu": self.menu,
                "csfd": self.openCSFD
            }, -2)
        #self.onUpdateGUI.append(self.updateFullTitle)
        self.onLayoutFinish.append(self.setWindowTitle)
Пример #8
0
    def __init__(self, session, content_provider, lst_items):
        contentHandler = StreamContentHandler(session, self, content_provider)
        BaseContentScreen.__init__(self, session, contentHandler, lst_items)
        self.content_provider = content_provider
        # include DownloadList
        DownloadList.__init__(self)

        # include TipList
        TipBar.__init__(self, [self.CONTEXT_TIP], startOnShown=True)

        self["key_red"] = Label(_("Remove"))
        self["key_green"] = Label(_("Downloads"))
        self["key_yellow"] = Label("")
        self["key_blue"] = Label("")

        self['archive_label'] = Label(_("Stream player"))
        self['streaminfo_label'] = MyConditionalLabel(_("STREAM INFO"), self.isStream)
        self['streaminfo'] = MyConditionalLabel("", self.isStream)
        self['protocol_label'] = MyConditionalLabel(_("PROTOCOL:"), self.isStream)
        self['protocol'] = MyConditionalLabel("", self.isStream)
        self['playdelay_label'] = MyConditionalLabel(_("PLAY DELAY:"), self.isStream)
        self['playdelay'] = MyConditionalLabel("", self.isStream)
        self['livestream_pixmap'] = PixmapConditional()
        self['rtmpbuffer_label'] = MyConditionalLabel(_("RTMP BUFFER:"), self.isRtmpStream)
        self['rtmpbuffer'] = MyConditionalLabel("", self.isRtmpStream)
        self['playerbuffer_label'] = MyConditionalLabel(_("PLAYER BUFFER:"), self.isGstreamerPlayerSelected)
        self['playerbuffer'] = MyConditionalLabel("", self.isGstreamerPlayerSelected)


        self["actions"] = ActionMap(["archivCZSKActions"],
            {
                "ok": self.ok,
                "up": self.up,
                "down": self.down,
                "cancel": self.cancel,
                "green" : self.openDownloads,
                "menu": self.menu
            }, -2)


        self["StreamAction"] = ActionMap(["StreamActions"],
            {
                "incBuffer": self.increaseRtmpBuffer,
                "decBuffer": self.decreaseRtmpBuffer,
                "incPlayDelay" : self.increasePlayDelay,
                "decPlayDelay" : self.decreasePlayDelay,
                "red" : self.removeStream,
                "refresh":self.refreshList
            }, -3)

        self.oldService = self.session.nav.getCurrentlyPlayingServiceReference()

        self.onUpdateGUI.append(self.updateStreamInfo)
        self.onLayoutFinish.append(self.updateGUI)
        self.onClose.append(self.__onClose)
Пример #9
0
    def __init__(self, session, archivCZSK):
        provider = ArchivCZSKContentProvider(archivCZSK, os.path.join(settings.PLUGIN_PATH, 'categories'))
        provider.start()
        contentHandler = ArchivCZSKContentHandler(session, self, provider)
        defaultCategory = config.plugins.archivCZSK.defaultCategory.value
        categoryItem = categoryAddons = None
        if defaultCategory != 'categories':
            categoryItem = provider.get_content({'category':defaultCategory})
            categoryAddons = provider.get_content({'category_addons':defaultCategory})
            categoryAddons is not None and categoryAddons.insert(0, PExit())
        categoryItems = provider.get_content()
        BaseContentScreen.__init__(self, session, contentHandler, categoryItems)
        if categoryItem is not None  and categoryAddons is not None:
            self.save()
            self.load({'lst_items':categoryAddons,
                            'parent_it':categoryItem,
                            'refresh':False})
        self.ctx_items.append((_("Add Category"), None, self.addCategory))
        self.provider = provider
        self.updateGUITimer = eTimer()
        self.updateGUITimer.callback.append(self.updateAddonGUI)

        # include DownloadList
        DownloadList.__init__(self)

        # include TipList
        TipBar.__init__(self, [self.CONTEXT_TIP], startOnShown=True)
        self.onUpdateGUI.append(self.changeAddon)
        self.onClose.append(self.__onClose)

        self["image"] = Pixmap()
        self["title"] = Label("")
        self["author"] = Label("")
        self["version"] = Label("")
        self["about"] = Label("")

        self["key_red"] = Label("")
        self["key_green"] = Label(_("Manager"))
        self["key_yellow"] = Label(_("Live streams"))
        self["key_blue"] = Label(_("Settings"))

        self["actions"] = ActionMap(["archivCZSKActions"],
            {
                "ok": self.ok,
                "cancel": self.cancel,
                "up": self.up,
                "down": self.down,
                "blue": self.openSettings,
                "green": self.openAddonManagement,
                "yellow": self.showStreams,
                "menu" : self.menu
            }, -2)
        # after layout show update item "GUI" - edit: shamann
        self.onLayoutFinish.append(self.updateAddonGUI)
Пример #10
0
    def __init__(self, session, provider):

        contentHandler = VideoAddonManagementScreenContentHandler(
            session, self, provider)
        addonItems = provider.get_content({
            'category_addons': 'all_addons',
            'filter_enabled': False,
            'filter_supported': False
        })
        BaseContentScreen.__init__(self, session, contentHandler, addonItems)
        TipBar.__init__(self, [self.CONTEXT_TIP], startOnShown=False)
        self.skinName = "ArchivCZSKContentScreen"
        self["menu"].style = "management"
        self.updateGUITimer = eTimer()
        self.updateGUITimer_conn = eConnectCallback(
            self.updateGUITimer.timeout, self.updateAddonGUI)
        self.onUpdateGUI.append(self.changeAddon)
        self.onClose.append(self.__onClose)
        self["image"] = Pixmap()
        self["title"] = Label("")
        self["author"] = Label("")
        self["version"] = Label("")
        self["about"] = Label("")
        self["key_red"] = Label("")
        self["key_green"] = Label("")
        self["key_yellow"] = Label("")
        self["key_blue"] = Label("")
        self["actions"] = ActionMap(
            ["archivCZSKActions"], {
                "ok": self.menu,
                "cancel": self.close,
                "up": self.up,
                "down": self.down,
                "menu": self.menu
            }, -2)
        self.onLayoutFinish.append(self.updateAddonGUI)
Пример #11
0
    def __init__(self, session, archivCZSK):
        provider = ArchivCZSKContentProvider(
            archivCZSK, os.path.join(settings.PLUGIN_PATH, 'categories'))
        provider.start()
        contentHandler = ArchivCZSKContentHandler(session, self, provider)
        defaultCategory = config.plugins.archivCZSK.defaultCategory.value
        categoryItem = categoryAddons = None
        if defaultCategory != 'categories':
            categoryItem = provider.get_content({'category': defaultCategory})
            categoryAddons = provider.get_content(
                {'category_addons': defaultCategory})
            # dont add PExit() if default category is user created cat.
            gotParrent = True
            try:
                gotParrent = self.getParent() is not None
            except:
                pass
            if gotParrent and (defaultCategory == 'all_addons'
                               or defaultCategory == 'tv_addons'
                               or defaultCategory == 'video_addons'):
                categoryAddons is not None and categoryAddons.insert(
                    0, PExit())
        categoryItems = provider.get_content()
        BaseContentScreen.__init__(self, session, contentHandler,
                                   categoryItems)
        if categoryItem is not None and categoryAddons is not None:
            self.save()
            self.load({
                'lst_items': categoryAddons,
                'parent_it': categoryItem,
                'refresh': False
            })
        self.ctx_items.append((_("Add Category"), None, self.addCategory))
        self.provider = provider
        self.updateGUITimer = eTimer()
        self.updateGUITimer_conn = eConnectCallback(
            self.updateGUITimer.timeout, self.updateAddonGUI)

        # include DownloadList
        DownloadList.__init__(self)

        # include TipList
        TipBar.__init__(self, [self.CONTEXT_TIP], startOnShown=True)
        self.onUpdateGUI.append(self.changeAddon)
        self.onClose.append(self.__onClose)

        from Plugins.Extensions.archivCZSK.version import version
        self.setTitle("ArchivCZSK (" + toString(version) + ")")
        self["image"] = Pixmap()
        self["title"] = Label("")
        self["author"] = Label("")
        self["version"] = Label("")
        self["about"] = Label("")

        self["key_red"] = Label(_("Manager"))
        self["key_green"] = Label(_("Support us"))
        self["key_yellow"] = Label("")
        self["key_blue"] = Label(_("Settings"))

        self["actions"] = ActionMap(
            ["archivCZSKActions"], {
                "ok": self.ok,
                "cancel": self.cancel,
                "up": self.up,
                "down": self.down,
                "blue": self.openSettings,
                "green": self.showIconD,
                "red": self.openAddonManagement,
                "menu": self.menu
            }, -2)
        # after layout show update item "GUI" - edit: shamann
        self.onLayoutFinish.append(self.updateAddonGUI)