Check-in [3497339549]
Overview
| Comment: | Add plugin defaults (for newly added options, but previously active modules) in any case when starting with -D flag. Save settings.json in json.dumps(sort_keys=True) mode. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
34973395499a6dfa899514ab988a4a5b |
| User & Date: | mario on 2015-05-12 22:17:19 |
| Other Links: | manifest | tags |
Context
|
2015-05-12
| ||
| 22:18 | Add default filters only once in GenericChannel.__init__ Allow preprocess_filter callbacks access to current channel object. (Used by filter_bitrate to recognize .audioformat if row[format] is absent.) check-in: ae2f48310a user: mario tags: trunk | |
| 22:17 | Add plugin defaults (for newly added options, but previously active modules) in any case when starting with -D flag. Save settings.json in json.dumps(sort_keys=True) mode. check-in: 3497339549 user: mario tags: trunk | |
| 20:05 | Add generic bitrate filter plugin, move functionality out of xiph channel. check-in: 7ef8a2b827 user: mario tags: trunk | |
Changes
Modified config.py from [b35aebea3e] to [f7e98ed69f].
| ︙ | ︙ | |||
195 196 197 198 199 200 201 |
if (not os.path.exists(subdir)):
os.mkdir(subdir)
open(subdir+"/.nobackup", "w").close()
# target filename
file = self.dir + "/" + name
# encode as JSON
try:
| | | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
if (not os.path.exists(subdir)):
os.mkdir(subdir)
open(subdir+"/.nobackup", "w").close()
# target filename
file = self.dir + "/" + name
# encode as JSON
try:
data = json.dumps(data, indent=(4 if nice else None), sort_keys=True)
except Exception as e:
log.ERR("JSON encoding failed", e)
return
# .gz or normal file
if gz:
f = gzip.open(file+".gz", "w")
if os.path.exists(file):
|
| ︙ | ︙ |
Modified st2.py from [63cc7f21fd] to [507d090792].
| ︙ | ︙ | |||
395 396 397 398 399 400 401 |
def load_plugin_channels(self):
# initialize plugin modules (pre-ordered)
ls = module_list()
for name in ls:
gui_startup(4/20.0 + 13.5/20.0 * float(ls.index(name))/len(ls), "loading module "+name)
| | | | 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
def load_plugin_channels(self):
# initialize plugin modules (pre-ordered)
ls = module_list()
for name in ls:
gui_startup(4/20.0 + 13.5/20.0 * float(ls.index(name))/len(ls), "loading module "+name)
# load defaults - on first startup - or with -D in any case
if not name in conf.plugins or conf.debug:
conf.add_plugin_defaults(plugin_meta(module=name), name)
# skip module if disabled
if conf.plugins.get(name, 1) == False:
log.STAT("disabled plugin:", name)
continue
# or if it's a built-in (already imported)
|
| ︙ | ︙ |