78 Commits

Author SHA1 Message Date
Khazhismel
fc2127789a Support ytsearch and playlists in youtube_dl_player 2016-03-09 21:19:12 -05:00
Jake
b10432d393 Disconnect from voice server properly
This needs to exist when users get flagged as bots.
2016-03-04 18:47:50 -08:00
Khazhismel Kumykov
ef57873f80 Clean up zombies
self.process.communicate(timeout=0.100) will block

zombies probably would be cleaned up anyways but in a non deterministic fashion by the garage collector
2016-03-02 23:25:20 -05:00
Rapptz
1cd3c0b5cb Make VoiceClient.create_ytdl_player a coroutine.
This is a breaking change. The reason to make it a coroutine is so that
the info retrieval is not blocking since there are rare instances where
it would take an abnormally long time. The player returned is also
augmented to have more attributes relating to the stream itself.
2016-01-31 22:06:12 -05:00
Rapptz
b4604fa3f6 Change options in VoiceClient.create_ytdl_player to ytdl_options.
This is a breaking change. This allows you to set both ffmpeg options
and regular ytdl options in the same function since we now just
forward the keyword arguments to the ffmpeg player.
2016-01-31 17:49:40 -05:00
Rapptz
3d21a186fe Try to make the pause/resume loop not busy. 2016-01-26 22:27:19 -05:00
Alexey Glushko
f075548d78 add `headers` option to create_ffmpeg_player()
headers can't be passed through 'options' because in '-headers' flag shoul be placed before '-i'
At least for ffmpeg 2.8.4
2016-01-26 22:27:00 -05:00
Rapptz
1f5d26b7d3 Unit correction in voice docstrings. 2016-01-18 17:44:16 -05:00
Rapptz
6c7a493fd9 Raise a different exception if ffmpeg is not found in PATH. 2016-01-16 21:46:11 -05:00
Rapptz
4edff12f6b Proper exception chaining. 2016-01-13 20:08:55 -05:00
Rapptz
c1347dfcf0 Remove excessive logging when using voice. 2016-01-06 12:19:59 -05:00
Rapptz
db4cc791dd Update license of files to 2016. 2016-01-04 22:28:29 -05:00
Steven Berler
49488c9151 make ip/port voice packet logic more clear
Adds comments and also rewrites the logic in a way that is much easier
to see what is going on. For example you can now easily see that the
port is actually encoded in little endian (which is different from
everything else).
2015-12-27 06:05:07 -08:00
Steven Berler
57c3363119 fix broken ip and port in voice client
Also added debug logging to make it easier to debug errors in how the
initial packet is parsed.
2015-12-27 01:16:52 -08:00
Khazhismel
e8a06b7ee9 Insert options before pipe:1 in ffmpeg player, otherwise they are ignored 2015-12-23 18:00:44 -05:00
Rapptz
78e95ef755 Documentation fixes. 2015-12-17 04:11:38 -05:00
Rapptz
6d26d73e24 Client.run now does cleanup when KeyboardInterrupt is encountered. 2015-12-14 16:26:15 -05:00
Rapptz
f55d82146e Remove socket.shutdown and only use socket.close instead. 2015-12-11 03:10:51 -05:00
Rapptz
c4e6a53dfe Add experimental ytdl player. 2015-12-11 03:10:30 -05:00
Rapptz
3cefa5d65c ffmpeg process is now properly killed.
Two new options are added to the ffmpeg player. `options` and `pipe`.
If `pipe` is True then we can pass in a file-like object to be the
stdin of ffmpeg. `options` allows you to pass extra things to the
ffmpeg command line.
2015-12-11 01:36:41 -05:00
Rapptz
bec7071c48 Add missing implementation for create_stream_player. 2015-12-10 22:39:00 -05:00
Rapptz
eda3c626db Client now keeps a reference to the VoiceClient constructed. 2015-12-09 21:32:33 -05:00
Rapptz
6a4bddd69b Add ability to pause/resume audio stream from StreamPlayer. 2015-12-09 18:33:39 -05:00
Rapptz
3ca5845566 Close ffmpeg process after stream is finished. 2015-12-09 18:01:14 -05:00
Rapptz
6217076cbf Fix exception handling having a NameError 2015-12-08 16:12:26 -05:00
Rapptz
60945868b4 Clear up some documentation. 2015-12-08 06:51:46 -05:00
Rapptz
a6d6d832ff Working voice sending implementation.
Currently you can only send from a stream that implements
``read`` and a ``ffmpeg`` or ``avconv``.
2015-12-08 06:37:38 -05:00
Rapptz
9102f1ae4f Work on connecting to a voice channel. 2015-12-07 16:22:56 -05:00