Skip to content

Commit e4d9c3c

Browse files
v1.8.0: Movie Comparison Mode, Performance Boost, Security Hardening
Features: - Movie Comparison Mode: Side-by-side selection of 2-3 random movies - Lazy-loading for actor images with Wikipedia/AniList fallbacks - Async trailer loading via new API endpoint Performance: - 10x faster page loads by removing external API calls from initial render - Anime/TV libraries now use Plex's native unwatched filter - Progressive loading for images and trailers Security: - Auto-generate secure random secret keys - Added issuer, audience, and not-before claims to JWT tokens Bug Fixes: - Wikipedia API now properly URL-encodes actor names - Anime library no longer freezes for 30+ seconds
1 parent 9074491 commit e4d9c3c

8 files changed

Lines changed: 944 additions & 45 deletions

File tree

.env.example

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Plex Suggester - Local Development Environment Variables
2+
# Copy this file to .env and fill in your values
3+
4+
# Required: Your Plex server URL (e.g., http://192.168.1.100:32400)
5+
PLEX_URL=http://your-plex-server:32400
6+
7+
# Optional: Your Plex token (can also be configured via web interface)
8+
# Get it from: https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/
9+
PLEX_TOKEN=
10+
11+
# Default library to display (e.g., Movies, TV Shows, Anime)
12+
PLEX_LIBRARY=Movies
13+
14+
# JWT secret key for authentication (change in production!)
15+
JWT_SECRET_KEY=dev-secret-key-for-testing
16+
17+
# Flask secret key for sessions
18+
FLASK_SECRET_KEY=dev-flask-secret
19+
20+
# Backend API URL for like/dislike/watch tracking
21+
BACKEND_API_URL=https://plex-like.satrawi.cc

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
__pycache__/
22
*.pyc
33
.env
4+
docker-compose.dev.yml
45
*.db
56
*.sqlite3
67
*.log

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,48 @@ All notable changes to the Plex Suggester project will be documented in this fil
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.8.0] - 2025-12-22
8+
9+
### Added
10+
- **Movie Comparison Mode** - New feature for indecisive viewers
11+
- Side-by-side comparison of 2-3 random movies
12+
- Beautiful card-based UI with poster, title, year, genres, rating, and duration
13+
- Click-to-select interaction with visual feedback
14+
- "New Options" button to refresh movie choices
15+
- Responsive grid layout (1/2/3 columns based on screen size)
16+
- New `/api/compare` endpoint for fetching comparison movies
17+
18+
- **Lazy-Loading Actor Images** - Progressive image loading
19+
- Actor images load asynchronously after page render
20+
- New `/api/actor-image/{name}` endpoint
21+
- Multiple fallback sources: Wikipedia → Wikipedia Search → AniList → Initials placeholder
22+
- Proper URL encoding and User-Agent headers for reliable Wikipedia API access
23+
24+
- **Async Trailer Loading** - Background trailer URL fetching
25+
- New `/api/trailer/{movie_id}` endpoint
26+
- Trailer button shows "Loading..." then becomes active
27+
- Page no longer blocked by slow DuckDuckGo/YouTube searches
28+
29+
### Changed
30+
- **Massive Performance Improvements**
31+
- Main page now uses `get_random_movie_fast()` - no external API calls on initial load
32+
- Anime/TV show libraries use Plex's native `unwatched=True` filter instead of iterating all episodes
33+
- Removed slow IMDB scraping from initial page load
34+
- Actor images, trailers load progressively via AJAX
35+
36+
### Security
37+
- **Enhanced JWT Authentication**
38+
- Fixed critical vulnerability in `require_jwt_auth` decorator (was only checking token length!)
39+
- Added secure random key generation when `JWT_SECRET_KEY` not provided
40+
- Added `iss` (issuer) and `aud` (audience) claims to JWT tokens
41+
- Added `nbf` (not-before) claim for additional security
42+
- Strict token verification requiring all security claims
43+
- Removed weak default secret key from Dockerfile
44+
45+
### Fixed
46+
- Wikipedia actor image API now works reliably with proper URL encoding
47+
- Anime library no longer takes 30+ seconds to load
48+
749
## [1.7.2] - 2025-07-06
850

951
### Added

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ COPY . .
99

1010
EXPOSE 5000
1111

12-
# Set default JWT secret key (should be overridden in production)
13-
ENV JWT_SECRET_KEY=default-secret-key-change-in-production
12+
# Note: JWT_SECRET_KEY should be set via docker-compose or runtime environment
13+
# If not set, the app will generate a random key (tokens won't persist across restarts)
14+
# ENV JWT_SECRET_KEY= # Don't set a default - let the app generate or require it
1415

1516
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--timeout", "120", "app:app"]

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,29 @@
22

33
# Plex Movie Suggester
44

5-
**Version 1.7.2**
5+
**Version 1.8.0**
66

77
A modern Flask app that connects to your Plex server and suggests a random unwatched movie, TV show, anime, or other video from your Plex library.
88
Features a sleek, responsive Plex-themed UI with modern glass morphism design, interactive elements, **secure JWT-based authentication**, and **Plex Match functionality** for group viewing decisions.
99

1010
---
1111

12-
## 🚀 What's New in v1.7.2
12+
## 🚀 What's New in v1.8.0
1313

14-
- **Professional Branding:**
15-
Added comprehensive favicon support with new Plex-style logo featuring an orange arrow design for enhanced brand recognition.
16-
- **Cross-Browser Compatibility:**
17-
Implemented favicon routes (`/favicon.ico`, `/icon.png`, `/logo.png`) with proper MIME types and support for Apple touch icons and legacy browsers.
18-
- **Enhanced User Experience:**
19-
Branded favicon now appears in browser tabs, bookmarks, and mobile home screen shortcuts for better project identification.
20-
- **Technical Improvements:**
21-
Enhanced Flask routing with `send_from_directory` functionality for optimized static asset serving.
14+
- **🎬 Movie Comparison Mode:**
15+
New side-by-side comparison view showing 2-3 random movies at once. Click to select your choice, then watch or get new options. Perfect for when you can't decide!
16+
- **⚡ Blazing Fast Performance:**
17+
Complete performance overhaul - pages now load instantly. Anime/TV libraries that took 30+ seconds now load in under 1 second.
18+
- **🔐 Enhanced Security:**
19+
Strengthened JWT authentication with proper signature verification, secure secret key generation, issuer/audience claims, and protection against token spoofing.
20+
- **🖼️ Smart Actor Images:**
21+
Actor photos now lazy-load from Wikipedia with multiple fallbacks. Page loads fast, images appear progressively.
22+
- **🎥 Async Trailer Loading:**
23+
Trailer URLs load in the background - no more waiting for YouTube searches to complete before seeing your movie.
2224

2325
---
2426

25-
## 🚀 What's New in v1.7.1
27+
## 🚀 What's New in v1.7.2
2628

2729
- **Donation Support:**
2830
Added donation buttons (Buy Me a Coffee, Ko-fi) integrated seamlessly into the interface with matching project theme and smooth animations.

0 commit comments

Comments
 (0)