feat: Add TorrentEngine library and new API client

- Created complete TorrentEngine library module with LibTorrent4j
  - Full torrent management (add, pause, resume, remove)
  - Magnet link metadata extraction
  - File priority management (even during download)
  - Foreground service with persistent notification
  - Room database for state persistence
  - Reactive Flow API for UI updates

- Integrated TorrentEngine with MainActivity via MethodChannel
  - addTorrent, getTorrents, pauseTorrent, resumeTorrent, removeTorrent
  - setFilePriority for dynamic file selection
  - Full JSON serialization for Flutter communication

- Created new NeoMoviesApiClient for Go-based backend
  - Email verification flow (register, verify, resendCode)
  - Google OAuth support
  - Torrent search via RedAPI
  - Multiple player support (Alloha, Lumex, Vibix)
  - Enhanced reactions system (likes/dislikes)
  - All movies/TV shows endpoints

- Updated dependencies and build configuration
  - Java 17 compatibility
  - Updated Kotlin coroutines to 1.9.0
  - Fixed build_runner version conflict
  - Added torrentengine module to settings.gradle.kts

- Added comprehensive documentation
  - TorrentEngine README with usage examples
  - DEVELOPMENT_SUMMARY with full implementation details
  - ProGuard rules for library

This is a complete rewrite of torrent functionality as a reusable library.
This commit is contained in:
factory-droid[bot]
2025-10-02 10:56:22 +00:00
parent 6a8e226a72
commit 1b28c5da45
20 changed files with 2751 additions and 743 deletions

View File

@@ -0,0 +1,23 @@
import 'package:json_annotation/json_annotation.dart';
part 'player_response.g.dart';
/// Response from player endpoints
/// Contains embed URL for different player services
@JsonSerializable()
class PlayerResponse {
final String? embedUrl;
final String? playerType; // 'alloha', 'lumex', 'vibix'
final String? error;
PlayerResponse({
this.embedUrl,
this.playerType,
this.error,
});
factory PlayerResponse.fromJson(Map<String, dynamic> json) =>
_$PlayerResponseFromJson(json);
Map<String, dynamic> toJson() => _$PlayerResponseToJson(this);
}