示例#1
0
    def MiseAJour(self):

        saga = ""
        logMsg(
            "1 : %s - %s -%s" %
            (self.mettreajourID, self.mettreajourTYPE, self.mettreajourLABEL))
        if not self.mettreajourID:
            self.mettreajourID = xbmc.getInfoLabel("ListItem.DBID")
        if not self.mettreajourLABEL:
            self.mettreajourLABEL = xbmc.getInfoLabel("ListItem.Label")
        if not self.mettreajourTYPE:
            self.mettreajourTYPE = xbmc.getInfoLabel("ListItem.DBTYPE")
        logMsg(
            "2: %s - %s -%s" %
            (self.mettreajourID, self.mettreajourTYPE, self.mettreajourLABEL))
        if xbmc.getCondVisibility("Container.Content(artists)"):
            self.mettreajourTYPE = "artist"
        if (self.mettreajourTYPE == "set" or self.mettreajourTYPE == "movie"
                or self.mettreajourTYPE == "tvshow"
                or self.mettreajourTYPE == "artist"
                or self.mettreajourTYPE == "season" or saga != ""):
            if saga == "":
                Unique = "ok"
            else:
                Unique = ""

            if self.mettreajourTYPE != "season":
                dialog = xbmcgui.Dialog()
                if self.mettreajourTYPE == "movie":
                    Titre = __skin_string__(342)
                if self.mettreajourTYPE == "set":
                    Titre = __skin_string__(20434)
                if self.mettreajourTYPE == "tvshow":
                    Titre = __skin_string__(20343)
                if self.mettreajourTYPE == "artist":
                    Titre = __skin_string__(36917)

                if self.mettreajourTYPE != "movie":
                    Choix = [
                        __language__(32502) + Titre,
                        __language__(32503) + Titre
                    ]
                else:
                    Choix = [__language__(32510)]
                if Unique and self.mettreajourID and not self.mettreajourTYPE == "movie":
                    Choix.append(
                        __language__(32507) + " [COLOR=yellow]" +
                        utils.try_decode(self.mettreajourLABEL) + "[/COLOR]")

                if self.mettreajourTYPE == "set" or self.mettreajourTYPE == "movie" or self.mettreajourTYPE == "tvshow":
                    Choix.append(
                        __language__(32514) + " [COLOR=yellow]" +
                        utils.try_decode(self.mettreajourLABEL) + "[/COLOR]")
                if self.mettreajourTYPE == "tvshow":
                    Choix.append(__language__(32511))

                ret = dialog.select(Titre, Choix)
            else:
                ret = 0
            if (ret >= 0):
                self.windowhome.setProperty("IconMixArt", "ok")
            if ret == 0:  #tous
                if self.mettreajourTYPE == "set": utils.UpdateSagas(0, 1)
                if self.mettreajourTYPE == "tvshow": utils.UpdateSeries(0, 1)
                if self.mettreajourTYPE == "movie":
                    utils.updateartworkall("Movies")
                if self.mettreajourTYPE == "artist":
                    utils.UpdateArtistes(None, 1)
            if ret == 1:  #que les nouveaux ou film unique
                if self.mettreajourTYPE == "set": utils.UpdateSagas()
                if self.mettreajourTYPE == "movie":
                    utils.updatemovieartwork(self.mettreajourID)
                if self.mettreajourTYPE == "tvshow": utils.UpdateSeries()
                if self.mettreajourTYPE == "artist": utils.UpdateArtistes()
            if ret == 2 and Unique:  #item en cours
                if self.mettreajourTYPE == "set":
                    utils.UpdateSagas(self.mettreajourID)
                if self.mettreajourTYPE == "tvshow":
                    utils.UpdateSeries(self.mettreajourID)
                if self.mettreajourTYPE == "artist":
                    utils.UpdateArtistes(self.mettreajourID)
            if ret == 3 and Unique:  #ArtWorks
                if self.mettreajourTYPE == "set":
                    utils.UpdateSagas(self.mettreajourID, None, True)
                if self.mettreajourTYPE == "tvshow":
                    utils.updatetvartwork(self.mettreajourID)
            if ret == 4 and Unique:  #ArtWorks
                if self.mettreajourTYPE == "tvshow":
                    utils.updateartworkall("TvShows")

            self.windowhome.clearProperty("IconMixArt")
示例#2
0
    def MiseAJour(self):
        saga = ""
        DBTYPEX = xbmc.getInfoLabel("ListItem.DBTYPE")
        if xbmc.getCondVisibility("Container.Content(artists)"):
            DBTYPEX = "artist"
        if (DBTYPEX == "set" or DBTYPEX == "movie" or DBTYPEX == "tvshow"
                or DBTYPEX == "artist" or DBTYPEX == "season" or saga != ""):
            if saga == "":
                Unique = "ok"
            else:
                Unique = ""

            if DBTYPEX != "season":
                dialog = xbmcgui.Dialog()
                if DBTYPEX == "movie":
                    Titre = xbmc.getLocalizedString(342)
                if DBTYPEX == "set":
                    Titre = xbmc.getLocalizedString(20434)
                if DBTYPEX == "tvshow":
                    Titre = xbmc.getLocalizedString(20343)
                if DBTYPEX == "artist":
                    Titre = xbmc.getLocalizedString(36917)

                if DBTYPEX != "movie":
                    Choix = [
                        __language__(32502) + Titre,
                        __language__(32503) + Titre
                    ]
                else:
                    Choix = [__language__(32510)]
                if Unique and xbmc.getInfoLabel(
                        "ListItem.DBID") and not DBTYPEX == "movie":
                    Choix.append(
                        __language__(32507) + " [COLOR=yellow]" +
                        utils.try_decode(xbmc.getInfoLabel("ListItem.Label")) +
                        "[/COLOR]")

                if DBTYPEX == "set" or DBTYPEX == "movie" or DBTYPEX == "tvshow":
                    Choix.append(
                        __language__(32514) + " [COLOR=yellow]" +
                        utils.try_decode(xbmc.getInfoLabel("ListItem.Label")) +
                        "[/COLOR]")
                if DBTYPEX == "tvshow":
                    Choix.append(__language__(32511))

                ret = dialog.select(Titre, Choix)
            else:
                ret = 0
            if ret == 0:  #tous
                if DBTYPEX == "set": utils.UpdateSagas(0, 1)
                if DBTYPEX == "tvshow": utils.UpdateSeries(0, 1)
                if DBTYPEX == "movie": utils.updateartworkall("Movies")
                if DBTYPEX == "artist": utils.UpdateArtistes(None, 1)
            if ret == 1:  #que les nouveaux ou film unique
                if DBTYPEX == "set": utils.UpdateSagas()
                if DBTYPEX == "movie":
                    utils.updatemovieartwork(
                        xbmc.getInfoLabel("ListItem.DBID"))
                if DBTYPEX == "tvshow": utils.UpdateSeries()
                if DBTYPEX == "artist": utils.UpdateArtistes()
            if ret == 2 and Unique:  #item en cours
                if DBTYPEX == "set":
                    utils.UpdateSagas(xbmc.getInfoLabel("ListItem.DBID"))
                if DBTYPEX == "tvshow":
                    utils.UpdateSeries(xbmc.getInfoLabel("ListItem.DBID"))
                if DBTYPEX == "artist":
                    utils.UpdateArtistes(xbmc.getInfoLabel("ListItem.DBID"))
            if ret == 3 and Unique:  #ArtWorks
                if DBTYPEX == "set":
                    utils.UpdateSagas(xbmc.getInfoLabel("ListItem.DBID"), None,
                                      True)
                if DBTYPEX == "tvshow":
                    utils.updatetvartwork(xbmc.getInfoLabel("ListItem.DBID"))
            if ret == 4 and Unique:  #ArtWorks
                if DBTYPEX == "tvshow": utils.updateartworkall("TvShows")