···44/** @type {Record<string, string>} */
55const sources = {};
6677-for await (const entry of walk(srcDir + "components", { match: [/element\.js$/] })) {
77+for await (
88+ const entry of walk(srcDir + "components", { match: [/element\.js$/] })
99+) {
810 const content = await Deno.readTextFile(entry.path);
911 const key = entry.path.slice(srcDir.length);
1012 sources[key] = content;
···1416 sources,
15171618 artwork: [
1717- { url: "components/artwork/audio-metadata/element.js", title: "Audio Metadata", desc: "Extracts embedded artwork from audio files using the music-metadata library." },
1818- { url: "components/artwork/input/element.js", title: "Input", desc: "Fetches artwork by delegating to the configured input element's artwork method." },
1919- { url: "components/artwork/last.fm/element.js", title: "Last.fm", desc: "Fetches cover art from the Last.fm API using track artist and album tags." },
2020- { url: "components/artwork/musicbrainz/element.js", title: "MusicBrainz", desc: "Fetches cover art from MusicBrainz and the Cover Art Archive using track artist and album tags." },
1919+ {
2020+ url: "components/artwork/audio-metadata/element.js",
2121+ title: "Audio Metadata",
2222+ desc:
2323+ "Extracts embedded artwork from audio files using the music-metadata library.",
2424+ },
2525+ {
2626+ url: "components/artwork/input/element.js",
2727+ title: "Input",
2828+ desc:
2929+ "Fetches artwork by delegating to the configured input element's artwork method.",
3030+ },
3131+ {
3232+ url: "components/artwork/last.fm/element.js",
3333+ title: "Last.fm",
3434+ desc:
3535+ "Fetches cover art from the Last.fm API using track artist and album tags.",
3636+ },
3737+ {
3838+ url: "components/artwork/musicbrainz/element.js",
3939+ title: "MusicBrainz",
4040+ desc:
4141+ "Fetches cover art from MusicBrainz and the Cover Art Archive using track artist and album tags.",
4242+ },
2143 ],
22442345 configurators: [
2424- { url: "components/configurator/artwork/element.js", title: "Artwork", desc: "Takes artwork components as children and tries each in sequence, returning the first non-null result." },
2525- { url: "components/configurator/input/element.js", title: "Input", desc: "Allows for multiple inputs to be used at once." },
2626- { url: "components/configurator/metadata/element.js", title: "Metadata", desc: "Takes metadata components as children and chains their patches in sequence." },
2727- { url: "components/configurator/output/element.js", title: "Output", desc: "Enables the user to configure a specific output. If no default output is set, it creates a temporary session by storing everything in memory." },
2828- { url: "components/configurator/scrobbles/element.js", title: "Scrobbles", desc: "Configure multiple scrobblers (music trackers)." },
4646+ {
4747+ url: "components/configurator/artwork/element.js",
4848+ title: "Artwork",
4949+ desc:
5050+ "Takes artwork components as children and tries each in sequence, returning the first non-null result.",
5151+ },
5252+ {
5353+ url: "components/configurator/input/element.js",
5454+ title: "Input",
5555+ desc: "Allows for multiple inputs to be used at once.",
5656+ },
5757+ {
5858+ url: "components/configurator/metadata/element.js",
5959+ title: "Metadata",
6060+ desc:
6161+ "Takes metadata components as children and chains their patches in sequence.",
6262+ },
6363+ {
6464+ url: "components/configurator/output/element.js",
6565+ title: "Output",
6666+ desc:
6767+ "Enables the user to configure a specific output. If no default output is set, it creates a temporary session by storing everything in memory.",
6868+ },
6969+ {
7070+ url: "components/configurator/scrobbles/element.js",
7171+ title: "Scrobbles",
7272+ desc: "Configure multiple scrobblers (music trackers).",
7373+ },
2974 ],
30753176 engines: [
3232- { url: "components/engine/audio/element.js", title: "Audio", desc: "Plays audio through audio elements." },
3333- { url: "components/engine/queue/element.js", title: "Queue", desc: "A queue for tracks." },
3434- { url: "components/engine/repeat-shuffle/element.js", title: "Repeat & Shuffle", desc: "Signals synced with local storage (classified by group) that decide if audio should be repeated and if the queue should be shuffled when filling it." },
3535- { url: "components/engine/scope/element.js", title: "Scope", desc: "Signals that could influence the scope of a set of tracks." },
7777+ {
7878+ url: "components/engine/audio/element.js",
7979+ title: "Audio",
8080+ desc: "Plays audio through audio elements.",
8181+ },
8282+ {
8383+ url: "components/engine/queue/element.js",
8484+ title: "Queue",
8585+ desc: "A queue for tracks.",
8686+ },
8787+ {
8888+ url: "components/engine/repeat-shuffle/element.js",
8989+ title: "Repeat & Shuffle",
9090+ desc:
9191+ "Signals synced with local storage (classified by group) that decide if audio should be repeated and if the queue should be shuffled when filling it.",
9292+ },
9393+ {
9494+ url: "components/engine/scope/element.js",
9595+ title: "Scope",
9696+ desc: "Signals that could influence the scope of a set of tracks.",
9797+ },
3698 ],
379938100 input: [
3939- { url: "components/input/dropbox/element.js", title: "Dropbox", desc: "Audio files from Dropbox, using the Dropbox v2 HTTP API." },
4040- { url: "components/input/ephemeral-cache/element.js", title: "Ephemeral Cache", desc: "Wraps another input and caches its track listing in memory for the duration of the session." },
4141- { url: "components/input/https/element.js", title: "HTTPS", desc: "HTTPS URLs to audio files or streams." },
4242- { url: "components/input/icecast/element.js", title: "Icecast", desc: "Icecast internet radio streams. Fetches ICY metadata to populate track information." },
4343- { url: "components/input/local/element.js", title: "Local", desc: "Audio files or directories from your local device, using the browser's File System Access API." },
4444- { url: "components/input/opensubsonic/element.js", title: "Opensubsonic", desc: "Add any (open)subsonic server." },
4545- { url: "components/input/s3/element.js", title: "S3", desc: "AWS S3 and services that provide the same surface API such as Cloudflare R2." },
4646- { url: "components/input/webdav/element.js", title: "WebDAV", desc: "Add any WebDAV server." },
101101+ {
102102+ url: "components/input/dropbox/element.js",
103103+ title: "Dropbox",
104104+ desc: "Dropbox, using the Dropbox v2 HTTP API.",
105105+ },
106106+ {
107107+ url: "components/input/ephemeral-cache/element.js",
108108+ title: "Ephemeral Cache",
109109+ desc:
110110+ "Ephemeral blobs stored in indexedDB, resolving creates temporary Blob URLs. Not responsible for storing blobs.",
111111+ },
112112+ {
113113+ url: "components/input/https/element.js",
114114+ title: "HTTPS",
115115+ desc: "HTTPS URLs to audio files or streams.",
116116+ },
117117+ {
118118+ url: "components/input/icecast/element.js",
119119+ title: "Icecast",
120120+ desc:
121121+ "Icecast internet radio streams. Fetches ICY metadata to populate track information.",
122122+ },
123123+ {
124124+ url: "components/input/local/element.js",
125125+ title: "Local",
126126+ desc:
127127+ "Audio files or directories from your local device, using the browser's File System Access API.",
128128+ },
129129+ {
130130+ url: "components/input/opensubsonic/element.js",
131131+ title: "Opensubsonic",
132132+ desc: "(Open)subsonic audio servers.",
133133+ },
134134+ {
135135+ url: "components/input/s3/element.js",
136136+ title: "S3",
137137+ desc:
138138+ "AWS S3 and services that provide the same surface API such as Cloudflare R2.",
139139+ },
140140+ {
141141+ url: "components/input/webdav/element.js",
142142+ title: "WebDAV",
143143+ desc:
144144+ "WebDAV servers. Depends on a service worker handling the `diffuse:basic-auth` query parameter and converting it to a `Authorization` header.",
145145+ },
47146 ],
4814749148 metadata: [
5050- { url: "components/metadata/audio-file/element.js", title: "Audio File", desc: "Extracts tags and audio stats from audio files using the music-metadata library." },
149149+ {
150150+ url: "components/metadata/audio-file/element.js",
151151+ title: "Audio File",
152152+ desc:
153153+ "Extracts tags and audio stats from audio files using the music-metadata library.",
154154+ },
51155 ],
5215653157 orchestrators: [
5454- { url: "components/orchestrator/artwork/element.js", title: "Artwork", desc: "Fetches cover art for a given set of tracks, stored locally in indexedDB. Uses the artwork configurator to try each configured source in sequence." },
5555- { url: "components/orchestrator/auto-queue/element.js", title: "Automatic Queue", desc: "Fill the queue automatically with non-manual items (shuffled or regular, based on repeat-shuffle engine)." },
5656- { url: "components/orchestrator/controller/element.js", title: "Controller", desc: "Provides commonly used computed signals derived from the audio engine, queue engine, and output. Exposes currentTrack(), isPlaying(), and references to the underlying engines." },
5757- { url: "components/orchestrator/cover-groups/element.js", title: "Cover Groups", desc: "Groups tracks by cover art to form collections." },
5858- { url: "components/orchestrator/favourites/element.js", title: "Favourites", desc: "Mark tracks as favourites. Automatically creates an unordered 'Favourites' playlist." },
5959- { url: "components/orchestrator/media-session/element.js", title: "Media Session", desc: "Keeps the browser/os media session in sync with queue and audio state. Adds handlers for previous, next, seek to, etc." },
6060- { url: "components/orchestrator/output/element.js", title: "Output", desc: "A default output configuration. Contains all the outputs provided here along with the relevant transformers." },
6161- { url: "components/orchestrator/path-collections/element.js", title: "Path Collections", desc: "Wraps an output element to generate ephemeral playlists based on the first path segment of each track's URI. Ephemeral items are excluded from storage." },
6262- { url: "components/orchestrator/process-tracks/element.js", title: "Process Inputs Into Tracks", desc: "Whenever the cached tracks are initially loaded through the passed output element it will list tracks by using the passed input element. Afterwards it loops over all tracks and checks if metadata needs to be fetched. If anything has changed, it'll pass the results to the output element." },
6363- { url: "components/orchestrator/queue-audio/element.js", title: "Queue ⭤ Audio", desc: "Connects the given queue engine to the given audio engine." },
6464- { url: "components/orchestrator/scoped-tracks/element.js", title: "Scoped Tracks", desc: "Watches the given output's tracks collection and runs them through a built-in search index. Can perform a search and other ways to reduce the scope of tracks based on the given scope engine. Provides a tracks signal similar to output.tracks.collection." },
6565- { url: "components/orchestrator/scrobble-audio/element.js", title: "Scrobble ⭤ Audio", desc: "Connects the audio engine with a scrobbler element. Calls nowPlaying when a track starts playing and scrobble once the user has listened long enough." },
6666- { url: "components/orchestrator/sources/element.js", title: "Sources", desc: "Monitor tracks from the given output to form a list of sources based on the input's sources return value." },
158158+ {
159159+ url: "components/orchestrator/artwork/element.js",
160160+ title: "Artwork",
161161+ desc:
162162+ "Fetches cover art for a given set of tracks, stored locally in indexedDB. Uses the artwork configurator to try each configured source in sequence.",
163163+ },
164164+ {
165165+ url: "components/orchestrator/auto-queue/element.js",
166166+ title: "Automatic Queue",
167167+ desc:
168168+ "Fill the queue automatically with non-manual items (shuffled or regular, based on repeat-shuffle engine).",
169169+ },
170170+ {
171171+ url: "components/orchestrator/controller/element.js",
172172+ title: "Controller",
173173+ desc:
174174+ "Provides commonly used computed signals derived from the audio engine, queue engine, and output. Exposes currentTrack(), isPlaying(), and references to the underlying engines.",
175175+ },
176176+ {
177177+ url: "components/orchestrator/cover-groups/element.js",
178178+ title: "Cover Groups",
179179+ desc: "Groups tracks by cover art to form collections.",
180180+ },
181181+ {
182182+ url: "components/orchestrator/favourites/element.js",
183183+ title: "Favourites",
184184+ desc:
185185+ "Mark tracks as favourites. Automatically creates an unordered 'Favourites' playlist.",
186186+ },
187187+ {
188188+ url: "components/orchestrator/media-session/element.js",
189189+ title: "Media Session",
190190+ desc:
191191+ "Keeps the browser/os media session in sync with queue and audio state. Adds handlers for previous, next, seek to, etc.",
192192+ },
193193+ {
194194+ url: "components/orchestrator/output/element.js",
195195+ title: "Output",
196196+ desc:
197197+ "A default output configuration. Contains all the outputs provided here along with the relevant transformers.",
198198+ },
199199+ {
200200+ url: "components/orchestrator/path-collections/element.js",
201201+ title: "Path Collections",
202202+ desc:
203203+ "Wraps an output element to generate ephemeral playlists based on the first path segment of each track's URI. Ephemeral items are excluded from storage.",
204204+ },
205205+ {
206206+ url: "components/orchestrator/process-tracks/element.js",
207207+ title: "Process Inputs Into Tracks",
208208+ desc:
209209+ "Whenever the cached tracks are initially loaded through the passed output element it will list tracks by using the passed input element. Afterwards it loops over all tracks and checks if metadata needs to be fetched. If anything has changed, it'll pass the results to the output element.",
210210+ },
211211+ {
212212+ url: "components/orchestrator/queue-audio/element.js",
213213+ title: "Queue ⭤ Audio",
214214+ desc: "Connects the given queue engine to the given audio engine.",
215215+ },
216216+ {
217217+ url: "components/orchestrator/scoped-tracks/element.js",
218218+ title: "Scoped Tracks",
219219+ desc:
220220+ "Watches the given output's tracks collection and runs them through a built-in search index. Can perform a search and other ways to reduce the scope of tracks based on the given scope engine. Provides a tracks signal similar to output.tracks.collection.",
221221+ },
222222+ {
223223+ url: "components/orchestrator/scrobble-audio/element.js",
224224+ title: "Scrobble ⭤ Audio",
225225+ desc:
226226+ "Connects the audio engine with a scrobbler element. Calls nowPlaying when a track starts playing and scrobble once the user has listened long enough.",
227227+ },
228228+ {
229229+ url: "components/orchestrator/sources/element.js",
230230+ title: "Sources",
231231+ desc:
232232+ "Monitor tracks from the given output to form a list of sources based on the input's sources return value.",
233233+ },
67234 ],
6823569236 output: [
7070- { url: "components/output/polymorphic/indexed-db/element.js", title: "Polymorphic / IndexedDB", desc: "Stores output into the local indexedDB. Supports any type of data that indexedDB supports." },
7171- { url: "components/output/bytes/s3/element.js", title: "Bytes / S3", desc: "Store output data on AWS S3 or compatible services such as Cloudflare R2." },
7272- { url: "components/output/raw/atproto/element.js", title: "Raw / AT Protocol", desc: "Store your user data on the storage associated with your ATProtocol identity. Data is lexicon shaped by default so this element takes in that data directly without any transformations." },
237237+ {
238238+ url: "components/output/polymorphic/indexed-db/element.js",
239239+ title: "Polymorphic / IndexedDB",
240240+ desc:
241241+ "Stores output into the local indexedDB. Supports any type of data that indexedDB supports.",
242242+ },
243243+ {
244244+ url: "components/output/bytes/s3/element.js",
245245+ title: "Bytes / S3",
246246+ desc:
247247+ "Store output data on AWS S3 or compatible services such as Cloudflare R2.",
248248+ },
249249+ {
250250+ url: "components/output/raw/atproto/element.js",
251251+ title: "Raw / AT Protocol",
252252+ desc:
253253+ "Store your user data on the storage associated with your ATProtocol identity. Data is lexicon shaped by default so this element takes in that data directly without any transformations.",
254254+ },
73255 ],
7425675257 supplements: [
7676- { url: "components/supplement/last.fm/element.js", title: "Last.fm Scrobbler", desc: "Scrobbles track plays to Last.fm." },
7777- { url: "components/supplement/listenbrainz/element.js", title: "ListenBrainz Scrobbler", desc: "Scrobbles track plays to ListenBrainz.", todo: true },
7878- { url: "components/supplement/rocksky/element.js", title: "Rocksky Scrobbler", desc: "Scrobbles track plays to Rocksky.", todo: true },
258258+ {
259259+ url: "components/supplement/last.fm/element.js",
260260+ title: "Last.fm Scrobbler",
261261+ desc: "Scrobbles track plays to Last.fm.",
262262+ },
263263+ {
264264+ url: "components/supplement/listenbrainz/element.js",
265265+ title: "ListenBrainz Scrobbler",
266266+ desc: "Scrobbles track plays to ListenBrainz.",
267267+ todo: true,
268268+ },
269269+ {
270270+ url: "components/supplement/rocksky/element.js",
271271+ title: "Rocksky Scrobbler",
272272+ desc: "Scrobbles track plays to Rocksky.",
273273+ todo: true,
274274+ },
79275 ],
8027681277 transformers: [
8282- { url: "components/transformer/output/bytes/automerge/element.js", title: "Output / Bytes / Automerge", desc: "Translate data to and from an Automerge CRDT.", todo: true },
8383- { url: "components/transformer/output/bytes/dasl-sync/element.js", title: "Output / Bytes / DASL Sync", desc: "Syncs data between local and remote using CID-based diffing and performs union merges with tombstone tracking when both sides have diverged." },
8484- { url: "components/transformer/output/bytes/json/element.js", title: "Output / Bytes / JSON", desc: "Raw data schema output to and from JSON Uint8Array." },
8585- { url: "components/transformer/output/raw/atproto-sync/element.js", title: "Output / Raw / AT Protocol Sync", desc: "Wraps an AT Protocol output with a local IndexedDB cache. Uses the repo revision to skip unnecessary fetches and performs union merges with tombstone tracking when both local and remote have diverged." },
8686- { url: "components/transformer/output/refiner/default/element.js", title: "Output / Refiner / Default", desc: "Removes output state that is not meant to be saved to storage, such as ephemeral tracks. Ideally part of every theme." },
8787- { url: "components/transformer/output/refiner/initial-contents/element.js", title: "Output / Refiner / Initial Contents", desc: "Sets the initial contents for an output on first load." },
8888- { url: "components/transformer/output/refiner/passkey-encryption/element.js", title: "Output / Refiner / Track URI Passkey", desc: "Encrypts track URIs using a passkey-derived PRF key. On read, decrypts encrypted:// URIs transparently; on write, re-encrypts all URIs before passing downstream." },
8989- { url: "components/transformer/output/string/json/element.js", title: "Output / String / JSON", desc: "Raw data schema output to and from JSON UTF8 string." },
278278+ {
279279+ url: "components/transformer/output/bytes/automerge/element.js",
280280+ title: "Output / Bytes / Automerge",
281281+ desc: "Translate data to and from an Automerge CRDT.",
282282+ todo: true,
283283+ },
284284+ {
285285+ url: "components/transformer/output/bytes/dasl-sync/element.js",
286286+ title: "Output / Bytes / DASL Sync",
287287+ desc:
288288+ "Syncs data between local and remote using CID-based diffing and performs union merges with tombstone tracking when both sides have diverged.",
289289+ },
290290+ {
291291+ url: "components/transformer/output/bytes/json/element.js",
292292+ title: "Output / Bytes / JSON",
293293+ desc: "Raw data schema output to and from JSON Uint8Array.",
294294+ },
295295+ {
296296+ url: "components/transformer/output/raw/atproto-sync/element.js",
297297+ title: "Output / Raw / AT Protocol Sync",
298298+ desc:
299299+ "Wraps an AT Protocol output with a local IndexedDB cache. Uses the repo revision to skip unnecessary fetches and performs union merges with tombstone tracking when both local and remote have diverged.",
300300+ },
301301+ {
302302+ url: "components/transformer/output/refiner/default/element.js",
303303+ title: "Output / Refiner / Default",
304304+ desc:
305305+ "Removes output state that is not meant to be saved to storage, such as ephemeral tracks. Ideally part of every theme.",
306306+ },
307307+ {
308308+ url: "components/transformer/output/refiner/initial-contents/element.js",
309309+ title: "Output / Refiner / Initial Contents",
310310+ desc: "Sets the initial contents for an output on first load.",
311311+ },
312312+ {
313313+ url:
314314+ "components/transformer/output/refiner/passkey-encryption/element.js",
315315+ title: "Output / Refiner / Track URI Passkey",
316316+ desc:
317317+ "Encrypts track URIs using a passkey-derived PRF key. On read, decrypts encrypted:// URIs transparently; on write, re-encrypts all URIs before passing downstream.",
318318+ },
319319+ {
320320+ url: "components/transformer/output/string/json/element.js",
321321+ title: "Output / String / JSON",
322322+ desc: "Raw data schema output to and from JSON UTF8 string.",
323323+ },
90324 ],
9132592326 definitions: [
9393- { url: "definitions/output/collaboration.json", title: "Output / Collaboration", desc: "Represents a collaboration between multiple collaborators on a subject, such as a playlist." },
9494- { url: "definitions/output/facet.json", title: "Output / Facet", desc: "Facet pointer or HTML snippet." },
9595- { url: "definitions/output/playlistItem.json", title: "Output / Playlist Item", desc: "Represents a single item in a playlist. Tracks are matched based on the given criteria. A playlist is formed by grouping items by their playlist property." },
9696- { title: "Output / Progress", desc: "Used to track progress of (long) audio playback.", todo: true },
9797- { url: "definitions/output/track.json", title: "Output / Track", desc: "Represents audio that can be played, or a placeholder for a source of tracks. Contains a URI that will resolve to the audio." },
9898- { url: "definitions/output/trackBundle.json", title: "Output / Track Bundle", desc: "A bundle of tracks." },
327327+ {
328328+ url: "definitions/output/collaboration.json",
329329+ title: "Output / Collaboration",
330330+ desc:
331331+ "Represents a collaboration between multiple collaborators on a subject, such as a playlist.",
332332+ },
333333+ {
334334+ url: "definitions/output/facet.json",
335335+ title: "Output / Facet",
336336+ desc: "Facet pointer or HTML snippet.",
337337+ },
338338+ {
339339+ url: "definitions/output/playlistItem.json",
340340+ title: "Output / Playlist Item",
341341+ desc:
342342+ "Represents a single item in a playlist. Tracks are matched based on the given criteria. A playlist is formed by grouping items by their playlist property.",
343343+ },
344344+ {
345345+ title: "Output / Progress",
346346+ desc: "Used to track progress of (long) audio playback.",
347347+ todo: true,
348348+ },
349349+ {
350350+ url: "definitions/output/track.json",
351351+ title: "Output / Track",
352352+ desc:
353353+ "Represents audio that can be played, or a placeholder for a source of tracks. Contains a URI that will resolve to the audio.",
354354+ },
355355+ {
356356+ url: "definitions/output/trackBundle.json",
357357+ title: "Output / Track Bundle",
358358+ desc: "A bundle of tracks.",
359359+ },
99360 ],
100361};
+3-3
src/_data/facets.json
···5757 },
5858 {
5959 "url": "facets/connect/atproto/index.html",
6060- "title": "Connect / AT Protocol",
6060+ "title": "Connect / Atmosphere",
6161 "category": "Data",
6262 "desc": "Use your AT Protocol identity for user-data storage."
6363 },
···8989 "url": "facets/connect/opensubsonic/index.html",
9090 "title": "Connect / OpenSubsonic",
9191 "category": "Data",
9292- "desc": "Connect to an OpenSubsonic server for audio input."
9292+ "desc": "Add an OpenSubsonic server as an audio source."
9393 },
9494 {
9595 "url": "facets/connect/s3/index.html",
···101101 "url": "facets/connect/webdav/index.html",
102102 "title": "Connect / WebDAV",
103103 "category": "Data",
104104- "desc": "Connect to a WebDAV server for audio input."
104104+ "desc": "Add a WebDAV server as an audio source."
105105 },
106106 {
107107 "url": "facets/data/artwork-bundle/index.html",
+6-7
src/components/configurator/input/worker.js
···22import * as URI from "fast-uri";
33import * as Cid from "~/common/cid.js";
4455+import {
66+ CACHE_KEY_PREFIX,
77+ SCHEME as CACHE_SCHEME,
88+} from "~/components/input/ephemeral-cache/constants.js";
99+510import { groupTracksPerScheme, groupUrisPerScheme } from "~/common/utils.js";
611import { ostiary, rpc, workerProxy } from "~/common/worker.js";
712···1116 * @import {ActionsWithTunnel, ProxiedActions} from "~/common/worker.d.ts"
1217 * @import {Actions} from "./types.d.ts"
1318 */
1414-1515-////////////////////////////////////////////
1616-// LOCAL CACHE
1717-////////////////////////////////////////////
1818-1919-const CACHE_KEY_PREFIX = "diffuse/components/configurator/input/cache/";
20192120////////////////////////////////////////////
2221// INPUT ACTIONS
···209208 const buffer = await blob.arrayBuffer();
210209 const bytes = new Uint8Array(buffer);
211210 const cid = await Cid.create(0x55, bytes);
212212- const uri = `ephemeral+cache://${cid}`;
211211+ const uri = `${CACHE_SCHEME}://${cid}`;
213212 if (await IDB.get(CACHE_KEY_PREFIX + uri) === undefined) {
214213 await IDB.set(CACHE_KEY_PREFIX + uri, blob);
215214 }