'Save current state to disk.'

def _save_state(self):

    file_name = os.path.join(self._get_data_dir(), 'state.json.gz')
    logger.info(u'Saving    state    to    %s', file_name)
    data = {}
    data[u'version'] = mopidy.__version__
    data[u'state'] = CoreState(tracklist=self.tracklist._save_state(), history=self.history._save_state(), playback=self.playback._save_state(), mixer=self.mixer._save_state())
    storage.dump(file_name, data)
    logger.debug(u'Saving    state    done')
