balena-sound icon indicating copy to clipboard operation
balena-sound copied to clipboard

Implement support for the headless PlexAmp client

Open sniff122 opened this issue 2 years ago • 12 comments

Added a container build for the headless PlexAmp client, this will allow a user to use the plex app on a mobile device to cast music from their media server to their Balena Sound device.

Change-type: minor Signed-off-by: Lewis L. Foster [email protected]

Hey there, appreciated contributor!

Have you taken a look at the contribution guidelines for this project? To enable our CI to work correctly and version the releases of the project, you need to ensure your commit messages contain the required information detailed here. Thank you!

sniff122 avatar Sep 17 '22 16:09 sniff122

An error occurred whilst building your landr site preview:

{
  "name": "Error",
  "message": "Command failed with code undefined: /usr/src/app/node_modules/gatsby/cli.js build",
  "stack": "Error: Command failed with code undefined: /usr/src/app/node_modules/gatsby/cli.js build\n    at Object.exports.run (/usr/src/app/lib/build-runner.js:257:11)\n    at async build (/usr/src/app/bot/index.js:132:19)\n    at async /usr/src/app/bot/index.js:210:25\n    at async Promise.all (index 0)\n    at async middleware (/usr/src/app/node_modules/@octokit/webhooks/dist-node/index.js:355:5)"
}

ghost avatar Sep 17 '22 16:09 ghost

@balena-ci retest

sniff122 avatar Sep 17 '22 16:09 sniff122

really not sure why the generate version is failing, unless its just because its for an additional commit, could this be reviewed at some point though?

sniff122 avatar Oct 21 '22 20:10 sniff122

I'll find a way to have it automatically pull the latest plexamp headless archive

sniff122 avatar Dec 03 '22 15:12 sniff122

Using the versionbot/pr/593 branch I'm getting the following plex error in balena dashboard log:

<plex> internal/modules/cjs/loader.js:1057
<plex>   return process.dlopen(module, path.toNamespacedPath(filename));
<plex>                  ^
<plex> 
<plex> Error: Module did not self-register: '/opt/plexamp/plexamp/treble/linux-arm64/treble.node'.

Service exited 'plex sha256:3bac98b52b3814ca777ec8e4eaef53ee5845cd9741397978c3ccb2946359a2c4'

The service then shuts down and enters a restart loop. I can't get a terminal open to investigate because it's in a constant shutdown/restart state.

hexive avatar Dec 04 '22 16:12 hexive

Fix: plexamp 4.6.0 requires Node 16

https://forums.plex.tv/t/plexamp-4-6-0-headless-install-error/821034

hexive avatar Dec 04 '22 18:12 hexive

Ah didnt spot that, ill push up a change that bumps the node version

sniff122 avatar Dec 04 '22 18:12 sniff122

One more thing you might want to look at is the login.sh.

After a fresh build bash login.sh said "Plexamp appears to be already configured" even though it is the first run. Maybe check for a specific /Plexamp/Settings/[filename] instead of just the directory?

**

Otherwise everything is working great! Thank you for putting this together. I hope the balena-sound team merges this plugin. There are a lot of folks out there are looking for a player with spotify, airplay AND plex support. Right now --with this plugin-- this is the only player offering that combination. Additionally this would be the only player that allows plexamp multiroom streaming.

hexive avatar Dec 05 '22 04:12 hexive

A docker volume is used to persist the config data but it might be worth checking the file that stores the login state instead of just the directory

sniff122 avatar Dec 05 '22 06:12 sniff122

That should be some docs about the plugin and using the user token config file instead of the settings folder

sniff122 avatar Dec 05 '22 19:12 sniff122

@sniff122, great to see all these new interesting features.

I am wondering how you would feel about adding the plugin as a Block on the Hub instead of including it directly in the repo here? That is what we designed the Blocks for, and then we can update the docs that allow people to add the block if they want the feature. It seems it would stop the app becoming heavier than it needs to be for those that don't use the feature.

Would be interested to hear what you think. No problem continuing the development here though, just flagging that it may be difficult for us to merge it.

maggie44 avatar Dec 09 '22 11:12 maggie44

Oh I didn't know about that, no clue how I didn't know, oh well. Sounds like it might be a better idea making it a block then

sniff122 avatar Dec 09 '22 20:12 sniff122