android: downloads on Wi-Fi only

One switch the desktop never needed, off by default: on mobile data every
Save the phone can start — a record, a track, a folder, a file, a
playlist's bulk, the now-playing Save — waits, with the reason on the bar;
streaming is never held back. The walk flips the switch, makes the
connection cellular and sees a download refused.
This commit is contained in:
KeelrLeek committed 2026-09-13 22:15:07 -05:00
1 parent 3c8989dfa6
commit 694a29eb0d
10 files changed
+55 -5

No files matched your search

+3
View File
@@ -20,6 +20,7 @@ import { player, hooks, playEntries, playAlbum } from "./player.svelte.js";
import { lib, tracksOf } from "./lib.svelte.js";
import { slsk } from "./slsk.svelte.js";
import { yearOf } from "./catalog.svelte.js";
import { downloadsAllowed } from "./network.svelte.js";
export const resolver = $state({ active: false, label: "", error: "" });
@@ -189,6 +190,7 @@ export async function streamCatalogAlbum(album, at = 0) {
* art and logs beside the finished album and says soulseek:library-changed.
* Returns { username, files } or false. */
export async function saveCatalogAlbum(album) {
if (!downloadsAllowed()) return false;
if (resolver.active) return false;
if (!online()) { resolver.error = OFFLINE; player.error = OFFLINE; return false; }
const catalogTracks = album.id
@@ -218,6 +220,7 @@ export async function saveCatalogAlbum(album) {
/** One song into the library, by the download rules. */
export async function saveSong(artist, title) {
if (resolver.active) return false;
if (!downloadsAllowed()) return false;
if (!online()) { resolver.error = OFFLINE; player.error = OFFLINE; return false; }
const { responses, artistIncluded } = await resolveSources(
`${artist} — ${title}`,