New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show stream details in video information #675
Conversation
I'm not sure if this information should be displayed in the info for a video, because streams are actually in several formats, although this displays the one it will play. Therefore, |
Not sure either but I couldn't find a better place to show this info. Displaying all the stream urls will indeed create a mess. I made a stream info section. IMO It should hint people that it will display information about the stream it will play, so they would know what to expect (mp4, webm or anything else). Another way could be to add a command like |
The long stream urls do add clutter for the (probably) majority of uses where that is not the goal of the info command (four lines for me with a full screen terminal; worse with a smaller one). Another way to provide the functionality of #196 would be to add a command to copy the url to the clipboard; the |
Yeah, the However, what about adding a new |
That could be useful as well, so sure, it can be added. |
TODO: figure out if this can be simplified
OK, added both |
mps_youtube/player.py
Outdated
@@ -134,7 +135,7 @@ def _mplayer_help(short=True): | |||
return lines.format(c.g, c.w) | |||
|
|||
|
|||
def _playsong(song, failcount=0, override=False, softrepeat=False): | |||
def stream_details(song, failcount=0, override=False, softrepeat=False): | |||
""" Play song using config.PLAYER called with args config.PLAYERARGS.""" | |||
# pylint: disable=R0911,R0912 | |||
if not config.PLAYER.get or not util.has_exefile(config.PLAYER.get): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should only test for a player when actually playing. Nor should the NOTIFIER
be called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, missed that.
I splitted part of
_playsong
function in player.py intostream_details
function.stream_details()
is now also called (in misc.py) to extract stream information (usingi <number>
) thatmpsyt
is supposed to play.Closes #196.