Only default device appears in output device list if squeezelite is set to auto run but fails to run
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Perl
- 星标
- 4
- 派生
- 5
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
LMS-Community/plugin-LocalPlayer 的其他 Issue
-
难度 5/5 一周以上 新手友好度 20/100
LMS-Community/plugin-LocalPlayer#2 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 20/100
LMS-Community/plugin-LocalPlayer#1 · 5 条评论 ·
查看 LMS-Community/plugin-LocalPlayer 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
fglock/PerlOnJava#1579 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
objectionary/eolang.sty#184 ·
-
难度 2/5 1-3 小时 新手友好度 86/100
-
1.severity: security
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复