Git Product home page Git Product logo

livestreamer-curses's People

Contributors

fletom avatar gapato 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

livestreamer-curses's Issues

Help screen crash

I can reproduce this crash by doing:

  1. Starting a twitch.tv stream, it'll open livestreamer and mpv
  2. Going into the (h)elp menu in livestreamer-curses

Some time passes (until stream update?) and then this:

Traceback (most recent call last):
File "/usr/bin/livestreamer-curses", line 9, in
load_entry_point('livestreamer-curses==1.5.2', 'console_scripts', 'livestreamer-curses')()
File "/usr/lib/python3.5/site-packages/livestreamer_curses/main.py", line 85, in main
curses.wrapper(l)
File "/usr/lib/python3.5/curses/init.py", line 94, in wrapper
return func(stdscr, _args, *_kwds)
File "/usr/lib/python3.5/site-packages/livestreamer_curses/streamlist.py", line 215, in call
self.run()
File "/usr/lib/python3.5/site-packages/livestreamer_curses/streamlist.py", line 299, in run
self.check_online_streams()
File "/usr/lib/python3.5/site-packages/livestreamer_curses/streamlist.py", line 680, in check_online_streams
self.refilter_streams()
File "/usr/lib/python3.5/site-packages/livestreamer_curses/streamlist.py", line 761, in refilter_streams
self.redraw_stream_footer()
File "/usr/lib/python3.5/site-packages/livestreamer_curses/streamlist.py", line 620, in redraw_stream_footer
s = self.filtered_streams[row]
IndexError: list index out of range

Currently streaming channels

Hi,
Nice project, best way to watch streams :)
However, I am not happy about having to click through the list and encounter offline streamers, before I get to who is currently streaming. Are you planning on adding feature for seeing the online status of streams?

Crash when maximizing terminal window

livestreamer-curses crashes reproducible if i maximize my console window

Traceback (most recent call last):
  File "/usr/bin/livestreamer-curses", line 9, in <module>
    load_entry_point('livestreamer-curses==1.1.0', 'console_scripts', 'livestreamer-curses')()
  File "/usr/lib/python3.4/site-packages/livestreamer_curses/main.py", line 925, in main
    curses.wrapper(l)
  File "/usr/lib/python3.4/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/lib/python3.4/site-packages/livestreamer_curses/main.py", line 238, in __call__
    self.run()
  File "/usr/lib/python3.4/site-packages/livestreamer_curses/main.py", line 315, in run
    (r, w, x) = select.select(souts, [], [], 1)
  File "/usr/lib/python3.4/site-packages/livestreamer_curses/main.py", line 296, in resize
    self.move(stream_cursor, absolute=True, pad_name='streams')
  File "/usr/lib/python3.4/site-packages/livestreamer_curses/main.py", line 570, in move
    self.refresh_current_pad()
  File "/usr/lib/python3.4/site-packages/livestreamer_curses/main.py", line 505, in refresh_current_pad
    pad.refresh(self.offsets[self.current_pad], 0, 2, self.pad_x, self.pad_h, self.pad_w)
_curses.error: prefresh() returned ERR

Im running 5b32f86 with Python 3.4.1 and XFCE 4.10

More of a request than an issue :D

Could you add a new line with the current game the streamer is playing. ๐Ÿ˜„
Would be nice to see what they are playing so you don't need to open the twitch website or the stream to see.

Threading leak when refreshing active streams.

I noticed that after a certain amount of time running in auto-refresh mode, the program always errors out:

Traceback (most recent call last):
  File "/usr/local/bin/livestreamer-curses", line 9, in <module>
    load_entry_point('livestreamer-curses==1.4.0', 'console_scripts', 'livestreamer-curses')()
  File "/Library/Python/2.7/site-packages/livestreamer_curses/main.py", line 85, in main
    curses.wrapper(l)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "/Library/Python/2.7/site-packages/livestreamer_curses/streamlist.py", line 217, in __call__
    self.run()
  File "/Library/Python/2.7/site-packages/livestreamer_curses/streamlist.py", line 301, in run
    self.check_online_streams()
  File "/Library/Python/2.7/site-packages/livestreamer_curses/streamlist.py", line 666, in check_online_streams
    pool = Pool(self.config.CHECK_ONLINE_THREADS)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 714, in __init__
    Pool.__init__(self, processes, initializer, initargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 159, in __init__
    self._repopulate_pool()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 222, in _repopulate_pool
    w.start()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/dummy/__init__.py", line 75, in start
    threading.Thread.start(self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 745, in start
    _start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread

Sure enough, watching my system process monitor, the process' active thread count increases by the number of streams every time the refresh is run. It would seem that the calls to check online status are spawned as threads but not released afterwards. It eventually goes up to 1,000s of threads and then refuses to spawn any more.

[Request] Column with the broadcasters title

As of now the only info we have is the name. And if there are several casters online at the same time I have to open them all and check the streams to see what they are playing so I can decide which one I want to watch.

Crash after deleting stream

  • Have a number of streams saved in your list.
  • Have only one stream presently online.
  • (d)elete that stream.
  • Crash.

Traceback (most recent call last):
File "/usr/bin/livestreamer-curses", line 9, in
load_entry_point('livestreamer-curses==1.5.2', 'console_scripts', 'livestreamer-curses')()
File "/usr/lib/python3.5/site-packages/livestreamer_curses/main.py", line 85, in main
curses.wrapper(l)
File "/usr/lib/python3.5/curses/init.py", line 94, in wrapper
return func(stdscr, _args, *_kwds)
File "/usr/lib/python3.5/site-packages/livestreamer_curses/streamlist.py", line 215, in call
self.run()
File "/usr/lib/python3.5/site-packages/livestreamer_curses/streamlist.py", line 361, in run
self.delete_stream()
File "/usr/lib/python3.5/site-packages/livestreamer_curses/streamlist.py", line 833, in delete_stream
self.redraw_current_line()
File "/usr/lib/python3.5/site-packages/livestreamer_curses/streamlist.py", line 599, in redraw_current_line
s = self.filtered_streams[row]
IndexError: list index out of range

Crash when exiting help screen

Hello, I'm getting this crash when exiting the help screen:

Traceback (most recent call last):

  File "./livestreamer-curses.py", line 729, in <module>
    curses.wrapper(l)
  File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "./livestreamer-curses.py", line 182, in __call__
    self.run()
  File "./livestreamer-curses.py", line 288, in run
    self.show_streams()
  File "./livestreamer-curses.py", line 414, in show_streams
    self.redraw_stream_footer()
  File "./livestreamer-curses.py", line 527, in redraw_stream_footer
    s = self.streams[row]
IndexError: list index out of range

It only seems to happen when I have a stream added, when no streams are added it goes back to the initial welcome screen as expected.

Cannot find build/livestreamer-curses/setup.py

Trying to install your program. This is my output when I run it from my home directory. I've tried the pip command with and without sudo and have removed the build directory each time to install fresh.

IOError: [Errno 2] No such file or directory: '/home/user/build/livestreamer-curses/setup.py'

I also tried manually placing the setup.py file in the directory it's searching in but then it couldn't find the livestreamer_curses module.

ImportError: No module named livestreamer_curses.main

Am I doing something wrong?

Doesn't work on OS X

Mac OS X doesn't come with gdbm installed, so this line fails. It looks like it's only importing an exception anyways, so it shouldn't be needed.

Shelve can use any of the dbms and you shouldn't expect it to be using a specific one in this code.

  File "/private/var/folders/vx/51c8lr8x1kg8rhr6r9r3nn000000gn/T/pip_build_fletcher/livestreamer-curses/src/livestreamer_curses/main.py", line 49, in <module>

    from gdbm import error as GDBMError

ImportError: No module named gdbm

Adhere to the XDG Base Directory Specification

Follow the XDG Base Directory Specification under linux to prevent polluting the home directory.

To do so:

Place/Search the .livestreamer-cursesrc under
$XDG_CONFIG_HOME/livestreamer-curses/livestreamer-cursesrc

When $XDG_CONFIG_HOME is not set default to ~/.config/livestreamer-curses/livestreamer-cursesrc

Place/Search the .livestreamer-curses.db
$XDG_DATA_HOME/livestreamer-curses/livestreamer-curses.db
When $XDG_DATA_HOME is not set default to~/.local/share/livestreamer-curses/livestreamer-curses.db

See the XDG Base Directory Specification

Some General Suggestions

  1. Prevent it from crashing if window becomes too narrow in width.
  2. Detach from process so if you close ls-curses, it doesn't close your player too.
  3. Make text input in modeline so editing the url's you add easier (e.g. arrow keys don't work). Maybe add in vi-like bindings as well?
  4. Perhaps an alternative database to store channels in (e.g. reading from a JSON or s-exp file instead of SQL). I've gotten a corrupt database a few times.

Python 3 support

Hello im getting the following error with version 1.1.0:

Traceback (most recent call last):
  File "/usr/bin/livestreamer-curses", line 9, in <module>
    load_entry_point('livestreamer-curses==1.1.0', 'console_scripts', 'livestreamer-curses')()
  File "/usr/lib/python3.4/site-packages/livestreamer_curses/main.py", line 881, in main
    parser.add_argument('-d', type=unicode, metavar='database', help='default: ~/.livestreamer-curses.db',
NameError: name 'unicode' is not defined

I dont know any python, but i think the cmd string should be quoted.

New version does not work with python 3

The new Release breaks support for python 3.

If i try to build livestreamer-curses from source i get

Traceback (most recent call last):
  File "setup.py", line 10, in <module>
    from livestreamer_curses import config
  File "/home/serra/pkgs/arch_linux/AUR/livestreamer-curses/src/livestreamer-curses-1.5.0/src/livestreamer_curses/__init__.py", line 1, in <module>
    from config import VERSION as __version__
ImportError: No module named 'config'

I can however build it with python2.

If i try to start the program with python3 i get

Traceback (most recent call last):
  File "/usr/bin/livestreamer-curses", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3020, in <module>
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 614, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 920, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 807, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: livestreamer

EDIT:
If you dont want to keep compability with python3, maybe use

#!/usr/bin/python2

as your shebang.

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.