Skip to content

Commit

Permalink
New release.
Browse files Browse the repository at this point in the history
  • Loading branch information
muammar committed Aug 12, 2016
1 parent ef8e339 commit 391e557
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
20 changes: 9 additions & 11 deletions mkchromecast/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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':
Expand Down Expand Up @@ -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):
Expand All @@ -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']
Expand Down

0 comments on commit 391e557

Please sign in to comment.