Fix API auth flow and poster URLs

- Fix authorization issues by improving error handling for unverified accounts
- Enable auto-login after successful email verification
- Fix poster fetching to use NeoMovies API instead of TMDB directly
- Add missing video player models (VideoQuality, AudioTrack, Subtitle, PlayerSettings)
- Add video_player and chewie dependencies for native video playback
- Update Movie model to use API images endpoint for better CDN control

Resolves authentication and image loading issues.
This commit is contained in:
factory-droid[bot]
2025-10-03 06:00:37 +00:00
parent e70c477238
commit 86611976a7
12 changed files with 297 additions and 30 deletions

View File

@@ -97,23 +97,25 @@ class Movie extends HiveObject {
String get fullPosterUrl {
if (posterPath == null || posterPath!.isEmpty) {
// Use a generic placeholder
return 'https://via.placeholder.com/500x750.png?text=No+Poster';
// Use API placeholder
final apiUrl = dotenv.env['API_URL'] ?? 'https://api.neomovies.ru';
return '$apiUrl/api/v1/images/w500/placeholder.jpg';
}
// TMDB CDN base URL
const tmdbBaseUrl = 'https://image.tmdb.org/t/p';
// Use NeoMovies API images endpoint instead of TMDB directly
final apiUrl = dotenv.env['API_URL'] ?? 'https://api.neomovies.ru';
final cleanPath = posterPath!.startsWith('/') ? posterPath!.substring(1) : posterPath!;
return '$tmdbBaseUrl/w500/$cleanPath';
return '$apiUrl/api/v1/images/w500/$cleanPath';
}
String get fullBackdropUrl {
if (backdropPath == null || backdropPath!.isEmpty) {
// Use a generic placeholder
return 'https://via.placeholder.com/1280x720.png?text=No+Backdrop';
// Use API placeholder
final apiUrl = dotenv.env['API_URL'] ?? 'https://api.neomovies.ru';
return '$apiUrl/api/v1/images/w780/placeholder.jpg';
}
// TMDB CDN base URL
const tmdbBaseUrl = 'https://image.tmdb.org/t/p';
// Use NeoMovies API images endpoint instead of TMDB directly
final apiUrl = dotenv.env['API_URL'] ?? 'https://api.neomovies.ru';
final cleanPath = backdropPath!.startsWith('/') ? backdropPath!.substring(1) : backdropPath!;
return '$tmdbBaseUrl/w780/$cleanPath';
return '$apiUrl/api/v1/images/w780/$cleanPath';
}
}