Check-in [8178f6832b]
Comment: | Add plugin defaults now really on initialization. Safeguard in configwin. Always use gtk.STOCK_NEW for empty app fields in config_dialog (not just for new lines). |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
8178f6832b1bcde6796afe2286289a31 |
User & Date: | mario on 2015-04-04 10:00:37 |
Other Links: | manifest | tags |
2015-04-04
| ||
10:01 | Spread out #pack: specifiers into doc files. check-in: 31995cd149 user: mario tags: trunk | |
10:00 | Add plugin defaults now really on initialization. Safeguard in configwin. Always use gtk.STOCK_NEW for empty app fields in config_dialog (not just for new lines). check-in: 8178f6832b user: mario tags: trunk | |
06:06 | Compress gtkBuilder file with zlib for distribution. (gzip not usable without workarounds in Python2) check-in: 780f0ca590 user: mario tags: trunk | |
Makefile became executable with contents [4a807d2d9d].
Modified channels/configwin.py from [af833a9f7e] to [ec93be6e35].
85 86 87 88 89 90 91 | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | - + + + - - - - - - + + + + + + + + + | config[key] = {} for row in w: if row[0] and row[1]: config[key][row[0]] = row[1] __print__(dbg.CONF, "config save", prefix+key, val) |
Modified config.py from [5baf9d2d63] to [86c0092432].
97 98 99 100 101 102 103 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | - + - - - - - - - - - - - - - - - - - - - - - - - - | "video/*": self.find_player(typ="video", default="vlc"), "url/http": self.find_player(typ="browser"), } self.record = { "audio/*": self.find_player(typ="xterm") + " -e streamripper %srv", # -d /home/***USERNAME***/Musik "video/youtube": self.find_player(typ="xterm") + " -e \"youtube-dl %srv\"", } |
155 156 157 158 159 160 161 | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | - + + + | config = meta.get("config", []) for opt in config: if ("name" in opt) and ("value" in opt) and (opt["name"] not in vars(self)): self.__dict__[opt["name"]] = opt["value"] # plugin state if module and module not in conf.plugins: |
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | + + | def update(self, with_new_data): for key,value in with_new_data.items(): if type(value) == dict: self[key].update(value) else: self[key] = value # descends into sub-dicts instead of wiping them with subkeys # update old setting names def migrate(self): # 2.1.1 if "audio/mp3" in self.play: self.play["audio/mpeg"] = self.play["audio/mp3"] del self.play["audio/mp3"] # check for existing filename in directory list def find_in_dirs(self, dirs, file): for d in dirs: if os.path.exists(d+"/"+file): return d+"/"+file # standard user account storage in ~/.netrc or less standard but contemporarily in ~/.config/netrc def netrc(self, varhosts=("shoutcast.com")): global netrc if not netrc: netrc = {} try: |
278 279 280 281 282 283 284 | 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | - + - + - + - + - + - + | if server in netrc: return netrc[server] # Retrieve content from install path or pyzip archive (alias for pkgutil.get_data) # |
Modified st2.py from [a24c95cdd7] to [d4a3f5a23c].
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - - - + + | # config: # { type: env, name: http_proxy, description: proxy for HTTP access } # { type: env, name: XDG_CONFIG_HOME, description: relocates user .config subdirectory } # category: sound # depends: pygtk | gi, threading, requests, pyquery, lxml # id: streamtuner2 # pack: *.py, gtk3.xml.zlib, bin, channels/__init__.py, bundle/*.py, CREDITS, help/index.page, |
401 402 403 404 405 406 407 | 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | - - + + + + + + - - + + - + - + - + - + - + - + | # load plugins from /usr/share/streamtuner2/channels/ def load_plugin_channels(self): # initialize plugin modules (pre-ordered) ls = module_list() |