Comments (1)
Adding a bit more context here, since it's related to the long-term fix for #464
How this used to work is that various components around the app (including from the tray) would use preferences.ConfigSectionMap
and config.config_manager
, or a bare RawConfigParser
(from python stdlib) to read and update preferences in close to realtime. This meant that updates would be saved to the mkchromecast config file, and then each time some code wanted to use a config value, it would generally (but not necessarily always) force its config_manager
instance to re-read the on-disk config file before reading those values, which would ensure that the values were up-to-date.
The downside is that the config file would be re-parsed and re-read way more times than actually necessary (especially since we know that all configuration changes while mkchromecast is running would originate from preferences.py
). Also, because this was being done independently all over the place, there was no real guarantee that every usage point was doing the same thing and would offer the same consistency guarantees.
The update in #453 got rid of ConfigSectionMap
as well as all usage of the bare RawConfigParser
, and encapsulated all configuration reading/updating within a new config.Config
class. And because the codebase has standardized on reading settings from the __init__.Mkchromecast
class, it makes sense to have Mkchromecast
manage config options coming from the config file versus from cmdline arguments depending on whether we're in Tray mode, and having some kind of manually-triggered updating behavior when preferences.py
causes a config update.
from mkchromecast.
Related Issues (20)
- Deprecate youtube-dl for yt-dlp HOT 2
- Add encapsulation, reduce code duplication, and simplify cascading logic
- Does not play any audio on google speakers HOT 1
- sys tray disappears after searching for devices
- TypeError: Descriptors cannot not be created directly. HOT 2
- Using --video crashes the app HOT 2
- archlinux mkchromecast-git package targets unstable `master` branch HOT 5
- Error with start HOT 2
- Support for playlists
- How is it possible to transmit the volume, pause and resume via command line?
- `-n` fails to find Chromecast when TV is powered off
- Crash when I try to connect to a pair of Sonos One SL HOT 1
- Installing mkchromecast with brew HOT 1
- Issues with Tray Application: ModuleNotFoundError: No module named 'imp' HOT 5
- Unable to detect Sonos One speaker HOT 5
- Re-enable Sonos support in mkchromecast HOT 1
- `self.codec` is not set appropriately on Mac HOT 7
- Cant find Chromecast [Arch Linux]
- Glitch/bug on Mac Sonoma 14.5 (Macbook Air M2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mkchromecast.