summaryrefslogtreecommitdiff
path: root/Biz/PodcastItLater/Episode.py
AgeCommit message (Collapse)Author
2025-11-16Improve privacy and UX for public feed controlsBen Sima
Privacy improvements: - Removed email address from episode page signup banner - Changed 'This episode was created by <email>' to 'This episode was created using PodcastItLater' - Protects user privacy while still showing the signup prompt Admin UI improvements: - Removed floating Public/Private toggle button (was confusing) - Added '+ Add to public feed' button at bottom of episode cards - Button only visible to admin users - Shows 'Added to public feed' with checkmark when already public - Shows '+ Add to public feed' with plus icon when private - Clearer and more actionable UX for managing public feed content All tests passing (48 tests)
2025-11-16Add metrics tracking endpoint and JavaScript for play eventsBen Sima
- Added POST /episode/{id}/track endpoint to track play/download events - Added JavaScript to audio player to track first play event - JavaScript sends fetch request to tracking endpoint on play - Tracks user_id if logged in, otherwise anonymous - Added main() function to Episode.py for test compatibility Tasks completed: t-gcdFSb, t-gcfTnG
2025-11-16Add 'Add to feed' button on episode pages and fix typecheck.shBen Sima
- Episode pages now show 'Add to feed' button for logged-in users who don't have the episode - Added POST /episode/{id}/add-to-feed endpoint - Tracks 'added' metric when user adds episode to their feed - Added Database.track_episode_metric() function for metrics tracking - Fixed typecheck.sh to use bild instead of broken repl.sh approach Tasks completed: t-gc9aud, t-gcbqDl
2025-11-15Use sqids for non-sequential episode URLsBen Sima
Replace sequential integer IDs with sqids in episode URLs for better privacy and security. Episode IDs are no longer easily guessable. - Add sqids dependency to Web.py - Create encode_episode_id() and decode_episode_id() helper functions - Update /episode/{episode_sqid} route to accept and decode sqids - Update EpisodeList to generate sqid-based links - Update RSS feed to use sqids in episode URLs - Update EpisodeDetailPage to accept and use sqids for share URLs - Update all tests to use sqids Episode URLs now look like /episode/AbCd1234 instead of /episode/1 Database still uses integer IDs internally for efficiency. Amp-Thread-ID: https://ampcode.com/threads/T-cc5d29f0-454e-4864-8d7e-1ad69a42afa9 Co-authored-by: Amp <amp@ampcode.com>
2025-11-15Add Open Graph and metadata tags to episode pagesBen Sima
- Add page_title and meta_tags parameters to PageLayout - Generate episode-specific page titles: '<Episode Title> - PodcastItLater' - Add Open Graph meta tags for better link previews: - og:title, og:type, og:url - og:description with duration and author - og:audio with MP3 URL - og:site_name - Add Twitter Card tags for Twitter sharing - Include article:author when available This improves how episode links appear when shared in messaging apps, social media, and other platforms that support Open Graph protocol. Amp-Thread-ID: https://ampcode.com/threads/T-cc5d29f0-454e-4864-8d7e-1ad69a42afa9 Co-authored-by: Amp <amp@ampcode.com>
2025-11-15Add individual episode pages with sharing and media playerBen Sima
- Create new Episode.py module with episode-specific components - EpisodePlayer: HTML5 audio player - ShareButton: Clipboard copy with Bootstrap input-group pattern - SignupBanner: Promotional banner for non-authenticated users - EpisodeDetailPage: Full page layout - Update Web.py to add /episode/<id> route (public, no auth required) - Make episode titles clickable in EpisodeList component - Add Database.get_episode_by_id() method for efficient queries - Update RSS feed and share buttons to use Bootstrap input-group pattern - Add comprehensive test suite for episode detail pages All episode pages are publicly accessible and include: - Media player to listen to episodes - Share button with URL copying - Links to original articles - Creator attribution banner for non-logged-in users Amp-Thread-ID: https://ampcode.com/threads/T-cc5d29f0-454e-4864-8d7e-1ad69a42afa9 Co-authored-by: Amp <amp@ampcode.com>