mirror of
https://gitlab.com/foxixus/neomovies_mobile.git
synced 2025-10-28 14:38:50 +05:00
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:
38
lib/data/models/player/video_quality.dart
Normal file
38
lib/data/models/player/video_quality.dart
Normal file
@@ -0,0 +1,38 @@
|
||||
class VideoQuality {
|
||||
final String quality;
|
||||
final String url;
|
||||
final int bandwidth;
|
||||
final int width;
|
||||
final int height;
|
||||
|
||||
VideoQuality({
|
||||
required this.quality,
|
||||
required this.url,
|
||||
required this.bandwidth,
|
||||
required this.width,
|
||||
required this.height,
|
||||
});
|
||||
|
||||
factory VideoQuality.fromJson(Map<String, dynamic> json) {
|
||||
return VideoQuality(
|
||||
quality: json['quality'] ?? '',
|
||||
url: json['url'] ?? '',
|
||||
bandwidth: json['bandwidth'] ?? 0,
|
||||
width: json['width'] ?? 0,
|
||||
height: json['height'] ?? 0,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'quality': quality,
|
||||
'url': url,
|
||||
'bandwidth': bandwidth,
|
||||
'width': width,
|
||||
'height': height,
|
||||
};
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() => quality;
|
||||
}
|
||||
Reference in New Issue
Block a user