Ejemplo n.º 1
0
class FanartTvOptionsPage(OptionsPage):

    NAME = "fanarttv"
    TITLE = "fanart.tv"
    PARENT = "plugins"

    options = [
        TextOption("setting", "fanarttv_client_key", ""),
        TextOption("setting", "fanarttv_use_cdart", OPTION_CDART_NOALBUMART),
    ]

    def __init__(self, parent=None):
        super(FanartTvOptionsPage, self).__init__(parent)
        self.ui = Ui_FanartTvOptionsPage()
        self.ui.setupUi(self)

    def load(self):
        self.ui.fanarttv_client_key.setText(
            config.setting["fanarttv_client_key"])
        if config.setting["fanarttv_use_cdart"] == OPTION_CDART_ALWAYS:
            self.ui.fanarttv_cdart_use_always.setChecked(True)
        elif config.setting["fanarttv_use_cdart"] == OPTION_CDART_NEVER:
            self.ui.fanarttv_cdart_use_never.setChecked(True)
        elif config.setting["fanarttv_use_cdart"] == OPTION_CDART_NOALBUMART:
            self.ui.fanarttv_cdart_use_if_no_albumcover.setChecked(True)

    def save(self):
        config.setting["fanarttv_client_key"] = unicode(
            self.ui.fanarttv_client_key.text())
        if self.ui.fanarttv_cdart_use_always.isChecked():
            config.setting["fanarttv_use_cdart"] = OPTION_CDART_ALWAYS
        elif self.ui.fanarttv_cdart_use_never.isChecked():
            config.setting["fanarttv_use_cdart"] = OPTION_CDART_NEVER
        elif self.ui.fanarttv_cdart_use_if_no_albumcover.isChecked():
            config.setting["fanarttv_use_cdart"] = OPTION_CDART_NOALBUMART
Ejemplo n.º 2
0
class FanartTvOptionsPage(OptionsPage):

    NAME = "fanarttv"
    TITLE = "fanart.tv"
    PARENT = "plugins"

    options = [
        TextOption("setting", "fanarttv_client_key", ""),
        TextOption("setting", "fanarttv_use_cdart", OPTION_CDART_NOALBUMART),
    ]

    def __init__(self, parent=None):
        super(FanartTvOptionsPage, self).__init__(parent)
        self.ui = Ui_FanartTvOptionsPage()
        self.ui.setupUi(self)

    def load(self):
        self.ui.fanarttv_client_key.setText(config.setting["fanarttv_client_key"])
        if config.setting["fanarttv_use_cdart"] == OPTION_CDART_ALWAYS:
            self.ui.fanarttv_cdart_use_always.setChecked(True)
        elif config.setting["fanarttv_use_cdart"] == OPTION_CDART_NEVER:
            self.ui.fanarttv_cdart_use_never.setChecked(True)
        elif config.setting["fanarttv_use_cdart"] == OPTION_CDART_NOALBUMART:
            self.ui.fanarttv_cdart_use_if_no_albumcover.setChecked(True)

    def save(self):
        config.setting["fanarttv_client_key"] = unicode(self.ui.fanarttv_client_key.text())
        if self.ui.fanarttv_cdart_use_always.isChecked():
            config.setting["fanarttv_use_cdart"] = OPTION_CDART_ALWAYS
        elif self.ui.fanarttv_cdart_use_never.isChecked():
            config.setting["fanarttv_use_cdart"] = OPTION_CDART_NEVER
        elif self.ui.fanarttv_cdart_use_if_no_albumcover.isChecked():
            config.setting["fanarttv_use_cdart"] = OPTION_CDART_NOALBUMART
Ejemplo n.º 3
0
 def __init__(self, parent=None):
     super(FanartTvOptionsPage, self).__init__(parent)
     self.ui = Ui_FanartTvOptionsPage()
     self.ui.setupUi(self)
Ejemplo n.º 4
0
 def __init__(self, parent=None):
     super(FanartTvOptionsPage, self).__init__(parent)
     self.ui = Ui_FanartTvOptionsPage()
     self.ui.setupUi(self)