def METHOD_NAME(self, config, watch_dirs):
    self.msg.info("Using Kodi.")
    while self.active:
        self.status_log.append(self._get_kodi_status())
        if self.status_log[-1] == IDLE and self.status_log[-2] == NOT_RUNNING:
            self.msg.info("Reconnected to Kodi.")
        if self.status_log[-1] == ACTIVE:
            if self.config['kodi_obey_update_wait_s']:
                self.wait_s = config['tracker_update_wait_s']
            else:
                self.wait_s = self._timer_from_file()
            player = self._playing_file()
            (state, show_tuple) = self._get_playing_show(player[0])
            self.update_show_if_needed(state, show_tuple)
            if player[1] == PAUSED:
                self.pause_timer()
            elif player[1] == PLAYING:
                self.resume_timer()
        elif self.status_log[-1] == AUTH_REQUIRED:
            self.msg.warn("Authentication needed by Kodi, login in the settings and restart trackma.")
        elif self.status_log[-1] == NOT_RUNNING:
            self.msg.warn("Kodi HTTP Server is not running.")
        del self.status_log[0]
        # Wait for the interval before running check again
        time.sleep(config['tracker_interval'])