Skip to content

Add opt-in "Play on startup" setting#75

Merged
TheJoeFin merged 4 commits into
devfrom
copilot/fix-auto-start-on-restart
Apr 1, 2026
Merged

Add opt-in "Play on startup" setting#75
TheJoeFin merged 4 commits into
devfrom
copilot/fix-auto-start-on-restart

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 1, 2026

The app restores the previously selected station on launch but never begins playback automatically. Users expecting audio to start immediately after the app opens (especially when launched at Windows startup) had no way to enable this behavior.

Changes

  • SettingsService — new AutoPlayOnStartup bool persisted in LocalSettings, defaults to false to prevent unexpected autoplay
  • PlayerViewModel constructor — calls _player.Play() immediately after stream initialization when AutoPlayOnStartup is set
  • SettingsViewModel — exposes IsAutoPlayOnStartupEnabled and AutoPlayOnStartupToggleText for two-way UI binding
  • SettingsPage.xaml — adds a "Play on startup" ToggleSwitch below the existing "Open on startup" toggle with a descriptive subtitle
// PlayerViewModel constructor — after InitializeStream()
if (SettingsService.AutoPlayOnStartup)
    _player.Play();

Setting is opt-in to avoid the confusing/annoying experience of music starting unexpectedly on every login.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • ndavsblobprodwus219.blob.core.windows.net
    • Triggering command: /usr/bin/dotnet dotnet restore --no-dependencies /tmp/codeql-scratch-09a801a7dd23cb56/dbs/csharp/working/7308510B18BD5F018EBF4978576AFCBB/missingpackages_workingdir --packages /tmp/codeql-scratch-09a801a7dd23cb56/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /tmp/codeql-scratch-09a801a7dd23cb56/dbs/csharp/working/nugetconfig/nuget.config --force (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue Apr 1, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix auto-start issue for version 1.80 Add opt-in "Play on startup" setting Apr 1, 2026
Copilot AI requested a review from TheJoeFin April 1, 2026 00:41
Show a warning InfoBar when enabling "Auto-play on startup" to inform users that audio will start automatically. Require explicit confirmation via an "Enable anyway" button. Refactor toggle logic to use event handler and OneWay binding. Rename "Enable Auto-Resume" to "Auto-recover" with updated description. Use shared PlayerViewModel instance in SettingsViewModel.
Adjusted clamping logic to use maxX and maxY with System.Math.Max, preventing negative clamp ranges when window size exceeds work area. This ensures window positions remain within valid screen bounds.
@TheJoeFin TheJoeFin marked this pull request as ready for review April 1, 2026 05:24
@TheJoeFin TheJoeFin merged commit d947346 into dev Apr 1, 2026
1 check passed
@TheJoeFin TheJoeFin deleted the copilot/fix-auto-start-on-restart branch April 1, 2026 05:26
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.

1.80 still not auto starting on restart

2 participants