-
-
Notifications
You must be signed in to change notification settings - Fork 13
Add support for custom name_format #191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add support for custom name_format #191
Conversation
WalkthroughAdds a new Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Init as init system
participant Run as run script
participant Conf as config file
participant AS as AirSonos server
Init->>Run: start service
Run->>Conf: read configuration (including name_format)
alt name_format present
Run->>Run: append -n "<name_format>" to options
end
Run->>AS: exec AirSonos with options (including -n if set)
AS-->>Run: startup complete
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
airsonos/DOCS.md (1)
40-47: Consider addingname_formatto the example configuration.The example configuration could be enhanced by including the new
name_formatoption to provide users with a complete reference. However, since the option has a sensible default and the note indicates this is just an example, this is optional.If you'd like to include it, apply this diff:
```yaml log_level: info address: 192.168.1.234 port: 49152 latency_rtp: 1000 latency_http: 2000 drift: true +name_format: "%s [AS]"</blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used**: CodeRabbit UI **Review profile**: CHILL **Plan**: Pro <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between be034efe939421d9d453779464caf7637c3e9279 and 8dd7595974cdc707b4d85d7d130e424422b8fa1a. </details> <details> <summary>📒 Files selected for processing (3)</summary> * `airsonos/DOCS.md` (1 hunks) * `airsonos/config.yaml` (1 hunks) * `airsonos/rootfs/etc/s6-overlay/s6-rc.d/airsonos/run` (1 hunks) </details> <details> <summary>🔇 Additional comments (2)</summary><blockquote> <details> <summary>airsonos/rootfs/etc/s6-overlay/s6-rc.d/airsonos/run (1)</summary><blockquote> `54-57`: **LGTM!** The implementation correctly checks for the presence of the `name_format` configuration value and passes it to the AirSonos server using the `-n` flag. The pattern matches the existing configuration handling in this script, and the value is properly quoted to handle special characters. </blockquote></details> <details> <summary>airsonos/DOCS.md (1)</summary><blockquote> `100-106`: **LGTM!** The documentation clearly explains the `name_format` option, including its purpose, default behavior, and placeholder usage. The example showing `%s [AS]` → `Main Bedroom [AS]` is particularly helpful for users. </blockquote></details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Proposed Changes
By default, the name of an AirSonos device is set to the name of the speaker with a
+appended to it. This change allows a user to set the default name format for newly discovered speakers by using the native-ncommand option. The reason for this is to allow more customization for how a device appears in your AirPlay list.Related Issues
N/A
Summary by CodeRabbit
New Features
Documentation