mirror of
https://github.com/narrrl/pl8list-rewind.git
synced 2026-11-18 17:25:03 +01:00
Add discovery modes, track tags and an artist graph
Tracks get tags from their title, description, artist name and BPM (styles such as riddim, versions such as VIP/dub/flip, and tempo), stored in track_tags and shown on cards. Related pages the crawler reads are kept in track_related, which links artists to each other. The feed takes ?mode=: riddim (140 BPM, riddim artists and their graph neighbours first), fresh, deep cuts, and an artist radio that plays an artist and the artists around them. Opening a radio crawls that artist's related pages first. The crawler searches riddim-adjacent terms first. The filters panel picks the feed, each card has a radio button (r), and a chip in the top bar returns to the normal feed.
This commit is contained in:
1 parent
b4470850bf
commit
f6c505907a
14 files changed
+737
-36
No files matched your search
@@ -10,6 +10,7 @@ export interface CardActions {
|
||||
share(card: Card): void;
|
||||
next(card: Card): void;
|
||||
follow(card: Card): void;
|
||||
radio(card: Card): void;
|
||||
/// Seeking only works on the playing card.
|
||||
canSeek(card: Card): boolean;
|
||||
duration(card: Card): number;
|
||||
@@ -88,6 +89,8 @@ export class Card {
|
||||
if (t.key) chip(t.key);
|
||||
chip(t.price ? `$${t.price}` : "free", t.price ? "" : "free");
|
||||
if (t.preview) chip("preview", "preview");
|
||||
// Tempo tags repeat the BPM chip.
|
||||
for (const tag of (t.tags ?? []).filter((g) => !/^\d+$/.test(g)).slice(0, 4)) chip(tag, "tag");
|
||||
|
||||
$(".counts").textContent =
|
||||
`${t.saves} saves · ${t.downloads} downloads · ${t.comments} comments` +
|
||||
@@ -98,6 +101,7 @@ export class Card {
|
||||
$(".share").addEventListener("click", () => this.actions.share(this));
|
||||
$(".next").addEventListener("click", () => this.actions.next(this));
|
||||
$(".follow").addEventListener("click", () => this.actions.follow(this));
|
||||
$(".radio").addEventListener("click", () => this.actions.radio(this));
|
||||
|
||||
this.el = el;
|
||||
this.canvas = $<HTMLCanvasElement>(".wave");
|
||||
|
||||
Reference in new issue
Block a user