Stack POL Pro: the member's LinkSpin Video Spin on their page ('Watch @user's videos', up to three Social Tube posters, every tap opens the spin link); Video Spins no longer listed among the plain spin links; My Stack POL says which Video Spin shows or how to make a first video (Marty 2026-11-23)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-23 07:38:30 -06:00
parent 57d04c97dc
commit b97a4db7ec
4 changed files with 31 additions and 3 deletions
+15 -1
View File
@@ -509,8 +509,22 @@ def main():
spins = [{'code': x['code'], 'size': x.get('size', ''), 'name': str(x.get('name') or '')[:60]} for x in bs
if str(x.get('owner', '')).lower() in mine and not x.get('paused') and any(b.get('active', True) for b in x.get('banners') or [])]
links = [{'code': x['code'], 'name': str(x.get('name') or '')[:60]} for x in rt
if str(x.get('owner', '')).lower() in mine and not x.get('paused') and any(d.get('active', True) for d in x.get('destinations') or [])]
if not x.get('kind') and str(x.get('owner', '')).lower() in mine and not x.get('paused') and any(d.get('active', True) for d in x.get('destinations') or [])]
stacks[un]['pro'] = {'spins': spins[:40], 'links': links[:20]}
# Video Spins (Marty 2026-11-23): a LinkSpin spin link of kind 'video' rotates the member's Social Tube video pages. The page shows
# ONE: the Video Spin with the most live videos, newest on a tie (play counts are not in this document). Posters come from Social Tube.
vs = []
for x in rt:
if x.get('kind') != 'video' or str(x.get('owner', '')).lower() not in mine or x.get('paused'):
continue
live = [d for d in (x.get('destinations') or []) if d.get('active', True) and not d.get('autoPaused')]
if live:
vs.append((len(live), x.get('created') or 0, x, live))
if vs:
n, _, x, live = max(vs, key=lambda t: (t[0], t[1]))
posters = [{'poster': str(d.get('poster'))[:200], 'label': str(d.get('label') or '')[:80]} for d in live
if str(d.get('poster') or '').startswith('https://socialtube.club/')][:3]
stacks[un]['pro']['video'] = {'code': x['code'], 'name': str(x.get('name') or '')[:60], 'count': n, 'posters': posters}
# My Stack POL (Marty 2026-11-19): the signed-in member area. Every paid member's own rows (newest first, up to 500), their totals
# (the same sums as their public stack), the wallets mapped to them, whether their page is on, plus IAP's explicit switches and Pro
# owners. Read only by /my for the member who is signed in; never rendered on a public page, so a switched-off member stays hidden.