def METHOD_NAME(self, config, watch_dirs):
    self.msg.info("Using Plex.")
    while self.active:
        self.status_log.append(self.get_plex_status())
        if self.status_log[-1] == ACTIVE or self.status_log[-1] == IDLE:
            if self.status_log[-1] == IDLE and self.status_log[-2] == NOT_RUNNING:
                self.msg.info("Reconnected to Plex.")
            if self.config['plex_obey_update_wait_s']:
                self.wait_s = config['tracker_update_wait_s']
            else:
                self.wait_s = self.timer_from_file()
            try:
                xuser = self._get_sessions_info("User", "title")
                player = self.playing_file()
                (state, show_tuple) = self._get_playing_show(player[0])
                if self.token:
                    if self.config['plex_user'] == xuser:
                        self.view_offset = int(self._get_sessions_info("Video", "viewOffset"))
                        self.update_show_if_needed(state, show_tuple)
                        if player[1] == PAUSED:
                            self.pause_timer()
                        elif player[1] == PLAYING:
                            self.resume_timer()
                else:
                    self.update_show_if_needed(state, show_tuple)
                    if player[1] == PAUSED:
                        self.pause_timer()
                    elif player[1] == PLAYING:
                        self.resume_timer()
            except IndexError:
                if self.status_log[-1] == IDLE:
                    self.last_filename = None
                    self.update_show_if_needed(0, None)
                else:
                    pass
        elif self.status_log[-1] == CLAIMED and self.status_log[-2] == CLAIMED:
            self.msg.warn("Claimed Plex Media Server, login in the settings and restart trackma.")
        elif self.status_log[-1] == NOT_RUNNING and self.status_log[-2] == NOT_RUNNING:
            self.msg.warn("Plex Media Server is not running.")
        del self.status_log[0]
        # Wait for the interval before running check again
        time.sleep(config['tracker_interval'])