def __init__(self, session):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution("AdvancedMovieSelection_ClientSetup_")
     self.staticIP = getIpAddress('eth0')
     self.session = session
     self["key_red"] = Button(_("Close"))
     self["key_green"] = StaticText("")
     self["key_yellow"] = StaticText("")
     self["actions"] = ActionMap(["WizardActions", "MenuActions", "ShortcutActions", "EPGSelectActions"],
         {
              "ok": self.keySave,
              "back": self.keyCancel,
              "red": self.keyCancel,
              "green": self.keySave,
              "yellow": self.keyYellow,
              "up": self.keyUp,
              "down": self.keyDown,
              "nextBouquet": self.keyBouquetUp,
              "prevBouquet": self.keyBouquetDown,
          }, -1)
     self["status"] = StaticText("")
     self["help"] = StaticText("")
     self["green_button"] = Pixmap()
     self["yellow_button"] = Pixmap()
     self["green_button"].hide()
     self["yellow_button"].hide()
     self["clienttxt"] = StaticText("")
     self["list"] = ClientSetupList(self.staticIP)
     self.list = self["list"]
     self.list.reload()
     self.configList = []
     ConfigListScreen.__init__(self, self.configList, session=self.session)
     if not self.showHelp in self["config"].onSelectionChanged:
         self["config"].onSelectionChanged.append(self.showHelp)
     self.onShown.append(self.setWindowTitle)
Beispiel #2
0
 def __init__(self, session, tags, txt=None, parent=None):
     Screen.__init__(self, session, parent=parent)
     self.skinName = SkinTools.appendResolution(
         "AdvancedMovieSelectionTagEditor")
     self["key_red"] = StaticText(_("Cancel"))
     self["key_green"] = StaticText(_("Save/Close"))
     self["key_yellow"] = StaticText(_("Create new Tag"))
     self["key_blue"] = StaticText("")
     self["key_blue"] = StaticText(_("Load Tag(s) from movies"))
     self["info"] = StaticText(_("Use the OK Button for the selection."))
     self["list"] = SelectionList()
     self.TimerEntry = TimerEntry
     allTags = self.loadTagsFile()
     self.joinTags(allTags, tags)
     self.updateMenuList(allTags, tags)
     self.ghostlist = tags[:]
     self.ghosttags = allTags[:]
     self.origtags = allTags[:]
     self.tags = allTags
     self["actions"] = ActionMap(
         ["OkCancelActions", "ColorActions", "MenuActions"], {
             "ok": self["list"].toggleSelection,
             "cancel": self.cancel,
             "red": self.cancel,
             "green": self.accept,
             "yellow": self.addCustom,
             "blue": self.loadFromHdd,
             "menu": self.showMenu
         }, -1)
     self.defaulttaglist(tags)
     self.setCustomTitle(tags)
 def __init__(self, session, tags, txt = None, parent = None):
     Screen.__init__(self, session, parent = parent)
     self.skinName = SkinTools.appendResolution("AdvancedMovieSelectionTagEditor")
     self["key_red"] = StaticText(_("Cancel"))
     self["key_green"] = StaticText(_("Save/Close"))
     self["key_yellow"] = StaticText(_("Create new Tag"))
     self["key_blue"] = StaticText("")
     self["key_blue"] = StaticText(_("Load Tag(s) from movies"))
     self["info"] = StaticText(_("Use the OK Button for the selection."))
     self["list"] = SelectionList()
     self.TimerEntry = TimerEntry
     allTags = self.loadTagsFile()
     self.joinTags(allTags, tags)
     self.updateMenuList(allTags, tags)
     self.ghostlist = tags[:]
     self.ghosttags = allTags[:]
     self.origtags = allTags[:]
     self.tags = allTags
     self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "MenuActions"],
     {
         "ok": self["list"].toggleSelection,
         "cancel": self.cancel,
         "red": self.cancel,
         "green": self.accept,
         "yellow": self.addCustom,
         "blue": self.loadFromHdd,
         "menu": self.showMenu
     }, -1)
     self.defaulttaglist(tags)
     self.setCustomTitle(tags)
Beispiel #4
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution(
         "AdvancedMovieSelectionAbout")
     self["aboutActions"] = ActionMap(
         ["ShortcutActions", "WizardActions", "InfobarEPGActions"], {
             "red": self.close,
             "green": self.showchanges,
             "back": self.close,
             "ok": self.close,
         }, -1)
     v = _("Version:")
     b = _("Branch:")
     info = "%s %s.r%s, %s\n  %s %s" % (
         v, Version.__version__, Version.__refision__, Version.__date__, b,
         Version.__branch__)
     self["version"] = StaticText(info)
     self["author"] = StaticText(_("Developer:\n  JackDaniel, cmikula"))
     self["translation"] = StaticText(
         _("Thanks for translation to:\n") + '  nl=Bschaar')
     self["license"] = StaticText(
         _("This plugin may only executed on hardware which is licensed by Dream Multimedia GmbH."
           ))
     self["thanks"] = StaticText(
         _("Thanks to all other for help and so many very good code."))
     self["key_red"] = StaticText(_("Close"))
     self["key_green"] = StaticText(_("Show changes"))
     self["red"] = Pixmap()
     self["green"] = Pixmap()
     self.onLayoutFinish.append(self.setWindowTitle)
Beispiel #5
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution(
         "AdvancedMovieSelectionAboutDetails_")
     self["aboutActions"] = ActionMap(
         [
             "ShortcutActions", "WizardActions", "InfobarEPGActions",
             "EPGSelectActions"
         ], {
             "red": self.close,
             "back": self.close,
             "nextBouquet": self.pageUp,
             "nextBouquet": self.pageUp,
             "prevBouquet": self.pageDown,
             "prevBouquet": self.pageDown,
         }, -1)
     self["key_red"] = StaticText()
     self["red"] = Pixmap()
     self["red"].hide()
     self["bouquet+"] = Pixmap()
     self["bouquet+"].hide()
     self["bouquet-"] = Pixmap()
     self["bouquet-"].hide()
     self["version_list"] = VersionList()
     self["version_list"].hide()
     self["details"] = ScrollLabel()
     self["details"].hide()
     self.onShown.append(self.setWindowTitle)
    def __init__(self, session, items, coverSize, service=None):
        Screen.__init__(self, session)
        self.skinName = SkinTools.appendResolution("AdvancedMovieSelectionDownload")
        self.onShow.append(self.selectionChanged)
        self.service = service
        self.coversize = coverSize
        self["logo"] = Pixmap()  
        self["info"] = Label()
        self["title"] = Label()
        self["poster"] = Pixmap()
        self["poster"].hide()
        self["description"] = ScrollLabel()
        self["key_red"] = Button(_("Cancel"))
        self["key_green"] = Button("")
        self["key_yellow"] = Button("")
        self["key_yellow"] = Label(_("Manual search"))
        if self.service is not None:
            self["key_green"] = Label(_("Save infos/cover"))
        else:
            self["key_green"] = Label(_("Background"))
            self["key_yellow"].hide()

        self["ActionsMap"] = ActionMap(["SetupActions", "ColorActions"],
         {
          "ok": self.titleSelected,
          "green": self.titleSelected,
          "red": self.__cancel,
          "yellow": self.editTitle,
          "cancel": self.__cancel,
          "left": self.scrollLabelPageUp,
          "right": self.scrollLabelPageDown
          }, -1)
        self.onShown.append(self.setWindowTitle)
      
        self.l = []
        self["list"] = MenuList(self.l)
        self["list"].onSelectionChanged.append(self.selectionChanged)
        
        self.picload = ePicLoad()
        self.picload.PictureData.get().append(self.paintPosterPixmap)
        self.refreshTimer = eTimer()
        self.refreshTimer.callback.append(self.refresh)

        if self.service is not None:
            global movie_title
            movie_title = ServiceCenter.getInstance().info(self.service).getName(self.service).encode("utf-8").split(" - ")[0].strip()
            self.refreshTimer.start(1, True)
            return
        
        global fetchingMovies, this_session, is_hidden
        if fetchingMovies is None:
            fetchingMovies = FetchingMovies(items, coverSize)
        else:
            fetchingMovies.cancel = False
        self.progressTimer = eTimer()
        self.progressTimer.callback.append(self.updateProgress)
        self.progressTimer.start(250, False)
        this_session = session
        is_hidden = False
    def __init__(self, session, instance, fwd):
        Screen.__init__(self, session)
        self.skinName = SkinTools.appendResolution(
            "AdvancedMovieSelectionSeekbar")
        self.session = session
        self.infobarInstance = instance
        self.fwd = fwd
        if isinstance(session.current_dialog, MoviePlayer):
            self.dvd = False
        else:
            self.dvd = True
        self.percent = 0.0
        self.length = None
        service = session.nav.getCurrentService()
        if service:
            self.seek = service.seek()
            if self.seek:
                self.length = self.seek.getLength()
                position = self.seek.getPlayPosition()
                if self.length and position:
                    if int(position[1]) > 0:
                        self.percent = float(position[1]) * 100.0 / float(
                            self.length[1])

        self.minuteInput = ConfigNumber(default=5)
        self.positionEntry = ConfigSelection(
            choices=[_("Use arrow left/right for position")],
            default=_("Use arrow left/right for position"))
        if self.fwd:
            txt = _("Jump x minutes forward (OK for seek):")
        else:
            txt = _("Jump x minutes back (OK for seek):")
        ConfigListScreen.__init__(self, [
            getConfigListEntry(txt, self.minuteInput),
            getConfigListEntry(_("Go manual to position (OK for seek):"),
                               self.positionEntry)
        ])
        self["cursor"] = MovingPixmap()
        self["time"] = Label()
        self["actions"] = ActionMap(["WizardActions"], {"back": self.exit}, -1)
        self.cursorTimer = eTimer()
        self.cursorTimer.callback.append(self.updateCursor)
        self.cursorTimer.start(200, False)
        self.onShown.append(self.setWindowTitle)
        self.onLayoutFinish.append(self.firstStart)
        self.firstime = True
        self.onExecBegin.append(self.__onExecBegin)
Beispiel #8
0
 def __init__(self, session, service):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution("AdvancedMovieSelection_Rename_")
     self.service = service
     self.movieConfig = MovieConfig()
     self.is_vdir = isinstance(service, eServiceReferenceVDir)
     self.is_dir = service.flags & eServiceReference.mustDescent
     serviceHandler = ServiceCenter.getInstance()
     info = serviceHandler.info(service)
     path = service.getPath()
     if self.is_vdir:
         parts = path.split("/")
         if len(parts) > 2:
             dirName = parts[-3] + "/" + parts[-2]
         else: 
             dirName = parts[-2]
         self.original_file = dirName 
     elif self.is_dir:
         self.original_file = service.getName()
     else:
         self.original_file = os.path.basename(os.path.splitext(path)[0])
     if self.is_vdir:
         self.original_name = self.movieConfig.getRenamedName(service.getName())
     else:
         self.original_name = info.getName(service)
     self.original_desc = info.getInfoString(service, iServiceInformation.sDescription)
     self.input_file = ConfigText(default=self.original_file, fixed_size=False, visible_width=82)
     self.input_title = ConfigText(default=self.original_name, fixed_size=False, visible_width=82)
     self.input_descr = ConfigText(default=self.original_desc, fixed_size=False, visible_width=82)
     self["key_green"] = StaticText(_("Save"))
     self["key_red"] = StaticText(_("Cancel"))
     self["actions"] = ActionMap(["SetupActions"],
     {
         "ok": self.keyGo,
         "save": self.keyGo,
         "cancel": self.keyCancel,
     }, -2)
     self.list = [ ]
     ConfigListScreen.__init__(self, self.list, session=self.session)
     self.createSetup()
     self["Path"] = Label(_("Location:") + ' ' + os.path.dirname(os.path.splitext(path)[0]))
     self["HelpWindow"] = Pixmap()
     self.onLayoutFinish.append(self.setCustomTitle)
 def __init__(self, session, instance, fwd):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution("AdvancedMovieSelectionSeekbar")
     self.session = session
     self.infobarInstance = instance
     self.fwd = fwd
     if isinstance(session.current_dialog, MoviePlayer):
         self.dvd = False
     else:
         self.dvd = True
     self.percent = 0.0
     self.length = None
     service = session.nav.getCurrentService()
     if service:
         self.seek = service.seek()
         if self.seek:
             self.length = self.seek.getLength()
             position = self.seek.getPlayPosition()
             if self.length and position:
                 if int(position[1]) > 0:
                     self.percent = float(position[1]) * 100.0 / float(self.length[1])
     
     self.minuteInput = ConfigNumber(default=5)
     self.positionEntry = ConfigSelection(choices=[_("Use arrow left/right for position")], default=_("Use arrow left/right for position"))
     if self.fwd:
         txt = _("Jump x minutes forward (OK for seek):")
     else:
         txt = _("Jump x minutes back (OK for seek):")
     ConfigListScreen.__init__(self, [getConfigListEntry(txt, self.minuteInput), getConfigListEntry(_("Go manual to position (OK for seek):"), self.positionEntry)])        
     self["cursor"] = MovingPixmap()
     self["time"] = Label()
     self["actions"] = ActionMap(["WizardActions"], 
         {"back": self.exit}, 
     -1)
     self.cursorTimer = eTimer()
     self.cursorTimer.callback.append(self.updateCursor)
     self.cursorTimer.start(200, False)
     self.onShown.append(self.setWindowTitle)
     self.onLayoutFinish.append(self.firstStart)
     self.firstime = True
     self.onExecBegin.append(self.__onExecBegin)
Beispiel #10
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution(
         "AdvancedMovieSelectionTrash")
     self.delayTimer = eTimer()
     self.delayTimer.callback.append(self.updateHDDData)
     self.current_ref = eServiceReferenceTrash(
         config.movielist.last_videodir.value)
     self["ColorActions"] = HelpableActionMap(
         self, "ColorActions", {
             "red": (self.canDelete, _("Delete selected movie")),
             "green": (self.restore, _("Restore movie")),
             "yellow": (self.canDeleteAll, _("Empty wastbasket")),
             "blue": (self.restoreAll, _("Restore all movies")),
         })
     self["key_red"] = Button(_("Delete movie"))
     self["key_green"] = Button(_("Restore movie"))
     self["key_yellow"] = Button(_("Empty Trash"))
     self["key_blue"] = Button(_("Restore all movies"))
     self["waitingtext"] = Label(_("Please wait... Loading trash list..."))
     self["freeDiskSpace"] = self.diskinfo = DiskInfo(
         config.movielist.last_videodir.value, DiskInfo.FREE, update=False)
     self["location"] = Label()
     self["warning"] = Label()
     self["wastetxt"] = Label()
     self["MenuIcon"] = Pixmap()
     self["autoemptylast"] = Label()
     self["autoemptynext"] = Label()
     self["list"] = TrashMovieList(None)
     self.list = self["list"]
     self.staticIP = getIpAddress('eth0')
     self["OkCancelActions"] = HelpableActionMap(
         self, "OkCancelActions",
         {"cancel": (self.abort, _("Exit wastebasket"))})
     self["MenuActions"] = HelpableActionMap(
         self, "MenuActions",
         {"menu": (self.clientSetup, _("Clientbox setup"))})
     self.inited = False
     self.onShown.append(self.setWindowTitle)
 def __init__(self, session):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution("AdvancedMovieSelectionTrash")
     self.delayTimer = eTimer()
     self.delayTimer.callback.append(self.updateHDDData)
     self.current_ref = eServiceReferenceTrash(config.movielist.last_videodir.value)  
     self["ColorActions"] = HelpableActionMap(self, "ColorActions",
     {
         "red": (self.canDelete, _("Delete selected movie")),
         "green": (self.restore, _("Restore movie")),
         "yellow": (self.canDeleteAll, _("Empty wastbasket")),
         "blue": (self.restoreAll, _("Restore all movies")),
     })
     self["key_red"] = Button(_("Delete movie"))
     self["key_green"] = Button(_("Restore movie"))
     self["key_yellow"] = Button(_("Empty Trash"))
     self["key_blue"] = Button(_("Restore all movies"))
     self["waitingtext"] = Label(_("Please wait... Loading trash list..."))
     self["freeDiskSpace"] = self.diskinfo = DiskInfo(config.movielist.last_videodir.value, DiskInfo.FREE, update=False)
     self["location"] = Label()
     self["warning"] = Label()
     self["wastetxt"] = Label()
     self["MenuIcon"] = Pixmap()
     self["autoemptylast"] = Label()
     self["autoemptynext"] = Label()
     self["list"] = TrashMovieList(None)
     self.list = self["list"]
     self.staticIP = getIpAddress('eth0')
     self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions",
         {
             "cancel": (self.abort, _("Exit wastebasket"))
         })
     self["MenuActions"] = HelpableActionMap(self, "MenuActions",
         {
             "menu": (self.clientSetup, _("Clientbox setup"))
         })        
     self.inited = False
     self.onShown.append(self.setWindowTitle)
Beispiel #12
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution("AdvancedMovieSelectionAbout")
     self["aboutActions"] = ActionMap(["ShortcutActions", "WizardActions", "InfobarEPGActions"],
     {
         "red": self.close,
         "green": self.showchanges,
         "back": self.close,
         "ok": self.close,
     }, -1)
     v = _("Version:")
     b = _("Branch:")
     info = "%s %s.r%s, %s\n  %s %s" % (v, Version.__version__, Version.__refision__, Version.__date__, b, Version.__branch__)
     self["version"] = StaticText(info)
     self["author"] = StaticText(_("Developer:\n  JackDaniel, cmikula"))
     self["translation"] = StaticText(_("Thanks for translation to:\n") + '  nl=Bschaar')
     self["license"] = StaticText(_("This plugin may only executed on hardware which is licensed by Dream Multimedia GmbH."))
     self["thanks"] = StaticText(_("Thanks to all other for help and so many very good code."))
     self["key_red"] = StaticText(_("Close"))
     self["key_green"] = StaticText(_("Show changes"))
     self["red"] = Pixmap()
     self["green"] = Pixmap()
     self.onLayoutFinish.append(self.setWindowTitle)
Beispiel #13
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution("AdvancedMovieSelectionAboutDetails_")
     self["aboutActions"] = ActionMap(["ShortcutActions", "WizardActions", "InfobarEPGActions", "EPGSelectActions"],
     {
         "red": self.close,
         "back": self.close,
         "nextBouquet": self.pageUp,
         "nextBouquet": self.pageUp,
         "prevBouquet": self.pageDown,
         "prevBouquet": self.pageDown,
     }, -1)
     self["key_red"] = StaticText()
     self["red"] = Pixmap()
     self["red"].hide()
     self["bouquet+"] = Pixmap()
     self["bouquet+"].hide()
     self["bouquet-"] = Pixmap()
     self["bouquet-"].hide()
     self["version_list"] = VersionList()
     self["version_list"].hide()
     self["details"] = ScrollLabel()
     self["details"].hide()
     self.onShown.append(self.setWindowTitle)
 def __init__(self, session, event, ref, callback=None, similarEPGCB=None):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution("AdvancedMovieSelectionEventView")
     EventViewBase.__init__(self, event, ref, callback, similarEPGCB)
     MoviePreview.__init__(self, session)
from Components.Language import language
from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_LANGUAGE
from os import environ
import gettext
from skin import loadSkin
from Globals import SkinTools

skin_path = resolveFilename(
    SCOPE_PLUGINS
) + "Extensions/AdvancedMovieSelection/skin/" + SkinTools.getSkinName()
print "[AdvancedMovieSelection] load skin: %s" % skin_path
loadSkin(skin_path)


def localeInit():
    lang = language.getLanguage()
    environ["LANGUAGE"] = lang[:2]
    gettext.bindtextdomain("enigma2", resolveFilename(SCOPE_LANGUAGE))
    gettext.textdomain("enigma2")
    gettext.bindtextdomain(
        "AdvancedMovieSelection",
        "%s%s" % (resolveFilename(SCOPE_PLUGINS),
                  "Extensions/AdvancedMovieSelection/locale/"))

    ln = language.lang[language.activeLanguage][1]
    from AboutParser import AboutParser
    AboutParser.setLocale(ln)
    from MovieDB import tmdb, tvdb
    tmdb.setLocale(ln)
    tvdb.setLocale(ln)
 def __init__(self, session, event, ref, callback=None, similarEPGCB=None):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution(
         "AdvancedMovieSelectionEventView")
     EventViewBase.__init__(self, event, ref, callback, similarEPGCB)
     MoviePreview.__init__(self, session)