Only default device appears in output device list if squeezelite is set to auto run but fails to run
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 52/100
Research direction
Start in LocalPlayer/Settings.pm at handler2 around line 89, then read the Squeezelite devices routine and the nearby binary-path handling. Verify the behavior when autorun is enabled but Squeezelite fails to start; done means the output device list still includes available devices rather than only the default entry, with the relevant platform and Docker paths considered.
Written by the indexing model from the issue text.
Description
Issue was discussed in this thread.
https://forums.lyrion.org/forum/user-forums/logitech-media-server/1785058-local-player-and-rpi-os-bookworm-desktop
From my posty on the thread. My understanding of the problem and a suggested fix.
The list of available output devices is generated by the devices routine in Settings.pm.
This routine can have one optional parameter - the path of the squeezelite binary to run.
If the squeezelite binary path is not supplied (as when called by handler2 in Settings.pm) and "autorun" pref is set, then the devices routine will use the path of the squeezelite that is running.
However if squeezelite has failed to run (e.g. output device inacessible/invalid), then devices routine has no path to binary and so returns a list just with "default" entry.
My suggested fix is to add the path to the devices call in Settings.pm handler2.
Line 89 LocalPlayer/Settings.pm
from
my $devices = Plugins::LocalPlayer::Squeezelite->devices;
to
my $devices = Plugins::LocalPlayer::Squeezelite->devices(Slim::Utils::Misc::findbin($bin));
Within the plugin, the determination of which version of squeezelite to run is a bit convoluted (e.g. OS / arch / Docker / pcp) , so I'm not 100% confident this will work for all instances.
However since Slim::Utils::Misc::findbin($bin) is used just a few lines above my changes to determine squeezelite command line options - I think it should be ok.
If it looks to be a fix there are efficiencies and tests that can be added to make it more robust.
- Dominant language
- Perl
- Stars
- 4
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from LMS-Community/plugin-LocalPlayer
-
Installed in Docker Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
LMS-Community/plugin-LocalPlayer#2 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
LMS-Community/plugin-LocalPlayer#1 · 5 comments ·
All issues in LMS-Community/plugin-LocalPlayer
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
corazawaf/coraza-nginx#140 ·
-
1.severity: security
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
api7/lua-resty-saml#63 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100