Exemplo n.º 1
0
 def save(self):
     self.data["name"] = self._instance_name
     self.data["classname"] = self.__class__.__name__
     self.data["file-version"] = 1
     self.data["params"] = {}
     for n, p in self._parameters.items():
         self.data["params"][n] = p.get_as_str()
     JSONDict.save(self)
Exemplo n.º 2
0
    def save(self, save_all_presets=True):
        log.info("Saving playlist")
        playlist = []
        for preset in self._playlist:
            playlist.append(preset.slug())
            if save_all_presets:
                preset.save()
        self.data['playlist'] = playlist

        # Superclass write to file
        self._app.settings.get("mixer")["last_playlist"] = self.name
        JSONDict.save(self)
Exemplo n.º 3
0
    def save(self, save_all_presets=True):
        log.info("Saving playlist")
        playlist = []
        for preset in self._playlist:
            playlist.append(preset.slug())
            if save_all_presets:
                preset.save()
        self.data['playlist'] = playlist

        # Superclass write to file
        self._app.settings.get("mixer")["last_playlist"] = self.name
        JSONDict.save(self)
Exemplo n.º 4
0
 def save(self):
     log.info("Saving playlist")
     # Pack the current state into self.data
     self.data = {'file-type': 'playlist'}
     playlist = []
     for preset in self._playlist:
         playlist_entry = {'classname': preset.__class__.__name__,
                           'name': preset.get_name()}
         param_dict = {}
         for name, param in preset.get_parameters().iteritems():
             param_dict[name] = param.get()
         playlist_entry['params'] = param_dict
         playlist.append(playlist_entry)
     self.data['playlist'] = playlist
     # Superclass write to file
     JSONDict.save(self)
Exemplo n.º 5
0
    def save(self, save_all_presets=True):
        if not self.initialized:
            return

        log.info("Saving playlist")
        playlist = []
        for preset in self._playlist:
            playlist.append(preset.slug())
            if save_all_presets:
                preset.save()
        self.data['playlist'] = playlist
        self.data["file-version"] = 2

        # Superclass write to file
        self._app.settings.get("mixer")["last_playlist"] = self.name
        self._app.settings["last-preset"] = self.active_preset.name()
        JSONDict.save(self)
Exemplo n.º 6
0
 def save(self):
     log.info("Saving playlist")
     # Pack the current state into self.data
     self.data = {'file-type': 'playlist'}
     playlist = []
     for preset in self._playlist:
         playlist_entry = {'classname': preset.__class__.__name__,
                           'name': preset.get_name()}
         param_dict = {}
         for name, param in preset.get_parameters().iteritems():
             param_dict[name] = param.get_as_str()
         playlist_entry['params'] = param_dict
         playlist.append(playlist_entry)
     self.data['playlist'] = playlist
     # Superclass write to file
     self._app.settings.get("mixer")[self._last_playlist_settings_key] = self.name
     JSONDict.save(self)
Exemplo n.º 7
0
    def save(self, save_all_presets=True):
        if not self.initialized:
            return

        log.info("Saving playlist")
        playlist = []
        for preset in self._playlist:
            playlist.append(preset.slug())
            if save_all_presets:
                preset.save()
        self.data['playlist'] = playlist
        self.data["file-version"] = 2

        # Superclass write to file
        self._app.settings.get("mixer")["last_playlist"] = self.name
        self._app.settings["last-preset"] = self.active_preset.name()
        JSONDict.save(self)
Exemplo n.º 8
0
 def save(self):
     JSONDict.save(self)
Exemplo n.º 9
0
 def save(self):
     JSONDict.save(self)