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

web/settings/audio: disable bitrate section when not applicable #802

Merged
merged 7 commits into from
Oct 5, 2024

Conversation

halozat
Copy link
Contributor

@halozat halozat commented Oct 4, 2024

please delete my closed pr thanks :3

if the audio format is either best or wav,
the bitrate selector should be greyed out,
cause it's lossless, or not necessarily re-encoded.
format: best (not re-encoded)
format: wav (lossless)
format mp3 (lossy)

web/i18n/en/settings.json Show resolved Hide resolved
@@ -7,6 +7,7 @@
import Switcher from "$components/buttons/Switcher.svelte";
import SettingsButton from "$components/buttons/SettingsButton.svelte";
import SettingsToggle from "$components/buttons/SettingsToggle.svelte";
import settings from "$lib/state/settings";
Copy link
Member

Choose a reason for hiding this comment

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

this import should be on very top, before translations

@@ -23,7 +24,7 @@
</Switcher>
</SettingsCategory>

<SettingsCategory sectionId="bitrate" title={$t("settings.audio.bitrate")}>
<SettingsCategory sectionId="bitrate" title={$t("settings.audio.bitrate")} disabled={["wav", "best"].includes($settings.save.audioFormat)}>
Copy link
Member

@wukko wukko Oct 4, 2024

Choose a reason for hiding this comment

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

please expand this line into something like this, it's way too long

<SettingsCategory
    sectionId="bitrate"
    title={$t("settings.audio.bitrate")}
    disabled={["wav", "best"].includes($settings.save.audioFormat)}
>

@halozat halozat requested a review from wukko October 4, 2024 12:35
@@ -50,7 +50,7 @@

"audio.bitrate": "audio bitrate",
"audio.bitrate.kbps": "kb/s",
"audio.bitrate.description": "bitrate applies only to audio conversion. cobalt can't improve the source audio quality, so choosing a bitrate over 128kbps may inflate the file size with no audible difference. perceived quality may vary by format.",
"audio.bitrate.description": "bitrate only applies to audio conversion into lossy audio formats. cobalt can't improve the source audio quality, so choosing a bitrate over 128kbps may inflate the file size with no audible difference. perceived quality may vary by format.",
Copy link
Member

@wukko wukko Oct 4, 2024

Choose a reason for hiding this comment

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

"bitrate is applied only when converting audio to a lossy format."

@halozat halozat requested a review from wukko October 4, 2024 13:55
web/i18n/en/settings.json Outdated Show resolved Hide resolved
@halozat halozat requested a review from wukko October 4, 2024 14:21
web/i18n/en/settings.json Outdated Show resolved Hide resolved
@halozat halozat requested a review from wukko October 5, 2024 15:38
@wukko wukko changed the base branch from main to develop October 5, 2024 15:39
@wukko wukko changed the title web/settings/audio: show bitrate selection as disabled when not applicable web/settings/audio: disable bitrate section when not applicable Oct 5, 2024
@wukko wukko merged commit 4156206 into imputnet:develop Oct 5, 2024
26 checks 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.

2 participants