A music player that connects to your cloud/distributed storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: replace uuids with tids

+47 -15
+16
_config.ts
··· 60 60 }, 61 61 }, 62 62 { 63 + name: "atcute-tid-browser", 64 + setup(build) { 65 + build.onLoad( 66 + { filter: /@atcute\+tid.*random-node\.js$/ }, 67 + async (args) => { 68 + const browserPath = args.path.replace( 69 + "random-node.js", 70 + "random-web.js", 71 + ); 72 + const contents = await Deno.readTextFile(browserPath); 73 + return { contents, loader: "js" }; 74 + }, 75 + ); 76 + }, 77 + }, 78 + { 63 79 name: "atcute-multibase-browser", 64 80 setup(build) { 65 81 build.onLoad(
+1
deno.jsonc
··· 5 5 "imports": { 6 6 "98.css": "npm:98.css@^0.1.21", 7 7 "@atcute/cbor": "npm:@atcute/cbor@^2.3.0", 8 + "@atcute/tid": "npm:@atcute/tid@^1.0.0", 8 9 "@atcute/client": "npm:@atcute/client@^4.2.1", 9 10 "@atcute/identity-resolver": "npm:@atcute/identity-resolver@^1.2.2", 10 11 "@atcute/lexicons": "npm:@atcute/lexicons@^1.2.7",
-1
src/common/element.js
··· 28 28 constructor() { 29 29 super(); 30 30 31 - this.uuid = crypto.randomUUID(); 32 31 this.worker = this.worker.bind(this); 33 32 this.workerLink = this.workerLink.bind(this); 34 33 }
+3 -1
src/common/facets/utils.js
··· 1 1 // import { fragments, serializeFragments } from "@fcrozatier/htmlcrunch"; 2 2 3 + import * as TID from "@atcute/tid"; 4 + 3 5 import { loadURI } from "../loader.js"; 4 6 import * as CID from "../cid.js"; 5 7 ··· 22 24 const facet = { 23 25 $type: "sh.diffuse.output.facet", 24 26 createdAt: timestamp, 25 - id: crypto.randomUUID(), 27 + id: TID.now(), 26 28 cid, 27 29 html, 28 30 name,
+3 -2
src/common/loader.js
··· 1 1 import * as URI from "fast-uri"; 2 + import * as TID from "@atcute/tid"; 2 3 import { Client, ok, simpleFetchHandler } from "@atcute/client"; 3 4 import { 4 5 CompositeDidDocumentResolver, ··· 61 62 if (path) { 62 63 item = { 63 64 $type: config.$type, 64 - id: crypto.randomUUID(), 65 + id: TID.now(), 65 66 name: "temporary", 66 67 uri: `diffuse://${path}`, 67 68 }; ··· 70 71 } else if (uri) { 71 72 item = { 72 73 $type: config.$type, 73 - id: crypto.randomUUID(), 74 + id: TID.now(), 74 75 name: "temporary", 75 76 uri, 76 77 };
+3 -1
src/common/themes/utils.js
··· 1 + import * as TID from "@atcute/tid"; 2 + 1 3 import { loadURI } from "../loader.js"; 2 4 import * as CID from "../cid.js"; 3 5 ··· 20 22 const theme = { 21 23 $type: "sh.diffuse.output.theme", 22 24 createdAt: timestamp, 23 - id: crypto.randomUUID(), 25 + id: TID.now(), 24 26 cid, 25 27 html, 26 28 name,
+3 -2
src/components/input/opensubsonic/worker.js
··· 1 1 import * as URI from "fast-uri"; 2 + import * as TID from "@atcute/tid"; 2 3 import { ostiary, rpc } from "@common/worker.js"; 3 4 4 5 import { SCHEME } from "./constants.js"; ··· 154 155 /** @type {Track} */ 155 156 const track = { 156 157 $type: "sh.diffuse.output.track", 157 - id: crypto.randomUUID(), 158 + id: TID.now(), 158 159 kind: autoTypeToTrackKind(song.type), 159 160 uri: buildURI(server, { songId: song.id, path }), 160 161 ··· 239 240 if (!tracks.length) { 240 241 tracks = [{ 241 242 $type: "sh.diffuse.output.track", 242 - id: crypto.randomUUID(), 243 + id: TID.now(), 243 244 kind: "placeholder", 244 245 uri: buildURI(server), 245 246 }];
+4 -3
src/components/input/s3/worker.js
··· 1 + import * as TID from "@atcute/tid"; 1 2 import { ostiary, rpc } from "@common/worker.js"; 2 3 import { 3 4 detach as detachUtil, ··· 130 131 .map((l) => { 131 132 const cachedTrack = cache[bid]?.[l.key]; 132 133 133 - const id = cachedTrack?.id || crypto.randomUUID(); 134 + const id = cachedTrack?.id || TID.now(); 134 135 const stats = cachedTrack?.stats; 135 136 const tags = cachedTrack?.tags; 136 137 ··· 152 153 if (!tracks.length) { 153 154 tracks = [{ 154 155 $type: "sh.diffuse.output.track", 155 - id: crypto.randomUUID(), 156 + id: TID.now(), 156 157 kind: "placeholder", 157 158 uri: buildURI(bucket), 158 159 }]; ··· 211 212 /** @type {Track} */ 212 213 const track = { 213 214 $type: "sh.diffuse.output.track", 214 - id: crypto.randomUUID(), 215 + id: TID.now(), 215 216 kind: "placeholder", 216 217 uri, 217 218 };
+3 -1
src/components/orchestrator/favourites/worker.js
··· 1 + import * as TID from "@atcute/tid"; 2 + 1 3 import { ostiary, rpc } from "@common/worker.js"; 2 4 import { filterFavourites } from "./common.js"; 3 5 ··· 43 45 44 46 return /** @type {PlaylistItem} */ ({ 45 47 $type: "sh.diffuse.output.playlistItem", 46 - id: crypto.randomUUID(), 48 + id: TID.now(), 47 49 playlist: "Favourites", 48 50 criteria: [ 49 51 {
+3 -1
src/facets/index.js
··· 9 9 import { javascript as langJs } from "@codemirror/lang-javascript"; 10 10 import { autocompletion } from "@codemirror/autocomplete"; 11 11 12 + import * as TID from "@atcute/tid"; 13 + 12 14 import * as CID from "@common/cid.js"; 13 15 import foundation from "@common/facets/foundation.js"; 14 16 import { effect, signal } from "@common/signal.js"; ··· 273 275 } 274 276 : { 275 277 $type: "sh.diffuse.output.facet", 276 - id: crypto.randomUUID(), 278 + id: TID.now(), 277 279 cid, 278 280 description, 279 281 html,
+2 -1
src/facets/tools/v3-import.html.txt
··· 79 79 </style> 80 80 81 81 <script type="module"> 82 + import * as TID from "@atcute/tid"; 82 83 import foundation from "./common/facets/foundation.js"; 83 84 84 85 // Setup ··· 174 175 175 176 return (item.tracks ?? []).map((track, index) => ({ 176 177 $type: "sh.diffuse.output.playlistItem", 177 - id: crypto.randomUUID(), 178 + id: TID.now(), 178 179 playlist: playlistName, 179 180 position: isUnordered ? undefined : index, 180 181 criteria: [
+3 -1
src/themes/index.js
··· 7 7 import { javascript as langJs } from "@codemirror/lang-javascript"; 8 8 import { autocompletion } from "@codemirror/autocomplete"; 9 9 10 + import * as TID from "@atcute/tid"; 11 + 10 12 import * as CID from "@common/cid.js"; 11 13 import foundation from "@common/facets/foundation.js"; 12 14 import { effect, signal } from "@common/signal.js"; ··· 228 230 } 229 231 : { 230 232 $type: "sh.diffuse.output.theme", 231 - id: crypto.randomUUID(), 233 + id: TID.now(), 232 234 cid, 233 235 html, 234 236 name,
+3 -1
src/themes/webamp/configurators/input/element.js
··· 1 + import * as TID from "@atcute/tid"; 2 + 1 3 import { 2 4 DiffuseElement, 3 5 nothing, ··· 241 243 /** @type {Track} */ 242 244 const track = { 243 245 $type: "sh.diffuse.output.track", 244 - id: crypto.randomUUID(), 246 + id: TID.now(), 245 247 kind: "placeholder", 246 248 uri, 247 249 };