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.

fix: use timestamps compatible with atproto

+6 -17
+1 -3
src/common/facets/utils.js
··· 1 1 // import { fragments, serializeFragments } from "@fcrozatier/htmlcrunch"; 2 2 3 - import { Temporal } from "@js-temporal/polyfill"; 4 - 5 3 import { loadURI } from "../loader.js"; 6 4 import * as CID from "../cid.js"; 7 5 ··· 18 16 const cid = html 19 17 ? await CID.create(0x55, new TextEncoder().encode(html)) 20 18 : undefined; 21 - const timestamp = Temporal.Now.zonedDateTimeISO().toString(); 19 + const timestamp = new Date().toISOString(); 22 20 23 21 /** @type {Facet} */ 24 22 const facet = {
+1 -2
src/common/themes/utils.js
··· 1 - import { Temporal } from "@js-temporal/polyfill"; 2 1 import * as CID from "../cid.js"; 3 2 4 3 /** ··· 16 15 const cid = html 17 16 ? await CID.create(0x55, new TextEncoder().encode(html)) 18 17 : undefined; 19 - const timestamp = Temporal.Now.zonedDateTimeISO().toString(); 18 + const timestamp = new Date().toISOString(); 20 19 21 20 /** @type {Theme} */ 22 21 const theme = {
+1 -2
src/components/orchestrator/favourites/worker.js
··· 1 - import { Temporal } from "@js-temporal/polyfill"; 2 1 import { ostiary, rpc } from "@common/worker.js"; 3 2 import { filterFavourites } from "./common.js"; 4 3 ··· 40 39 */ 41 40 function createFavouriteItem(track) { 42 41 const transformations = ["toLowerCase"]; 43 - const now = Temporal.Now.zonedDateTimeISO().toString(); 42 + const now = new Date().toISOString(); 44 43 45 44 return /** @type {PlaylistItem} */ ({ 46 45 $type: "sh.diffuse.output.playlistItem",
+1 -4
src/facets/index.js
··· 1 - import { Temporal } from "@js-temporal/polyfill"; 2 1 import { html, render } from "lit-html"; 3 2 import { keyed } from "lit-html/directives/keyed.js"; 4 3 import { marked } from "marked"; ··· 336 335 async function saveFacet(facet) { 337 336 const col = output.facets.collection(); 338 337 const colWithoutId = col.filter((c) => c.id !== facet.id); 339 - const timestamp = Temporal.Now.zonedDateTimeISO().toString(); 340 - 341 338 await output.facets.save([...colWithoutId, { 342 339 ...facet, 343 - updatedAt: timestamp, 340 + updatedAt: new Date().toISOString(), 344 341 }]); 345 342 }
+1 -2
src/facets/tools/v3-import.html.txt
··· 79 79 </style> 80 80 81 81 <script type="module"> 82 - import { Temporal } from "@js-temporal/polyfill"; 83 82 import foundation from "./common/facets/foundation.js"; 84 83 85 84 // Setup ··· 163 162 if (!items || items.length === 0) return; 164 163 165 164 try { 166 - const now = Temporal.Now.zonedDateTimeISO().toString(); 165 + const now = new Date().toISOString(); 167 166 const existing = output.playlistItems.collection() ?? []; 168 167 const existingPlaylistNames = new Set(existing.map((p) => p.playlist)); 169 168
+1 -4
src/themes/index.js
··· 1 - import { Temporal } from "@js-temporal/polyfill"; 2 1 import { html, render } from "lit-html"; 3 2 import { keyed } from "lit-html/directives/keyed.js"; 4 3 ··· 279 278 async function saveTheme(theme) { 280 279 const col = output.themes.collection(); 281 280 const colWithoutId = col.filter((c) => c.id !== theme.id); 282 - const timestamp = Temporal.Now.zonedDateTimeISO().toString(); 283 - 284 281 await output.themes.save([...colWithoutId, { 285 282 ...theme, 286 - updatedAt: timestamp, 283 + updatedAt: new Date().toISOString(), 287 284 }]); 288 285 }