Teal.fm frontend powered by slices.network tealfm-slices.wisp.place
tealfm slices

only take recent plays from the subscription

Changed files
+12
src
+12
src/App.tsx
···
const newPlay = store.getRootField("fmTealAlphaFeedPlayCreated");
if (!newPlay) return;
+
// Only add plays from the last 24 hours
+
const playedTime = newPlay.getValue("playedTime") as string | null;
+
if (!playedTime) return;
+
+
const playDate = new Date(playedTime);
+
const cutoff = new Date(Date.now() - 24 * 60 * 60 * 1000);
+
+
if (playDate < cutoff) {
+
// Play is too old, don't add it to the feed
+
return;
+
}
+
const root = store.getRoot();
const connection = ConnectionHandler.getConnection(
root,