Feature Community Videos - bh679/dungeon-train-mc GitHub Wiki

Community Videos page β€” every Dungeon Train video, from the main menu

Since: v0.842.0 β€” PR #1362 (relay: dp-relay #566)

A play-button icon in the title screen's icon column (between Credits and Discord) β€” with a pulsing green dot on its corner whenever a streamer is live with the game right now (v0.878.0; the pause-menu icon row shows it too) β€” opens Dungeon Train Community Videos β€” the relay's curated list of every video the community has made about the game on YouTube, Bilibili, Twitch and Instagram.

The page

Element Behaviour
Platform toggles One icon tile per platform present (play / TV / speech-bubble / camera marks). Lit = shown, dimmed = hidden; all lit to start. The Twitch tile governs VODs and clips only. Click shows only that platform (streamers too are hidden); click it again to show everything. Shift-click shows or hides just that one (v0.1160.0). Tooltip says what a click will do.
Twitch streamers toggle A purple tile with a dot-and-arcs "live" mark, after the platform icons (v0.847.0). Shows/hides the streamer rows β€” see below. Same click / Shift-click rule as the platform icons.
β˜… toggle Only the developer's picks.
Uploader box Type to narrow (case-insensitive substring). A suggestion panel drops under it: every uploader when empty, narrowing as you type, prefix matches first. Click a name to pick it.
Sort Cycles Default (the opening order, v0.878.0: live streamers first, then rows take turns β€” odd rows the newest video not yet shown, even rows the top β˜… dev pick, falling through to most-viewed once the picks run out; each video once) β†’ Views β†’ Recent (live streams first, then newest) β†’ Dev picks (starred first, then by views).
Rows YouTube thumbnail (fetched on demand from img.youtube.com, misses cached) or a platform tile Β· title Β· uploader Β· views Β· age (v0.878.0: Today, 3 days ago, 2 weeks ago, 5 months ago; the date once a year old β€” the relay sends a publish day only, so a day is the finest unit) Β· β˜… on dev picks Β· βš‘ to flag. Click a row β†’ vanilla link-confirm β†’ browser.
Streamer rows The relay stores one bare twitch.tv/<login> marker per day a channel streams the game; the page folds them into one purple row per streamer β€” purple bar and wash, a "Streamer" tile with the live mark instead of a thumbnail, Streamed on N days Β· last 3 days ago, no βš‘ (a row stands for many relay rows). A streamer the relay has verified live with the game right now gets a pulsing green dot beside the β˜… and a green LIVE now Β· lead on the sub-line. The uploader box and β˜… apply to these rows too; the count on the title line is videos + streamers. Click β†’ the channel.
Bottom row Creator Tools (the Video Tools filming guide, which links back here) Β· Submit a video Β· Done Β· and Brennan's YouTube Β· Bilibili Β· Instagram Β· Discord icons bottom-right.

Loading / failed (with Retry) / "nothing matches" states stand in for the list. The catalogue is fetched once per session β€” at title-screen init since v0.878.0 (it feeds the icon's live dot), so the page opens already populated.

Streaming? The menu nudges you (v0.924.0)

If OBS Studio or Streamlabs is running when you reach the main menu, the Videos icon slides a full-height tag out of its right edge β€” "Streaming? Share link!" (or the shorter "Share stream!" where the window is too narrow for the full line) β€” and the Submit a video button on this page pulses red. The tag is part of the same button (click anywhere on it β†’ this page); a small Γ— just above its far end hides it for the rest of the session. The check is one process-name lookup per session, shared with the DPI-bypass warning's probe, and nothing about it leaves your machine β€” it only knows the app is open, not whether you are live. Dev: ./gradlew runClient -PstreamingTest=obs64.exe forces it.

Submit a video

A Video | Livestream switch above the box β€” both halves always visible, the active one framed.

Video: paste a link β†’ it goes to the operator's review queue (the explorer's Videos page), never straight onto the list. The page reports queued, already listed, already waiting for review, not a video link, or too many for now (6 per 10 min per connection). Anonymous β€” the URL and what kind of link it is, nothing else.

Livestream (v0.847.0 / relay 0.183.2): a pulsing green ● Currently live line and the rule Your stream title must include "Dungeon Train" sit under the switch. Paste your own twitch.tv/<login> while live. The relay asks Twitch (Helix GET /streams) and either lists you at once β€” today's marker with live = 1, so the green dot appears on every client's next fetch β€” or says why not: Come back when you're going live… (offline), Put "Dungeon Train" in your stream title, then submit again (wrong title), or Can't check Twitch right now (Helix unreachable). Nothing to tick; the check is the review. A VOD or clip pasted here is refused before any request.

Every 30 minutes the relay (video-live-check.js) re-checks each live-marked channel and clears the mark when it is offline or the title no longer says "Dungeon Train". The checker never turns the mark back on β€” a stream that ends and restarts has to submit again.

Dev builds (dev cap) skip the video review queue too: both kinds are published immediately, and the page says so under the title.

Flag a video

The βš‘ on a row offers Not about Dungeon Train, Not safe for kids, or Something else… (free text). The flag carries the reason, the client's content mode (adult / kid), and the player's uuid only under network consent (otherwise the relay counts by connection). One voice per person per video per reason. Rules, applied on every flag:

Reason Removed from When
Not about Dungeon Train every list a flag from a dev build (dev cap) Β· β‰₯ 10 flags from β‰₯ 5 people in 30 days Β· β‰₯ 20 flags ever
Not safe for kids the kid-mode list only one flag from an adult (or dev) Β· β‰₯ 5 kids in 30 days Β· β‰₯ 20 flags ever
Something else nothing recorded for the operator

A removed row disappears from the page at once. Nothing is deleted: the operator sees βš‘ N per video on the explorer, the individual flags, and can restore either list with one click. Kid-mode clients fetch the kid list (?mode=kid).

Chinese-language clients

The title screen no longer shows a separate Bilibili icon; the Videos icon wears the Bilibili mark for them instead, and the channel link lives on the page's bottom row.

On the website

The same list is at brennan.games/dungeontrain/videos/ (dp-relay #663, relay 0.220.10): the same toolbar, sorts and click / Shift-click rule (its list logic is a port of VideoQuery / TwitchStreamers / VideoAge), plus Submit and βš‘ Flag. It reads the relay's cap-less /videos/*, which runs the same handlers as the mod's routes (videos-player-routes.js) but never as the developer: a web video submission always waits for review, and web flags count by IP. Linked from the landing page footer.

Relay routes (anonymous, live cap)

GET /videos[?mode=kid] (cached 5 min; rows carry live 0/1) Β· POST /videos/submit {url, kind?} (kind = video default | streamer; answers queued / published / live / already_listed / already_pending, or 400 bad_url / not_live / title_missing, 503 live_check_unavailable) Β· POST /videos/<id>/flag {reason, text?, uuid?, mode?} Β· YouTube/Instagram links via GET /links. Operator side: channel (uploader, backfilled by the daily stats refresh), devFav β˜…, hidden/kidsHidden overrides, live/liveCheckedTs, GET /videos/<id>/flags, POST /videos/live-check (run the 30-min pass now), /health.videoLiveCheck.

Follow-ups

  • Flag a streamer row (would flag the latest marker) β€” streamer rows carry no βš‘ today.
  • A weighted dev pick replacing the β˜… boolean (only the sort comparator and the relay column change).
  • A Discord dev-channel ping when the community auto-hides a video.
⚠️ **GitHub.com Fallback** ⚠️