Giter Site home page Giter Site logo

mps-youtube / yewtube Goto Github PK

View Code? Open in Web Editor NEW
7.9K 7.9K 644.0 2.94 MB

yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.

License: GNU General Public License v3.0

Python 99.71% Dockerfile 0.26% Shell 0.03%

yewtube's Introduction

STOP GENOCIDE OF INNOCENT PEOPLE

                      _         _          
                     | |       | |         
  _   _  _____      _| |_ _   _| |__   ___ 
 | | | |/ _ \ \ /\ / / __| | | | '_ \ / _ \
 | |_| |  __/\ V  V /| |_| |_| | |_) |  __/
  \__, |\___| \_/\_/  \__|\__,_|_.__/ \___|
   __/ |                                   
  |___/


yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
Visit this page if you want to support maintainers of this project.

Installation

Stable Version

Using pip

  1. Install using pip install yewtube
  2. Run using, yt. Enjoy!

Using pipx (Recommended)

  1. Install pipx using pip install pipx
  2. Install yewtube using pipx install yewtube
  3. Now, type yt That's it.

Latest Version

Using pip

  1. Install using pip install git+https://github.com/mps-youtube/yewtube.git
  2. Run using, yt. Enjoy!

Using pipx

  1. Install pipx using pip install pipx
  2. Install yewtube using pipx install git+https://github.com/mps-youtube/yewtube.git
  3. Now, type yt That's it.

What's new in yewtube?

  • No Youtube API Key required
  • Run audio in VLC with no GUI

See complete and up-to-date changelog here.

These features are still inherited from mps-youtube.

  • Search and play audio/video from YouTube
  • Search tracks of albums by album title
  • Search and import YouTube playlists
  • Create and save local playlists
  • Download audio/video
  • Convert to mp3 & other formats (requires ffmpeg or avconv)
  • View video comments
  • Works with Python 3.x
  • Works with Windows, Linux and Mac OS X
  • Requires mplayer, mpv or VLC

This project is based on mps-youtube and mps-youtube is based on mps, a terminal based program to search, stream and download music. This implementation uses YouTube as a source of content and can play and download video as well as audio. The pafy library handles interfacing with YouTube.

mps-youtube wiki
yewtube wiki

Screenshots

Search:

A standard search is performed by entering / followed by search terms.

You can play all of the search results by giving 1- as input

Repeating song/songs can be done with song_number[loop], for example: 1[3] or 4-6[2]

Local Playlists:

Search result items can easily be stored in local playlists.

YouTube Playlists:

YouTube playlists can be searched and played or saved as local playlists.

A playlist search is performed by // followed by search term.

Download:

Content can be downloaded in various formats and resolutions.

Comments:

A basic comments browser is available to view YouTube user comments.

Music Album Matching:

An album title can be specified and yewtube will attempt to find matches for each track of the album, based on title and duration. Type help search for more info.

Customisation:

Search results can be customised to display additional fields and ordered by various criteria.

This configuration was set up using the following commands

set order views
set columns user:14 date comments rating likes dislikes category:9 views

Type help config for help on configuration options

Upgrading

If installed using pipx

pipx upgrade yewtube

Optionally with upgrading all dependencies:

pipx runpip yewtube install --upgrade-strategy eager --upgrade yewtube

If installed using pip

pip install --upgrade yewtube

Optionally with upgrading all dependencies:

pip install --upgrade-strategy eager --upgrade yewtube

Usage

yewtube is run on the command line using the command:

yt

Enter h from within the program for help.

Using yewtube with mpris

  1. Install PyGObject, GTK and their dependencies based on this guide https://pygobject.readthedocs.io/en/latest/getting_started.html
  2. Install yewtube with mpris extra
> # recommended
> pipx install 'yewtube[mpris]'
> # or
> pip install 'yewtube[mpris]'
  1. check yewtube version
> yt --version
yewtube version    : 2.8.2
yt_dlp version     : 2022.02.04
Python version     : 3.9.7 (default, Nov  7 2021, 15:17:57)
[GCC 11.2.0]
Processor          : x86_64
Machine type       : x86_64
Architecture       : 64bit, ELF
Platform           : Linux-5.13.0-35-generic-x86_64-with-glibc2.34
sys.stdout.enc     : utf-8
default enc        : utf-8
Config dir         : /home/user/.config/mps-youtube
dbus               : 1.2.18
glib               : True
env:TERM           : tmux-256color
env:SHELL          : /usr/bin/zsh
env:LANG           : en_US.UTF-8

If everything working correctly, dbug and glib would have similar result as above text

  1. run set mpris true on yewtube
  2. check with playerctl
> playerctl -l
mps-youtube.instance567867

Check also the common-issue if you are having problem with yewtube.

How to Contribute

Contributions are warmly welcomed! However, please check out the contribution page before making a contribution.

yewtube's People

Contributors

alexnisnevich avatar blackcapcoder avatar gnojus avatar hrnr avatar iamtalhaasghar avatar ids1024 avatar jas32096 avatar jkatzwinkel avatar kraetzin avatar laxa avatar mevcj avatar mtahmed avatar nishanthkarthik avatar np1 avatar orschiro avatar paulnicolet avatar punchagan avatar rachmadaniharyono avatar rien333 avatar ritiek avatar rjshrjndrn avatar rohanjadvani avatar rothgar avatar srvanrell avatar thomasleveil avatar tommysolsen avatar vikramkashyap avatar vn-ki avatar vrihub avatar zgrimshell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yewtube's Issues

ValueError: max() arg is an empty sequence

Installed via pip on Ubuntu 13.10.

Reproduced by searching 'brian eno short'

The full output:

Search results for brian eno short

Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 808, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 761, in run
self.__target(_self.__args, *_self.__kwargs)
File "/usr/local/bin/pmsyt", line 1234, in preload
size = get_stream_size(song, video=video)
File "/usr/local/bin/pmsyt", line 742, in get_stream_size
stream = song['pafy'].getbestaudio()
File "/usr/local/lib/python2.7/dist-packages/pafy.py", line 611, in getbestaudio
r = max(self.audiostreams, key=_sortkey)
ValueError: max() arg is an empty sequence

Error after latest update

erki@siil:~$ sudo pip install mps-youtube --upgrade
Downloading/unpacking mps-youtube from https://pypi.python.org/packages/source/m/mps-youtube/mps-youtube-0.01.39.tar.gz#md5=22f0a605eb64261f3eb5916b691db3a4
Downloading mps-youtube-0.01.39.tar.gz
Running setup.py egg_info for package mps-youtube

Requirement already up-to-date: Pafy in /usr/local/lib/python2.7/dist-packages (from mps-youtube)
Installing collected packages: mps-youtube
Found existing installation: mps-youtube 0.01.38
Uninstalling mps-youtube:
Successfully uninstalled mps-youtube
Running setup.py install for mps-youtube
changing mode of build/scripts-2.7/mpsyt from 644 to 755

changing mode of /usr/local/bin/mpsyt to 755

Successfully installed mps-youtube
Cleaning up...
erki@siil:$ mpsyt
Traceback (most recent call last):
File "/usr/local/bin/mpsyt", line 297, in
class Config(object):
File "/usr/local/bin/mpsyt", line 308, in Config
DDIR = get_default_ddir()
File "/usr/local/bin/mpsyt", line 133, in get_default_ddir
defn = [x for x in lines if x.startswith("XDG_DOWNLOAD_DIR")]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 24: ordinal not in range(128)
erki@siil:
$ mpsyt
Traceback (most recent call last):
File "/usr/local/bin/mpsyt", line 297, in
class Config(object):
File "/usr/local/bin/mpsyt", line 308, in Config
DDIR = get_default_ddir()
File "/usr/local/bin/mpsyt", line 133, in get_default_ddir
defn = [x for x in lines if x.startswith("XDG_DOWNLOAD_DIR")]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 24: ordinal not in range(128)
erki@siil:~$

Don't use `q` for the next track.

The are few but important keys that always™ have the same function. Like q and ctrl+c for quit and SIGINT (well kind of) especially in a terminal.

At the moment q has several different meanings in your application (from end user perspective): one is "return" (only one track playing) the other is "next track" when you play more tracks. I think i understand why you did it as a programmer. :) Would you be "confused" if you use VLC and it would use `q´ the same way?

Instead i suggest using < and > for next and previous track. Or n and p or both.

But i don't know how that would work with videos when mplayer or mpv have focus and grab the keys strokes.

Couldn't open old playlist file

After installing the program to run get the message "Couldn't open old playlist file" and closes
The distribution is DMDC with a Debian 386 kernel 3.2.54-2
Sorry if there are spelling mistakes, do not speak English and use the google translator

Tag releases

Could you tag releases instead of just making a commit? It would make packaging it so much easier.

Terminal is broken after ctrl-c while playing

When I use play mode and I want to go back into prompt I use ctrl-c to return, as suggested. The problem is that I don't see anything I type after that. The problem is repeatable and occurs every second time.

So, I play some playlist, press ctrl-c, I don't see chars, play something again, press ctrl-c and everything seems to be normal.

I use fish and urxvt.

Playback stops if mplayer runs out of buffer.

I'm unsure which program is at fault but it appears that the beginnings of playback can be halted when the program seemingly runs out of buffer, rather than wait for the buffer to fill.

I'm unsure of how to provide details as I'm not sure if this is actually the problem or not. It just seems to be the issue as it's always within the first few seconds of playback.

Terminal window closes after selecting download

Hello, I've used PMS for awhile now, and love it. Recently, I cannot download. The terminal window closes once I type "d #". Any thoughts? I've upgraded to the latest version, and I'm on Ubuntu 13.10

Undocumented 'information' feature in help

The useful command to show a result's information (e.g. 'i 2') is not listed in the help. I'm unsure if this was intentional or not for space reasons, but since the help exceeds my default terminal size space doesn't seem to be an issue.

Playlist improvements

In a playlist you can skip to the next track but you can't go to the previous track or play a certain track.

It would also be useful to use vim keys for navigations (this was also used in Google Reader and is now used in Google+ or Facebook for instance - e.g.: J to go to the next track or K to go to the previous track).

Default player

It'd be nice if either:

  1. mpv was the default player.
  2. It was possible to change the default player somehow when installing, or
  3. There was a system-wide config where you can set the default player.

Can't play any video: "AttributeError: 'NoneType' object has no attribute 'groups'"

pms-youtube can't play any video on my computer (Ubuntu 14.04, installed pms-youtube via pip). When trying to play something I get this warning:

"WARNING:root:stream failed to open"

And a few times, this error was displayed:

Traceback (most recent call last):
File "/usr/local/bin/pmsyt", line 1578, in
main()
File "/usr/local/bin/pmsyt", line 1555, in main
globals()func
File "/usr/local/bin/pmsyt", line 1164, in play
play_range(songlist, shuffle, repeat)
File "/usr/local/bin/pmsyt", line 1233, in play_range
playsong(song)
File "/usr/local/bin/pmsyt", line 806, in playsong
playsong(song, failcount=failcount)
File "/usr/local/bin/pmsyt", line 806, in playsong
playsong(song, failcount=failcount)
File "/usr/local/bin/pmsyt", line 806, in playsong
playsong(song, failcount=failcount)
File "/usr/local/bin/pmsyt", line 806, in playsong
playsong(song, failcount=failcount)
File "/usr/local/bin/pmsyt", line 758, in playsong
song['pafy'] = get_streams(song, force=failcount)
File "/usr/local/bin/pmsyt", line 744, in get_streams
p = pafy.new(song['link'], callback=writestatus)
File "/usr/local/lib/python2.7/dist-packages/pafy.py", line 196, in new
return Pafy(url, callback=callback)
File "/usr/local/lib/python2.7/dist-packages/pafy.py", line 528, in init
self.streams = [Stream(sm, opener, self.title, js) for sm in smap]
File "/usr/local/lib/python2.7/dist-packages/pafy.py", line 248, in init
sm['sig'] = [_decodesig(sm['s'][0], js)]
File "/usr/local/lib/python2.7/dist-packages/pafy.py", line 180, in _decodesig
function = _extract_function_from_js(funcname, js)
File "/usr/local/lib/python2.7/dist-packages/pafy.py", line 67, in _extract_function_from_js
args, body = m.groups()
AttributeError: 'NoneType' object has no attribute 'groups'

watch or listen video via command

It would be great if one could view or listen to a video no matter what the default is.

So if audio only is the default you would only hear the videos via the following command:

 2,4

But if the user uses

view 2,4

he/she would see the video no matter what the default is.

And

 listen 2,4

would only play sound even if the default is video.

I am not sure which commands would be best, but i think watch and view or video should do. And also w and v for short.

And listen, l, audio,a` or so for audio only.

another UnicodeEncodeError

Using code from the develop branch
Searching for moodoid
and playing the first song

UnicodeEncodeError: 'ascii' codec can't encode character u'\xef' in position 66: ordinal not in range(128)

Let me know if you need more info

full log

thomas.leveil@PAASBIER ~
$ pip install git+https://github.com/np1/mps-youtube.git@develop#mps-youtube -U
Downloading/unpacking git+https://github.com/np1/mps-youtube.git@develop#mps-youtube
  Cloning https://github.com/np1/mps-youtube.git (to develop) to c:\users\thomas~1.lev\appdata\local\temp\pip-483y0y-build
  Running setup.py egg_info for package from git+https://github.com/np1/mps-youtube.git@develop#mps-youtube

Requirement already up-to-date: Pafy in c:\python27\lib\site-packages (from mps-youtube==0.01.41)
Installing collected packages: mps-youtube
  Found existing installation: mps-youtube 0.01.41
    Uninstalling mps-youtube:
      Successfully uninstalled mps-youtube
  Running setup.py install for mps-youtube

Successfully installed mps-youtube
Cleaning up...

thomas.leveil@PAASBIER ~
$ mpsyt .moodoid --debug

mpsyt version  : 0.01.41
pafy version   : 0.3.41
Python version : 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
Processor      : Intel64 Family 6 Model 30 Stepping 5, GenuineIntel
Machine type   : AMD64
Architecture   : 32bit, WindowsPE
Platform       : Windows-7-6.1.7601-SP1
--


                88888b.d88b.  88888b.  .d8888b
                888 "888 "88b 888 "88b 88K
                888  888  888 888  888 "Y8888b.
                888  888  888 888 d88P      X88
                888  888  888 88888P"   88888P'
                              888
                              888   v0.01.41 (YouTube)
                              888



Enter /search-term to search or [h]elp
--


                88888b.d88b.  88888b.  .d8888b
                888 "888 "88b 888 "88b 88K
                888  888  888 888  888 "Y8888b.
                888  888  888 888 d88P      X88
                888  888  888 88888P"   88888P'
                              888
                              888
                              888




Searching for 'moodoid'
--


Item  Title                                                            Length
1     Moodod - De Folie Pure (Official Video)                          04:23
2     Moodod - Je suis la Montagne (Official Video)                    05:02
3     MOODOID LIVE AU STUDIO 105 DE FRANCE INTER DANS L'EMISSION LIV    15:06
4     MOODOID LIVE IN PARIS A LA FLECHE D' OR PARIS LE 17 SEPTEMBRE     13:18
5     MOODOID LIVE IN PARIS A LA FLECHE D' OR PARIS LE 17 SEPTEMBRE     14:54
6     Moodod perform 'Je Suis La Montagne' for The Line of Best Fit    06:09
7     Moodoid - Je sais qui tu es                                       07:40
8     MOODOID LIVE AU STUDIO 105 DE FRANCE INTER DANS L'EMISSION LIV    13:52
9     Moodod - Je suis la montagne                                     05:35
10    Moodod - La chanson du ciel de diamants                          05:33
11    Moodod - La chanson du ciel de diamants                          06:12
12    "De folie pure" Moodoid @ Palais des Sports, le 07 fvrier 201    05:25
13    MOODOID LIVE AU STUDIO 105 DE FRANCE INTER DANS L'EMISSION LIV    07:52
14    MOODOID LIVE IN PARIS A LA FLECHE D' OR PARIS LE 17 SEPTEMBRE     12:35
15    Moodoid - OohLaLa! Festival @Village Underground, London          05:51
16    Moodoi?d - Je Suis La Montagne                                    04:52
17    Moodod aux Trans Musicales 2013                                  00:21
18    Moodod - Je suis la Montagne - live acoustique                   06:28
19    Moodod "Je Suis La Montagne" @ Gait Lyrique 23/01/14            07:00
thomas.leveil@PAASBIER ~
$ arch results for moodoid
> all
--

  Title                                                                  Time
> Moodod - De Folie Pure (Official Video)                              04:23
  Moodod - Je suis la Montagne (Official Video)                        05:02
  MOODOID LIVE AU STUDIO 105 DE FRANCE INTER DANS L'EMISSION LIVE ME    15:06
  MOODOID LIVE IN PARIS A LA FLECHE D' OR PARIS LE 17 SEPTEMBRE 2013    13:18
  MOODOID LIVE IN PARIS A LA FLECHE D' OR PARIS LE 17 SEPTEMBRE 2013    14:54
  Moodod perform 'Je Suis La Montagne' for The Line of Best Fit        06:09
  Moodoid - Je sais qui tu es                                           07:40
  MOODOID LIVE AU STUDIO 105 DE FRANCE INTER DANS L'EMISSION LIVE ME    13:52
  Moodod - Je suis la montagne                                         05:35
  Moodod - La chanson du ciel de diamants                              05:33
  Moodod - La chanson du ciel de diamants                              06:12
  "De folie pure" Moodoid @ Palais des Sports, le 07 fvrier 2014       05:25
  MOODOID LIVE AU STUDIO 105 DE FRANCE INTER DANS L'EMISSION LIVE ME    07:52
  MOODOID LIVE IN PARIS A LA FLECHE D' OR PARIS LE 17 SEPTEMBRE 2013    12:35
  Moodoid - OohLaLa! Festival @Village Underground, London              05:51
  Moodoi?d - Je Suis La Montagne                                        04:52
  Moodod aux Trans Musicales 2013                                      00:21
  Moodod - Je suis la Montagne - live acoustique                       06:28
  Moodod "Je Suis La Montagne" @ Gait Lyrique 23/01/14                07:00

    [<-] seek [->]       [9] volume [0]      [ctrl-c] return
    [DN] SEEK [UP]       [space] pause       [q] next track        1 of 19

    Moodod - De Folie Pure (Official Video) [04:23]
Traceback (most recent call last):
  File "c:/Python27/Scripts/mpsyt", line 3042, in <module>
    main()
  File "c:/Python27/Scripts/mpsyt", line 3012, in main
    if matchfunction(k, v, userinput):
  File "c:/Python27/Scripts/mpsyt", line 2918, in matchfunction
    globals()[funcname](*matches)
  File "c:/Python27/Scripts/mpsyt", line 1973, in play_all
    play(options, "1-" + str(len(g.model.songs)))
  File "c:/Python27/Scripts/mpsyt", line 1966, in play
    play_range(songlist, shuffle, repeat, override)
  File "c:/Python27/Scripts/mpsyt", line 2053, in play_range
    playsong(song, override=override)
  File "c:/Python27/Scripts/mpsyt", line 1264, in playsong
    stderr=subprocess.STDOUT, bufsize=1)
  File "c:\Python27\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "c:\Python27\lib\subprocess.py", line 896, in _execute_child
    startupinfo)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xef' in position 66: ordinal not in range(128)

crash when typing da command

using ubuntu 12.04, version v0.01.40

da 17
Traceback (most recent call last):
File "/usr/local/bin/mpsyt", line 2954, in
main()
File "/usr/local/bin/mpsyt", line 2924, in main
if matchfunction(k, v, userinput):
File "/usr/local/bin/mpsyt", line 2836, in matchfunction
globals()funcname
File "/usr/local/bin/mpsyt", line 2256, in download
filename = _make_fname(song, None, av=av)
File "/usr/local/bin/mpsyt", line 1604, in _make_fname
extension = song.urls[key]['ext']
KeyError: 'ext'

IOError: Can't get video stream info

Upon searching for 'The Sex Album':

Search results for the sex album

Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 808, in *bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 761, in run
self.__target(_self.__args, _self.__kwargs)
File "/usr/local/bin/mpsyt", line 1586, in preload
song['pafy'] = get_streams(song, future=True)
File "/usr/local/bin/mpsyt", line 1053, in get_streams
p = pafy.new(song['link'])
File "/usr/local/lib/python2.7/dist-packages/pafy.py", line 255, in new
return Pafy(url, callback=callback)
File "/usr/local/lib/python2.7/dist-packages/pafy.py", line 546, in __init

raise IOError("Can't get video stream info")
IOError: Can't get video stream info

mpsyt does not start on windows

[Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32]
[mpsyt v0.01.37]

python .\mpsyt
...
Enter /search-term to search or [h]elp
Traceback (most recent call last):
File ".\mpsyt", line 2592, in
main()
File ".\mpsyt", line 2504, in main
open_from_file()
File ".\mpsyt", line 827, in open_from_file
g.userpl = pickle.load(plf)
EOFError

Some prev version works perfectly

Can't play YouTube playlists

I'm using the latest mps-youtube (0.1.37) under Ubuntu 14.04 and it fails to play YouTube playlists. When trying to play a youtube playlist, I get this error: "Problem fetching this item: invalid literal for int() with base 10: '240.511'"

I've tried searching for "volbeat" playlists, then tried playing the resulted playlists but none worked.

Really long items report incorrect result length

For an example search 'five hours' to get ridiculously long result lengths. The result will usually be something like '00:43'.

bug

The stream will play just fine, it's just a misreported length. Probably due to the fact that there is no hour slot. So I'm unsure if this is a bug or an unsupported feature.

Turkish character issue

When i am trying to open a video which contains Turkish characters it says "Problem fetching this item: 'utf8' codec can't decode byte 0xc4 in position 0: unexpected end of data"

Google-style search syntax support

As a feature-request, I'd like to be able to use google-style search syntax for results. How detailed and inclusive is up for debate.

For instance, being able to search with:

/mahler symphony 5 -chicago -bernstein

Show more result

Hello grat app but could be better to have more result. Maybe adding a next command to display the result after the 19 first would be nice.

Feature request: Please add option to convert files to mp3

Would be nice to have an option to convert downloaded files to specific format, for example to mp3. Like current playerargs there should be converterargs parameter for that. Use case for this is to prepare files for specific mediaplayer which is not able to play m4a or ogg.
Addidtionally (or optionally) there can be an option to run script for every file downloaded which should get the file in command line parameter. This way it would be possible to define more elaborate automation tasks to do with downloaded files.

include changelog

for creating clean debian packages, there should be upstream changelog file as part where do we read changes from.

Search history

Please implement persistent search history, similar to bash promt. Currently search history is usable only within session, when restarting then history is empty.

video title with mpv/mplayer

Is there a way add support to show video title with mpv/mplayer?
mpv with libquvi works well with title=${media-title}, maybe you could add the same thing?

Error when a search result is no longer available due to a copyright claim

Search results for interview pharell enora

Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.3/threading.py", line 901, in _bootstrap_inner
self.run()
File "/usr/lib/python3.3/threading.py", line 858, in run
self._target(_self._args, *_self._kwargs)
File "/usr/bin/mpsyt", line 1586, in preload
song['pafy'] = get_streams(song, future=True)
File "/usr/bin/mpsyt", line 1053, in get_streams
p = pafy.new(song['link'])
File "/usr/lib/python3.3/site-packages/pafy.py", line 260, in new
return Pafy(url, callback=callback)
File "/usr/lib/python3.3/site-packages/pafy.py", line 522, in init
raise RuntimeError("Youtube says: %s" % reason)
RuntimeError: Youtube says: "Pharrell Williams interv..."
This video is no longer available due to a copyright claim by Virgin Radio.

RegEx for all does not work

It would be great if pmsyt would understand that * means "all videos".

So one can use "shuffle *" to shuffle all videos found for a keyword.

Playlist download

Is there a way to do a playlist download, similar to play? Like "da 1-4" or "da all"?

Set the amount of item listed

by default it seems like 19 items is display.

Add an option to set the amount u want?
Because on small screens/large fonts u have to scroll up and down to see the full list

Thanks =)

mps-youtube not working behind proxy

mps-youtube does not work with connections through network proxy.
No search and playing is possible. Moreover no information about connection problems is displayed.

Proxy is defined in dconf, and in environment variables (HTTP_PROXY and http_proxy).

Using v0.01.37

Exception while searching

If I search ".stonehenge", results are given but this stacktrace is shown:

Search results for stonehenge
> Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 808, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 761, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/bin/mpsyt", line 1554, in preload
    song['pafy'] = get_streams(song, future=True)
  File "/usr/local/bin/mpsyt", line 1021, in get_streams
    p = pafy.new(song['link'])
  File "/usr/local/lib/python2.7/dist-packages/pafy.py", line 255, in new
    return Pafy(url, callback=callback)
  File "/usr/local/lib/python2.7/dist-packages/pafy.py", line 548, in __init__
    self.streams = [Stream(sm, self.title, js) for sm in smap]
  File "/usr/local/lib/python2.7/dist-packages/pafy.py", line 281, in __init__
    self.resolution = g.itags[self.itag][0]
KeyError: '83'

Then, if I try to play an item from the search results, this is shown and the program quits:

Traceback (most recent call last):E...                                      
  File "/usr/local/bin/mpsyt", line 2069, in <module>
    main()
  File "/usr/local/bin/mpsyt", line 2047, in main
    globals()[func](*matches)
  File "/usr/local/bin/mpsyt", line 1514, in play
    play_range(songlist, shuffle, repeat, override)
  File "/usr/local/bin/mpsyt", line 1593, in play_range
    playsong(song, override=override)
  File "/usr/local/bin/mpsyt", line 1035, in playsong
    song['pafy'] = get_streams(song, force=failcount)
  File "/usr/local/bin/mpsyt", line 1017, in get_streams
    p = pafy.new(song['link'], callback=writestatus)
  File "/usr/local/lib/python2.7/dist-packages/pafy.py", line 255, in new
    return Pafy(url, callback=callback)
  File "/usr/local/lib/python2.7/dist-packages/pafy.py", line 548, in __init__
    self.streams = [Stream(sm, self.title, js) for sm in smap]
  File "/usr/local/lib/python2.7/dist-packages/pafy.py", line 281, in __init__
    self.resolution = g.itags[self.itag][0]
KeyError: '83'

I'm using v0.01.31.

IndexError: tuple index out of range

On searching for 'final fantasy 6 ost':

Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 808, in *bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 761, in run
self.__target(_self.__args, _self.__kwargs)
File "/usr/local/bin/mpsyt", line 1586, in preload
song['pafy'] = get_streams(song, future=True)
File "/usr/local/bin/mpsyt", line 1053, in get_streams
p = pafy.new(song['link'])
File "/usr/local/lib/python2.7/dist-packages/pafy.py", line 260, in new
return Pafy(url, callback=callback)
File "/usr/local/lib/python2.7/dist-packages/pafy.py", line 559, in __init

self.streams_ad = [Stream(sm, self.title, js) for sm in smap_adpt]
File "/usr/local/lib/python2.7/dist-packages/pafy.py", line 297, in init
self.notes = g.itags[self.itag][3]
IndexError: tuple index out of range

Precache

Please add support to pre-cache the next track during the playback.

Make use of internal Youtube playlists

Many Youtube users have pre-compiled playlists, so there's sometimes no need to build one yourself. Being able to search for and utilize playlists straight from youtube would be a great feature.

Show playing progress

Please implement showing play progress (within a song) in command window, this would be useful in combination with seek functionality to see at a glance how far we are to help find specific place. In relation to this it would be sometimes useful to start playing in specific place in song/video by entering mm:ss for starting place.

UnicodeDecodeError on "set" command

I'm using Ubuntu 13.10. The "set" command crashes whole program no matter what:

Traceback (most recent call last):
File "/usr/local/bin/pmsyt", line 2033, in
main()
File "/usr/local/bin/pmsyt", line 2028, in main
screen_update()
File "/usr/local/bin/pmsyt", line 876, in screen_update
print(py2utf8_encode(g.content))
File "/usr/local/bin/pmsyt", line 69, in
py2utf8_encode = lambda x: x.encode("utf8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 206: ordinal not in range(128)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.