Comments (5)
idea: make mps player agnostic
Since sending commands to a mplayer instance running slave mode is quite similar to sending command to the Music Player Daemon it would be nice to then give users the choice of the backend music player.
Maybe some kind of player adpater class could be put together to abstract the details of different supported music player backends. Something similar to:
class MplayerAdapter(object):
def start(self):
# run mplayer in slave mode in a thread
def play(song):
# command to tell mplayer to play that song
...
Other adapters would have to implement the start
and play
methods as well so one could be used in place of one other.
from yewtube.
Yes that sounds great, I'm all for that design. Do you want to start working on it? Should I create a new branch?
from yewtube.
Start it. I don't know when i'll have more free time for coding.
I may contribute to the mpd adapter as i'm using it at home
from yewtube.
Ok no prob I will get to work on it, thanks for your help so far!
from yewtube.
From the mpv man page:
--slave-broken Switches on the old slave mode. This is for testing only, and incompatible to the removed --slave switch.
ATTENTION!:
Changes incompatible to slave mode applications have been
made. In particular, the status line output was changed,
which is used by some applications to determine the current
playback position. This switch has been renamed to prevent
these applications from working with this version of mpv,
because it would lead to buggy and confusing behavior only.
Moreover, the slave mode protocol is so horribly bad that it
should not be used for new programs, nor should existing pro‐
grams attempt to adapt to the changed output and use the
--slave-broken switch. Instead, a new, saner protocol should
be developed (and will be, if there is enough interest).
This affects most third-party GUI frontends.
With this in mind I'm not going to attempt implementing slave mode with mpv. I don't mind about the mpv status output having been changed, but implementing something that has been relabelled as broken can't be a good idea. It's probably not going to be supported and may be dropped in future.
I'm also not happy about implementing it just for mplayer - it will fragment the codebase too much. I might abandon this idea entirely.
from yewtube.
Related Issues (20)
- Your input can't be opened HOT 1
- Support py3.12 HOT 1
- 'NoneType' object has no attribute 'add_cmd'
- Yewtube v2.10.4 suggests upgrading to v2.9.2 HOT 3
- A way to queue/shuffle the entire playlist rather than just the visible entries HOT 1
- Feature Request: Spotify Playlist
- yt command doesn't work HOT 3
- Is it possible to use ffmpeg instead for video playback? HOT 3
- Issue with loading mpv config files HOT 2
- Error when starting the script HOT 2
- [Feature Request] Display current chapter
- how to JUST PLAY AUDIO please guide without missing any step :-)) HOT 3
- Truncation makes columns unreadable HOT 1
- `Invalid continuation byte` error when try to start with `yt` command
- Corrupted cache data HOT 1
- I didn't understand how to use it set download_command aria2c --dir=%d --out=%f %u
- "FIleExistsError: [Errno 17] File exists" when installing through homebrew HOT 2
- `d` command simply auto download instead of showing formats as `help download` describes
- DownloadError [youtube] Sign in to confirm you’re not a bot. This helps protect our community. HOT 2
- crash when searching
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yewtube.