Added extensive logging throughout DownloadsProvider and DownloadsScreen
to diagnose why downloads screen appears empty.
DownloadsProvider.refreshDownloads():
- 📥 Log function call
- 📥 Log state changes (loading, error)
- 📥 Log TorrentPlatformService.getAllDownloads() call
- 📥 Log number of torrents received
- 📥 Log each torrent processing with index
- 📥 Log success/failure for each torrent info fetch
- 📥 Log final torrents count
- 📥 Log completion or error state
DownloadsScreen.initState() and Consumer:
- 📥 Log initState call
- 📥 Log postFrameCallback execution
- 📥 Log Consumer builder invocations
- 📥 Log provider state (isLoading, error, torrents.length)
- 📥 Log which UI is displayed:
* CircularProgressIndicator
* ErrorDisplay
* Empty state message
* Torrent list with count
All logs prefixed with 📥 for easy filtering in logcat.
Example output:
---
📥 DownloadsScreen: initState() called
📥 DownloadsScreen: postFrameCallback, calling refreshDownloads()
📥 DownloadsProvider: refreshDownloads() called
📥 Setting loading=true, error=null
📥 Calling TorrentPlatformService.getAllDownloads()...
📥 Got 0 torrents from platform service
📥 Cleared _torrents list
📥 Final torrents count: 0
📥 Setting loading=false
📥✅ refreshDownloads() completed successfully
📥 DownloadsScreen: Consumer builder called
📥 isLoading: false
📥 error: null
📥 torrents.length: 0
📥 → Showing empty state
This will help identify:
- Is refreshDownloads being called?
- Does TorrentPlatformService return any data?
- Are torrents parsed correctly?
- Is the correct UI state shown?
- Where does the process fail?
Usage:
Run app → Open Downloads screen → Check logcat for 📥 logs
1. Fix Downloads screen gray screen issue:
- Add DownloadsProvider to main.dart providers list
- Remove @RoutePage() decorator from DownloadsScreen
- Downloads screen now displays torrent list correctly
2. Fix movie detail screen gray screen issue:
- Improve Movie.fromJson() with better error handling
- Safe parsing of genres field (handles both Map and String formats)
- Add fallback 'Untitled' for movies without title
- Add detailed logging in MovieDetailProvider
- Better error messages with stack traces
3. Add automatic version update from CI/CD tags:
- GitLab CI: Update pubspec.yaml version from CI_COMMIT_TAG before build
- GitHub Actions: Update pubspec.yaml version from GITHUB_REF before build
- Version format: tag v0.0.18 becomes version 0.0.18+18
- Applies to all build jobs (arm64, arm32, x64)
How versioning works:
- When you create tag v0.0.18, CI automatically updates pubspec.yaml
- Build uses version 0.0.18+18 (version+buildNumber)
- APK shows correct version in About screen and Google Play
- No manual pubspec.yaml updates needed
Example:
- Create tag: git tag v0.0.18 && git push origin v0.0.18
- CI reads tag, extracts '0.0.18'
- Updates: version: 0.0.18+18 in pubspec.yaml
- Builds APK with this version
- Release created with proper version number
Changes:
- lib/main.dart: Add DownloadsProvider
- lib/presentation/screens/downloads/downloads_screen.dart: Remove @RoutePage
- lib/data/models/movie.dart: Safe JSON parsing with error handling
- lib/presentation/providers/movie_detail_provider.dart: Add detailed logging
- .gitlab-ci.yml: Add version update script in all build jobs
- .github/workflows/release.yml: Add version update step in all build jobs
Result:
✅ Downloads screen displays properly
✅ Movie details screen loads correctly
✅ Automatic versioning from tags (0.0.18, 0.0.19, etc.)
✅ No more gray screens!
- Update auto_route from 8.1.0 to 8.3.0 for better compatibility
- Update auto_route_generator from 8.0.0 to 8.1.0
- Fix Subtitle import conflicts in PlayerProvider
- Fix GitLab CI: change --fatal-infos to --fatal-warnings
- Update dependencies via flutter pub get
- Fix torrent platform service integration with Android engine
- Add downloads page with torrent list and progress tracking
- Implement torrent detail screen with file selection and priorities
- Create native video player with fullscreen controls
- Add WebView players for Vibix and Alloha
- Integrate corrected torrent engine with file selector
- Update dependencies for auto_route and video players
Features:
✅ Downloads screen with real-time torrent status
✅ File-level priority management and selection
✅ Three player options: native, Vibix WebView, Alloha WebView
✅ Torrent pause/resume/remove functionality
✅ Progress tracking and seeder/peer counts
✅ Video file detection and playback integration
✅ Fixed Android torrent engine method calls
This resolves torrent integration issues and provides complete
downloads management UI with video playback capabilities.
- 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.