Skip to content
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

Add enable_volume_normalisation option #261

Conversation

DarkMatterMatt
Copy link

@DarkMatterMatt DarkMatterMatt commented Apr 6, 2024

This PR adds support for enabling volume normalisation. It's completely opt-in and does not change any existing behaviour

Currently volume normalisation is disabled and cannot be enabled. Some songs play at significantly different volumes and normalisation makes these tracks approximately the same volume (at the cost of a minor decrease in audio quality)

See the librespot documentation for more information on how enable-volume-normalisation works


To test this option:

  1. With volume normalisation disabled, play It's Time by Gavin Mikhail and then I See Fire by Ed Sheeran
  2. Hear that one is much louder than the other
  3. Enable volume normalisation
  4. Save changes & restart the addon
    a. If the log level is debug, see that enable-volume-normalisation is present in the Command line argument(s) section
  5. Play the songs again, hear that they are closer to the same volume

Summary by CodeRabbit

  • New Features
    • Introduced a new configuration option enable_volume_normalisation for Spotify, allowing users to normalize volume levels.
  • Documentation
    • Updated documentation to include details about the new enable_volume_normalisation option.

Copy link

github-actions bot commented May 7, 2024

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label May 7, 2024
@DarkMatterMatt
Copy link
Author

.

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label May 8, 2024
Copy link

github-actions bot commented Jun 7, 2024

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Jun 7, 2024
@DarkMatterMatt
Copy link
Author

.

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Jun 11, 2024
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Jul 12, 2024
Copy link

coderabbitai bot commented Jul 12, 2024

Walkthrough

The recent updates introduce a new configuration option, enable_volume_normalisation, to the Spotify add-on for HomeAssistant. This feature allows users to normalize the volume across different tracks, enhancing the listening experience. The changes span the documentation, configuration files, service scripts, and translations to support this new option.

Changes

File/Group Change Summary
spotify/DOCS.md Added a new option enable_volume_normalisation to the HomeAssistant configuration.
spotify/config.yaml, spotify/translations/en.yaml Introduced enable_volume_normalisation configuration option in YAML and translations.
spotify/rootfs/etc/services.d/spotifyd/run Added functionality for volume normalization in the Spotify service script.

Poem

In the land of rhythm and sound,
A new feature has been found. 🌟
Volume levels, now aligned,
For a smoother music bind. 🎶
HomeAssistant, with grace,
Ensures all tracks embrace. 🎵
Enjoy the harmony, without a trace! 😌


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a1f0d43 and 3e012bb.

Files selected for processing (4)
  • spotify/DOCS.md (3 hunks)
  • spotify/config.yaml (1 hunks)
  • spotify/rootfs/etc/services.d/spotifyd/run (1 hunks)
  • spotify/translations/en.yaml (1 hunks)
Files skipped from review due to trivial changes (3)
  • spotify/config.yaml
  • spotify/rootfs/etc/services.d/spotifyd/run
  • spotify/translations/en.yaml
Additional context used
LanguageTool
spotify/DOCS.md

[uncategorized] ~94-~94: Possible missing comma found.
Context: ...o enable volume normalisation. For more info see the [librespot documentation][libre...

(AI_HYDRA_LEO_MISSING_COMMA)

Additional comments not posted (1)
spotify/DOCS.md (1)

40-40: LGTM! Example configuration updated correctly.

The new option enable_volume_normalisation is correctly added to the example configuration.

@@ -88,6 +89,10 @@ to disallow guests on your network to use the add-on.

The password you use to login to your Spotify Premium account.

### Option: `enable_volume_normalisation`

Whether to enable volume normalisation. For more info see the [librespot documentation][librespot-volume-normalisation].
Copy link

Choose a reason for hiding this comment

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

Add missing comma for better readability.

There is a missing comma after "For more info".

- Whether to enable volume normalisation. For more info see the [librespot documentation][librespot-volume-normalisation].
+ Whether to enable volume normalisation. For more info, see the [librespot documentation][librespot-volume-normalisation].
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Whether to enable volume normalisation. For more info see the [librespot documentation][librespot-volume-normalisation].
Whether to enable volume normalisation. For more info, see the [librespot documentation][librespot-volume-normalisation].
Tools
LanguageTool

[uncategorized] ~94-~94: Possible missing comma found.
Context: ...o enable volume normalisation. For more info see the [librespot documentation][libre...

(AI_HYDRA_LEO_MISSING_COMMA)

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Jul 13, 2024
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Aug 12, 2024
@github-actions github-actions bot closed this Aug 20, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale There has not been activity on this issue or PR for quite some time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant