Skip to content

Add mutil playger support#84

Open
yuliusw wants to merge 2 commits into
raitonoberu:masterfrom
yuliusw:master
Open

Add mutil playger support#84
yuliusw wants to merge 2 commits into
raitonoberu:masterfrom
yuliusw:master

Conversation

@yuliusw
Copy link
Copy Markdown

@yuliusw yuliusw commented Apr 9, 2026

Only test by "mpris" ,and " spotify ,mpris"

For old configration compatibility:

# config.yaml
player: mopidy ,mpris
mopidy:
  address: 127.0.0.1:6680
mpris:
  players: []
# singel is ok too
player: mpris
mpris:
  players: []

Program just init by order by user pin out , and once error , move to next.
No figtout player would not be try . seems if auto check every player and use MPRIS at last will lead see nothing would make troubleshoot difficult .

Also asking if I can keep a COPR project like orthers for Fedora and other RPM users to downlaod .
This project is the most players compatible therminal lyrics software,and really fit for bar :)

@yuliusw yuliusw changed the title BBadd mutil playger support Add mutil playger support Apr 9, 2026
@raitonoberu
Copy link
Copy Markdown
Owner

Hello! Regarding your changes: I really can't understand the use case for this. Player initialisation fails in some very specific conditions, such as missing authentication (Spotify) or an unsupported OS (MPRIS). In what situation would I, as a user, want the error to be ignored instead of being presented with it so that I can fix it?

Also asking if I can keep a COPR project like orthers for Fedora and other RPM users to downlaod

Sure thing! Don't forget to add yourself to the README

@yuliusw
Copy link
Copy Markdown
Author

yuliusw commented Apr 10, 2026

In this situation, if I were to use multiple players, I definitely wouldn't run two of them simultaneously. But sometimes I would switch between them to use one. ohters closed.

My idea is: If there are many players but only one is running, we should find which one is currently in use
and ignore the others that are causing errors. If there is not even a single usable one, we will report all error.

e.g : I observed that if mopidy is configured but the player not run, you will encounter a connection error. But what I have currently opened is not Mopidy. What I'm using now is a player that only supports MPRIS. They merely share the same configuration file.

In the current release version, the behavior of MPRIS is that

  • if the platform supports it, regardless of whether a player is running or not, no error will be reported.

So placing it might cause problems. If any player is specified after it, they will not attempt to initialize (because the MPRIS initialization has succeeded)
Other errors(before and after) will never be displayed and you will get a empty terminal untill press clt+c.

I think this is a good performance. Because of the dynamic registration of applications by MPRIS. I don't want to give up this dynamic registration mechanism. It means that I can switch to compatible players at any time without having to restart sptlrx.

maybe it deserving some more discuss .

Update README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants