Skip to content

feat: streamdeck+ Song title and custom layout, changes to error handling - #151

Merged
XeroxDev merged 10 commits into
XeroxDev:masterfrom
nosjo:master
Jan 6, 2026
Merged

XeroxDev merged 10 commits into
XeroxDev:masterfrom
nosjo:master

Conversation

@nosjo

@nosjo nosjo commented Mar 26, 2025

Copy link
Copy Markdown
Contributor

Not to happy with my changes but not sure what other way can be done to fix #150

@nosjo
nosjo requested a review from XeroxDev as a code owner March 26, 2025 06:55
@sonarqubecloud

Copy link
Copy Markdown

@XeroxDev

Copy link
Copy Markdown
Owner

IMO this resolution is fine in regards of the linked ticket. But could provide some screenshots to display how the change is looking (and how/where the new messages are displayed)?

@nosjo

nosjo commented Mar 26, 2025

Copy link
Copy Markdown
Contributor Author

It displays it like this upon connection issues https://share.nosjo.xyz/KBjLRB.png
All other errors will still be displayed as before

@XeroxDev XeroxDev left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for me. Will be deployed with the next update in the future (such a small change doesn't justify an entire update yet)

@nosjo

nosjo commented Sep 4, 2025 •

Copy link
Copy Markdown
Contributor Author

Slight mistake was meant to open a new pull request for those changes but oh well guess this works

This new commit adds support for showing song title, author or album instead of the play/pause text
and also adds support for inputting path to a custom layout to use and can populate text fields in said custom layout automatically if key names are correct

This also depends on XeroxDev/Stream-Deck-TS-SDK#21

Before Before Picture

After After Picture

The new settings Settings Picture

Picture of custom layout example Custom Layout Picture

@nosjo
nosjo requested a review from XeroxDev September 4, 2025 01:07
@nosjo nosjo changed the title fix(play-pause): changes to error handling feat: streamdeck+ Song title and custom layout, changes to error handling Sep 4, 2025
@XeroxDev
XeroxDev requested a review from Copilot November 4, 2025 18:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Stream Deck+ support for displaying song titles with custom layouts and improves error handling for connection states. The main purpose is to enhance the Stream Deck+ encoder experience with better metadata display and customizable layouts.

Key Changes:

  • Added new settings for Stream Deck+ including title format customization and custom layout file support
  • Enhanced error handling to distinguish between websocket errors and other connection issues
  • Modified thumbnail rendering to support larger display sizes (100x100 instead of 48x48)

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/ytmd-pi.ts Added new input element properties for title format, SD+ settings, and custom layout configuration
src/pis/play-pause.pi.ts Implemented controller type detection to conditionally display SD+ settings and added new setting fields
src/interfaces/context-settings.interface.ts Extended PlayPauseSettings interface with displayTitleFormat and customLayout properties
src/actions/play-pause.action.ts Refactored song data handling, added title formatting logic, improved error handling, and implemented custom layout support
property-inspector.html Added UI elements for SD+ settings including title format and custom layout configuration
package.json Updated streamdeck-typescript and ytmdesktop-ts-companion package versions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/actions/play-pause.action.ts Outdated
Comment thread property-inspector.html Outdated
Comment thread src/pis/play-pause.pi.ts Outdated
displayFormat: displayFormat ?? "{current}"
displayFormat: displayFormat ?? "{current}",
displayTitleFormat: displayTitleFormat ?? '{title}',
customLayout: customLayout ?? false

Copilot AI Nov 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The customLayout property is defined as a string in the interface (context-settings.interface.ts line 9), but the default value here is false (boolean). This should be an empty string ('') to match the type definition.

Suggested change
customLayout: customLayout ?? false
customLayout: customLayout ?? ''

Copilot uses AI. Check for mistakes.
Comment thread src/actions/play-pause.action.ts Outdated
@XeroxDev

XeroxDev commented Nov 4, 2025

Copy link
Copy Markdown
Owner

I let copilot review the code as well to test it out. You don't have to implement everything it says.

@XeroxDev

Copy link
Copy Markdown
Owner

@nosjo could you maybe rebase this pr / resolve merge conflicts (I changes some things regarding development and build process) and also remind me if you wanted to add / change some things as well.

(with the new workflow I can easier release builds from everywhere)

@nosjo

nosjo commented Dec 31, 2025

Copy link
Copy Markdown
Contributor Author

@XeroxDev of course i get it done sometime soon

@XeroxDev

XeroxDev commented Jan 4, 2026 •

Copy link
Copy Markdown
Owner

Short update: the rebase / merge conflict could be a bit more complex now, because I refactored a lot more recently. Especially PI stuff changed heavily. I'm sorry 😅

@nosjo

nosjo commented Jan 4, 2026

Copy link
Copy Markdown
Contributor Author

Not sure what else i wanted to add been to long and forgot but it should all work now with the new PI stuff.
And must say i like how its changed much easier to work with compared to before 😄

@nosjo

nosjo commented Jan 4, 2026

Copy link
Copy Markdown
Contributor Author

oh yeah also needs this XeroxDev/Stream-Deck-TS-SDK#41 merged almost forgot that would be bad without

@XeroxDev

XeroxDev commented Jan 5, 2026

Copy link
Copy Markdown
Owner

oh yeah also needs this XeroxDev/Stream-Deck-TS-SDK#41 merged almost forgot that would be bad without

The linked pull request seems empty? 😅

@XeroxDev

XeroxDev commented Jan 5, 2026 •

Copy link
Copy Markdown
Owner

I noticed in the package json you've updated the streamdeck lib version.

Currently latest version is 3.3.4.

So we should make sure we use the latest version, especially after the pr you mentioned in the comments.

(github bugs, so I can't put that comment to the correct line nor do it as a review ._.)

@nosjo

nosjo commented Jan 5, 2026

Copy link
Copy Markdown
Contributor Author

Yeah my mistake thought the code was not in the streamdeck lib but i was wrong and did not notice that it actually was there so changed the version to the current 3.3.4

@XeroxDev

XeroxDev commented Jan 5, 2026 •

Copy link
Copy Markdown
Owner

One last thing: I noticed a mismatch: package.json bumps streamdeck-typescript to ^3.3.4, but the lockfile still resolves it to 3.2.1 (or at least contains that resolution).
Could you regenerate the lockfile from scratch (rm -rf node_modules package-lock.json && npm install) so package-lock.json resolves streamdeck-typescript to >= 3.3.4? Then we’re good to release.

@nosjo

nosjo commented Jan 6, 2026

Copy link
Copy Markdown
Contributor Author

Just ran npm update and that updated it in the file, deleted the modules folder a bit earlier just to test that everything compiled fine so know that folder is clean.

@XeroxDev
XeroxDev merged commit 54b573d into XeroxDev:master Jan 6, 2026
1 check passed
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.

[FEATURE]: Streamdeck Plus Flashing red button

3 participants