Merge pull request #12
* Clean up python * Clean up bot python * revert lists * revert commands.bot completely * extract raise_expected_coro further * add new lines * removed erroneous import * remove hashed line
This commit is contained in:
@@ -21,6 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import threading
|
||||
@@ -63,10 +64,7 @@ __all__ = (
|
||||
|
||||
CREATE_NO_WINDOW: int
|
||||
|
||||
if sys.platform != 'win32':
|
||||
CREATE_NO_WINDOW = 0
|
||||
else:
|
||||
CREATE_NO_WINDOW = 0x08000000
|
||||
CREATE_NO_WINDOW = 0 if sys.platform != 'win32' else 0x08000000
|
||||
|
||||
class AudioSource:
|
||||
"""Represents an audio stream.
|
||||
@@ -526,7 +524,12 @@ class FFmpegOpusAudio(FFmpegAudio):
|
||||
|
||||
@staticmethod
|
||||
def _probe_codec_native(source, executable: str = 'ffmpeg') -> Tuple[Optional[str], Optional[int]]:
|
||||
exe = executable[:2] + 'probe' if executable in ('ffmpeg', 'avconv') else executable
|
||||
exe = (
|
||||
executable[:2] + 'probe'
|
||||
if executable in {'ffmpeg', 'avconv'}
|
||||
else executable
|
||||
)
|
||||
|
||||
args = [exe, '-v', 'quiet', '-print_format', 'json', '-show_streams', '-select_streams', 'a:0', source]
|
||||
output = subprocess.check_output(args, timeout=20)
|
||||
codec = bitrate = None
|
||||
|
||||
Reference in New Issue
Block a user