Giter VIP home page Giter VIP logo

comp's People

Contributors

jaseg avatar mcsinyx avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

cclauss

comp's Issues

Use mpv playlist

Currently the playlist functions (go backward/forward, history, shuffle, repeat, etc.) are implemented in Python by me, which is slow and buggy (-er than mpv's, which is written in C and well tested). The mpv playlist is quite easy to use by triggering the MPV.playlist_* functions, but there are a few remaining problems:

  1. The logic:
    • Currently comp has a (stupidly) unique history handling, i.e. when you go backward, it will go back to the previously played tracks, not caring whether which mode it's in. This is weird, as in shuffle mode we'd expect to have randomly chosen track either go back or forward when there is no track really there. I mean I want history to be mode-wise. This makes implementing mpv's playlist lose the point.
    • Selective modes: this is a new (read: weird) feature made to allow user to have temporary subplaylist. I'm thinking about sth similar to visual mode, so we'll only change the mpv playlist when there is a user command to do so. Update: This will requires rewriting the playlist so we'll need to have another one for displaying.
    • Instant repeat/shuffle mode changing: currently user need to press play key (return/enter key) to get the playlist updated (as it's implement in an iterator, the mode can't be switch dynamically). This is so so inconvenience. Update: mpv has loop-file and loop-list for repeating but shuffling can only be done by playlist-shuffle function which well, shuffle the list up, so when we switch to another mode, I guess rewrite the whole list is a must.
  2. To do this, we'll need filename to parse to mpv, but youtube-dl extract flat playlist, at least with Youtube playlists return list of dicts containing IDs, not full URL. Maybe solving #2 will help. SOLVED

setup.py doesn't work as expected

./setup.py install installs in eggs so manual page isn't in MANPATH, and wait,

Traceback (most recent call last):
  File "/home/cnx/.local/bin/comp", line 4, in <module>
    __import__('pkg_resources').run_script('comp==0.3.6', 'comp')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 739, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1486, in run_script
    raise ResolutionError("No script named %r" % script_name)
pkg_resources.ResolutionError: No script named 'comp'

--old-and-unmanageable flag fixes this but, eh, it's old and unmanageable, and it prevents dependencies installation.

pip3 install comp works well though.

Renew the repository

This project started as (and still is) a fork of jaseg/python-mpv but since I need to do some pull requests on the original repo, I imported it here.

@alekcacko, @NateTheGreatt, @dark-yux, @joshuamabina, @SirBoonami, @Weznon, @CyanJDroid, @imitis, @rigrassm, @Bfgeshka and @McFkCoding, thank you for your encouragement. The current stable branch is testing (how irony) and I wish to have you guys checking my program again ๐Ÿ™‡โ€โ™‚๏ธ

Edit: as of 2017-05-22, version 0.2.x is merged to master.

change mode hotkey & shuffle issues

  1. Alt+m not working, doesn't change modes anymore, just mutes the video
  2. if i set my config to shuffle-all, then select a video and hit Enter it doesn't play the video i am on. It selects a random video on the playlist

KeyError mpv

trying the new version of comp but getting this error

comp 'https://www.youtube.com/playlist?list=PLYosk6VjN4iYItFGfacO9HBRdeUcOP7OA'

Traceback (most recent call last):
  File "/media/Suiton/Public/dotjutsu/virtualenv/.virtualenv/comp/bin/comp", line 346, in <module>
    mpv_args = dict(config['mpv'])
  File "/usr/lib64/python3.6/configparser.py", line 959, in __getitem__
    raise KeyError(key)
KeyError: 'mpv

Python 3.6.4
pip 9.0.1

add custom arguments support?

can you add custom arguments support?
i would like to use task-spooler and other mpv flags with comp
FYI: task-spooler (tsp) can queue up videos/commands

normally i would use this command from the shell:
tsp mpv --ontop --no-border --force-window --autofit=500x280 --geometry=-15-50 [URL]

Dynamic filename processor

From now, comp entries will have this structure:

[{'filename': 'https://foo.bar/baz',
  'title': 'foobar title',
  'duration': '00:00:00',
  'error': False,
  'playing': False,
  'selected': False},
 {'filename': '/foo/bar/baz',
  'title': 'foobaz title',
  'duration': '00:00:00',
  'error': False,
  'playing': False,
  'selected': False}]

I want to write a function that recognize then open these kinds of filenames and return the above data:

  • Online playlist supported by youtube-dl
  • Local playlist in JSON (same structure, just json.load)
  • Online video support by youtube-dl
  • Direct URL to video file
  • Local video
  • youtube-dl search

Not sure if this is possible though.

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.