Skip to content

Commit

Permalink
update ytdl default options
Browse files Browse the repository at this point in the history
  • Loading branch information
cosven committed Dec 1, 2024
1 parent 943e82a commit 1b0231f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion feeluown/app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def create_config() -> Config:
# 'http_proxy': 'http://127.0.0.1:7890',
# 'ytdl_options': {
# 'socket_timeout': 2,
# 'extractor_retries': 1, # reduce retry
# },
# },
# ]
Expand Down
9 changes: 7 additions & 2 deletions feeluown/library/ytdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,19 @@
class Ytdl:

def __init__(self, rules: Optional[List[Any]] = None):
self._default_audio_ytdl_opts = {
self._default_ytdl_opts = {
'logger': logger,
'socket_timeout': 2,
'extractor_retries': 0, # reduce retry
}
self._default_audio_ytdl_opts = {
# The following two options may be only valid for select_audio API.
# Remove these two options if needed.
'format': 'm4a/bestaudio/best',
**self._default_ytdl_opts,
}
self._default_video_ytdl_opts = {
'logger': logger,
**self._default_ytdl_opts,
}
# For example::
# [
Expand Down

0 comments on commit 1b0231f

Please sign in to comment.