Only use the Matroska container if an audio extension is specified.
This commit is contained in:
parent
dbf4af5244
commit
10a9f184c0
50
.travis.yml
50
.travis.yml
@ -1,50 +0,0 @@
|
|||||||
language: python
|
|
||||||
python:
|
|
||||||
- "2.6"
|
|
||||||
- "2.7"
|
|
||||||
- "3.2"
|
|
||||||
- "3.3"
|
|
||||||
- "3.4"
|
|
||||||
- "3.5"
|
|
||||||
- "3.6"
|
|
||||||
- "pypy"
|
|
||||||
- "pypy3"
|
|
||||||
dist: trusty
|
|
||||||
env:
|
|
||||||
- YTDL_TEST_SET=core
|
|
||||||
- YTDL_TEST_SET=download
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
- python: 3.7
|
|
||||||
dist: xenial
|
|
||||||
env: YTDL_TEST_SET=core
|
|
||||||
- python: 3.7
|
|
||||||
dist: xenial
|
|
||||||
env: YTDL_TEST_SET=download
|
|
||||||
- python: 3.8
|
|
||||||
dist: xenial
|
|
||||||
env: YTDL_TEST_SET=core
|
|
||||||
- python: 3.8
|
|
||||||
dist: xenial
|
|
||||||
env: YTDL_TEST_SET=download
|
|
||||||
- python: 3.8-dev
|
|
||||||
dist: xenial
|
|
||||||
env: YTDL_TEST_SET=core
|
|
||||||
- python: 3.8-dev
|
|
||||||
dist: xenial
|
|
||||||
env: YTDL_TEST_SET=download
|
|
||||||
- env: JYTHON=true; YTDL_TEST_SET=core
|
|
||||||
- env: JYTHON=true; YTDL_TEST_SET=download
|
|
||||||
- name: flake8
|
|
||||||
python: 3.8
|
|
||||||
dist: xenial
|
|
||||||
install: pip install flake8
|
|
||||||
script: flake8 .
|
|
||||||
fast_finish: true
|
|
||||||
allow_failures:
|
|
||||||
- env: YTDL_TEST_SET=download
|
|
||||||
- env: JYTHON=true; YTDL_TEST_SET=core
|
|
||||||
- env: JYTHON=true; YTDL_TEST_SET=download
|
|
||||||
before_install:
|
|
||||||
- if [ "$JYTHON" == "true" ]; then ./devscripts/install_jython.sh; export PATH="$HOME/jython/bin:$PATH"; fi
|
|
||||||
script: ./devscripts/run_tests.sh
|
|
@ -710,13 +710,16 @@ class YoutubeDL(object):
|
|||||||
# title "Hello $PATH", we don't want `$PATH` to be expanded.
|
# title "Hello $PATH", we don't want `$PATH` to be expanded.
|
||||||
filename = expand_path(outtmpl).replace(sep, '') % template_dict
|
filename = expand_path(outtmpl).replace(sep, '') % template_dict
|
||||||
|
|
||||||
# Fix for #6724 (https://github.com/ytdl-org/youtube-dl/issues/6724)
|
# Fixes the issue of the audio not being converted to the desired format when using --audio-format and
|
||||||
|
# specifying an audio extension with -o, e.g. --audio-format mp3 -o test.mp3
|
||||||
prefix, dot, ext = filename.rpartition('.')
|
prefix, dot, ext = filename.rpartition('.')
|
||||||
prefix = prefix.replace('../', '').replace('..\\', '')
|
audio_extensions = ['mp3', 'm4a', 'aac' 'opus', 'ogg', 'wav', 'flac']
|
||||||
filename = prefix + '.mka'
|
if ext in audio_extensions:
|
||||||
self.to_screen(
|
prefix = prefix.replace('../', '').replace('..\\', '')
|
||||||
'The Matroska container (.mka) will be used for the download, '
|
filename = prefix + '.mka'
|
||||||
'but the final file will have the .%s extension' % (ext))
|
self.to_screen(
|
||||||
|
'[download] The Matroska container (.mka) will be used for the download, '
|
||||||
|
'but the final file will have the .%s extension' % (ext))
|
||||||
|
|
||||||
# Temporary fix for #4787
|
# Temporary fix for #4787
|
||||||
# 'Treat' all problem characters by passing filename through preferredencoding
|
# 'Treat' all problem characters by passing filename through preferredencoding
|
||||||
|
Loading…
x
Reference in New Issue
Block a user