Ejemplo n.º 1
0
 def __init__(self, verbose=False):
     BaseLog.__init__(self, verbose=verbose)
     self.set_log_prefix("OMDb")
     self._api_key = ConfigurationManager().get("omdb_api_key",
                                                default=None)
     self._url_args = {"apikey": self._api_key, "type": "movie"}
     self.log("init")
Ejemplo n.º 2
0
 def __init__(self, string: str, server_id: str = ""):
     BaseLog.__init__(self, verbose=True)
     self.set_log_prefix("ITEM")
     self._raw = string.replace("\n", "").strip()
     self._index = None
     self._server_id = server_id
     self._type = None
     self._parse()
Ejemplo n.º 3
0
 def __init__(self, bridge):
     QWidget.__init__(self)
     BaseLog.__init__(self, verbose=True)
     self.setWindowTitle("Hue Controller")
     self._light_ctrl = []
     self._bridge = bridge
     self.layout = QVBoxLayout(self)
     for _room in self._bridge.rooms:
         self.layout.addWidget(self._setup_room_widget(_room))
     self.set_log_prefix("HUE_CONTROL_WINDOW")
Ejemplo n.º 4
0
 def __init__(self, cli_args):
     BaseLog.__init__(self, verbose=cli_args.verbose)
     self.set_log_prefix("show_list".upper())
     self._cli_args = cli_args
     self.valid = False
     self._active_list = []
     self._disabled_list = []
     self._init_shows()
     self._reloaded = False
     self.log(f"processing {len(self._active_list)} shows")
Ejemplo n.º 5
0
 def __init__(self, light: LightBulb):
     QWidget.__init__(self)
     BaseLog.__init__(self, verbose=True)
     self._light: LightBulb = light
     self._btn = self._init_toggle_button()
     self._update_button()
     self._slider = self._init_brightness_slider()
     self._update_timer = self._init_update_timer()
     self._color_picker = self._init_color_picker()
     self._cp_btn = QPushButton("Set Color")
     self._cp_btn.clicked.connect(self._open_color_picker)
     self._need_update = False
     self.set_log_prefix(
         f"CONTROL_{self._light.name.upper().replace(' ', '_')}")
     self.log("init")
Ejemplo n.º 6
0
 def __init__(self, query: str = "", verbose=False):
     PreSearch.__init__(self, query)
     BaseLog.__init__(self, verbose=verbose)
     self.set_log_prefix("PREDB_ME")
Ejemplo n.º 7
0
 def __init__(self, verbose=False):
     BaseLog.__init__(self, verbose=verbose)
     self.set_log_prefix("RIPPER")