diff --git a/changelog.md b/changelog.md index 8bcfcc97d..12d63ee9d 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,4 @@ -* mkchromecast (0.3.1) **unreleased**: +* mkchromecast (0.3.1) **released**: 2016/08/12 - Improved Preferences window. - The node streaming has been updated to work with `node v6.3.1`. diff --git a/mkchromecast/preferences.py b/mkchromecast/preferences.py index ddc33c00d..7c8cf5f91 100644 --- a/mkchromecast/preferences.py +++ b/mkchromecast/preferences.py @@ -335,15 +335,14 @@ def reset_indexes(self): def onActivatedbk(self, text): self.config.read(self.configf) self.config.set('settings','backend',text) - self.write_config()) + self.write_config() self.read_defaults() self.qccodec.clear() if self.backendconf == 'node': codecs = ['mp3'] self.config.read(self.configf) self.config.set('settings','codec','mp3') - with open(self.configf, 'w') as configfile: - self.config.write(configfile) + self.write_config() else: codecs = [ 'mp3', @@ -365,7 +364,7 @@ def onActivatedbk(self, text): def onActivatedcc(self, text): self.config.read(self.configf) self.config.set('settings','codec',text) - self.write_config()) + self.write_config() self.read_defaults() self.qcbitrate.clear() if self.codecconf == 'wav': @@ -396,31 +395,31 @@ def onActivatedcc(self, text): def onActivatedbt(self, text): self.config.read(self.configf) self.config.set('settings','bitrate',text) - self.write_config()) + self.write_config() self.read_defaults() def onActivatedsr(self, text): self.config.read(self.configf) self.config.set('settings','samplerate',text) - self.write_config()) + self.write_config() self.read_defaults() def onActivatednotify(self, text): self.config.read(self.configf) self.config.set('settings','notifications',text) - self.write_config()) + self.write_config() self.read_defaults() def onActivatedcolors(self, text): self.config.read(self.configf) self.config.set('settings','colors',text) - self.write_config()) + self.write_config() self.read_defaults() def onActivatedatlaunch(self, text): self.config.read(self.configf) self.config.set('settings','searchatlaunch',text) - self.write_config()) + self.write_config() self.read_defaults() def read_defaults(self): @@ -429,8 +428,7 @@ def read_defaults(self): if self.backendconf == 'node' and self.codecconf != 'mp3': self.config.read(self.configf) self.config.set('settings','codec','mp3') - with open(self.configf, 'w') as configfile: - self.config.write(configfile) + self.write_config() self.codecconf = ConfigSectionMap('settings')['codec'] self.bitrateconf = ConfigSectionMap('settings')['bitrate'] self.samplerateconf = ConfigSectionMap('settings')['samplerate']