Skip to content

feat(patches): add an offline mode that keeps downloads available - #286

Merged
josselinonduty merged 3 commits into
aunetx:masterfrom
josselinonduty:feat/issue274-offline-downloads
Nov 23, 2026
Merged

josselinonduty merged 3 commits into
aunetx:masterfrom
josselinonduty:feat/issue274-offline-downloads

Conversation

@josselinonduty

Copy link
Copy Markdown
Collaborator

Fixes #274.

What

New patch 18-offline-downloads:

  • When the app starts without internet (DNS lookup of deezer.com fails), it opens /#/library/downloads instead of a page that cannot load, so downloaded songs stay available. An explicit path from the command line is left untouched.
  • The network check runs in parallel with the autolog request, and the autolog request is bounded to 10 s. Previously a link that is up but dead kept the window blank for about 58 s; it is now rendered in about 45 s.

Behaviour checked

Tested on the real app in a network namespace with a switchable link:

  • Starts offline, then goes online: the offline banner clears within seconds, no restart needed.
  • Starts online, then goes offline: no reload, the downloads library stays browsable, and playback of a downloaded track continues.
  • Link flapping every 0.3 s, 1 s and 3 s: the page does not reload, final state is correct, playback survives.

Known limitation

On a link that is up but carries no traffic (captive portal, Wi-Fi with no uplink), Chromium still reports online. The downloads page opens, but it lists nothing until the link drops or recovers. A proper fix needs the main process to force offline emulation, which is a larger change than this patch.

The 10 s autolog timeout also applies to slow online connections: they fall back to the cached login after 10 s instead of waiting.

Tests

patch-markers.txt has the marker for the new patch; tests/run.sh unit passes. The smoke test was not run.

When the app starts without internet, open the downloads library instead of a
page that cannot load, so downloaded songs stay available. Check the network in
parallel with the login and bound the login request to 10s, so a link that is up
but dead does not keep the window blank.

Closes aunetx#274
When the app starts without internet, open the downloads library instead of a
page that cannot load, so downloaded songs stay available. Check the network in
parallel with the login and bound the login request to 10s, so a link that is up
but dead does not keep the window blank.

Known limitation: on a link that is up but carries no traffic, Chromium still
reports online, so the downloads page opens but lists nothing.

Closes aunetx#274
Downloaded songs stay available whatever the network does. Without internet at
startup, open the downloads library instead of a page that cannot load. Once
running, network changes need no reload: going offline, coming back online and
rapid flapping keep the page and playback alive. Check the network in parallel
with the login and bound the login request to 10s, so a link that is up but
dead does not keep the window blank.

Known limitation: on a link that is up but carries no traffic, Chromium still
reports online, so the downloads page opens but lists nothing.
@josselinonduty josselinonduty changed the title feat(patches): open downloads when starting offline feat(patches): add an offline mode that keeps downloads available Nov 23, 2026
@josselinonduty
josselinonduty merged commit 134c4cf into aunetx:master Nov 23, 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.

[DISCUSSION] Somewhat of an offline mode?

1 participant