diff --git a/news/news.go b/news/news.go index 22f7e690..5da8c025 100644 --- a/news/news.go +++ b/news/news.go @@ -1521,55 +1521,9 @@ func handleArticleView(w http.ResponseWriter, r *http.Request, articleID string) title := entry.Title - // Check if user is authenticated - sess, _ := auth.TrySession(r) - isGuest := sess == nil - - // For guests: show article preview but hide AI summary - if isGuest { - imageSection := "" - if image != "" { - imageSection = fmt.Sprintf(``, image) - } - - categoryBadge := "" - if category != "" { - categoryBadge = fmt.Sprintf(` · %s`, category, category) - } - - descriptionSection := "" - if description != "" { - descriptionSection = fmt.Sprintf(`

%s

`, description) - } - - // Show login prompt instead of AI summary - summarySection := ` -
-

AI Summary

-

Login to read the AI-generated summary.

-
` - - articleHtml := fmt.Sprintf(` -
- %s -
- %s · Source: %s%s -
- %s - %s -
- Read Original → -
-
- ← Back to news -
-
- `, imageSection, postedAt.Unix(), app.TimeAgo(postedAt), getDomain(articleURL), categoryBadge, descriptionSection, summarySection, articleURL) - - pageHTML := app.RenderHTML(title, title, articleHtml) - w.Write([]byte(pageHTML)) - return - } + // Previously gated AI summaries behind login, but summaries are + // pre-generated and cached — no cost to serve. Open to all so + // content can be shared and discovered. // Debug logging app.Log("news", "Article view: ID=%s, Title='%s', URL='%s'", articleID, title, articleURL) diff --git a/video/video.go b/video/video.go index 1870a0e8..8ff5757c 100644 --- a/video/video.go +++ b/video/video.go @@ -1078,32 +1078,6 @@ func Handler(w http.ResponseWriter, r *http.Request) { // render watch page if len(id) > 0 { - youtubeURL := "https://www.youtube.com/watch?v=" + id - thumbnailURL := "https://img.youtube.com/vi/" + id + "/maxresdefault.jpg" - - // Check if user is authenticated - sess, _ := auth.TrySession(r) - isGuest := sess == nil - - // For guests: show thumbnail with options to login or go to YouTube - if isGuest { - guestHtml := fmt.Sprintf(` -
- -

Watch Video

-

Login to watch ad-free, or view on YouTube.

-

- Login to watch - Watch on YouTube → -

-

← Back to videos

-
- `, thumbnailURL, id, id, youtubeURL) - pageHTML := app.RenderHTML("Video", "Video", guestHtml) - w.Write([]byte(pageHTML)) - return - } - // Check if autoplay is requested autoplay := r.Form.Get("autoplay") == "1"