Skip to content

Commit

Permalink
add default ydl_opts - progress_with_newline
Browse files Browse the repository at this point in the history
  • Loading branch information
d0u9 committed Sep 26, 2017
1 parent 1a9a6b1 commit 33b2f55
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion youtube_dl_webui/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(self, conf_dict={}):
def merge_conf(self, task_conf_dict={}):
ret = deepcopy(self.dict())
for key, val in task_conf_dict.items():
if key not in self._task_settable_fields:
if key not in self._task_settable_fields or val == '':
continue
ret[key] = val

Expand Down
2 changes: 1 addition & 1 deletion youtube_dl_webui/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def init(cls, conf, task_mgr):
@classmethod
def event_create(cls, svr, event, data, args):
url, ydl_opts = data.get('url', None), data.get('ydl_opts', {})
cls.logger.debug('url = %s' %(url))
cls.logger.debug('url = %s, ydl_opts = %s' %(url, ydl_opts))

if url is None:
svr.put(cls.UrlErrorMsg)
Expand Down
2 changes: 1 addition & 1 deletion youtube_dl_webui/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, tid, msg_cli, ydl_opts={}, info={}, status={}, log_size=10):
self.log.appendleft(log)

def start(self):
self.logger.info('Task starts, url - %s(%s)' %(self.url, self.tid))
self.logger.info('Task starts, url: %s(%s), ydl_opts: %s' %(self.url, self.tid, self.ydl_opts))
tm = time()
self.state = state_index['downloading']

Expand Down
1 change: 1 addition & 0 deletions youtube_dl_webui/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def intercept_ydl_opts(self):
self.ydl_opts['logger'] = self.log_filter
self.ydl_opts['progress_hooks'] = [self.ydl_hook.dispatcher]
self.ydl_opts['noplaylist'] = "false"
self.ydl_opts['progress_with_newline'] = True

def run(self):
self.intercept_ydl_opts()
Expand Down

0 comments on commit 33b2f55

Please sign in to comment.