🎉 Initial commit: AudiOhm - Alternative à Spotify avec streaming YouTube
Features: - Frontend Flutter avec thème néon cyberpunk - Backend FastAPI avec streaming YouTube - Base de données PostgreSQL + Redis - Authentification JWT complète - Recherche multi-source (DB + YouTube) - Playlists CRUD avec drag & drop - Queue management - Settings avec audio quality - Interface adaptative (Desktop + Mobile) Tech Stack: - Frontend: Flutter 3.2+, Riverpod - Backend: Python 3.11+, FastAPI - Database: PostgreSQL 15+ - Cache: Redis 7+ - Streaming: yt-dlp + FFmpeg 🚀 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
import 'artist.dart';
|
||||
|
||||
/// Album entity
|
||||
class Album extends Equatable {
|
||||
final String id;
|
||||
final String title;
|
||||
final DateTime? releaseDate;
|
||||
final String? imageUrl;
|
||||
final int totalTracks;
|
||||
final String? genre;
|
||||
final String? artistId;
|
||||
final Artist? artist;
|
||||
final String? spotifyId;
|
||||
final String? youtubePlaylistId;
|
||||
final DateTime createdAt;
|
||||
final DateTime updatedAt;
|
||||
|
||||
const Album({
|
||||
required this.id,
|
||||
required this.title,
|
||||
this.releaseDate,
|
||||
this.imageUrl,
|
||||
this.totalTracks = 0,
|
||||
this.genre,
|
||||
this.artistId,
|
||||
this.artist,
|
||||
this.spotifyId,
|
||||
this.youtubePlaylistId,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
});
|
||||
|
||||
/// Create Album from JSON
|
||||
factory Album.fromJson(Map<String, dynamic> json) {
|
||||
return Album(
|
||||
id: json['id'] as String,
|
||||
title: json['title'] as String,
|
||||
releaseDate: json['release_date'] != null
|
||||
? DateTime.parse(json['release_date'] as String)
|
||||
: null,
|
||||
imageUrl: json['image_url'] as String?,
|
||||
totalTracks: json['total_tracks'] as int? ?? 0,
|
||||
genre: json['genre'] as String?,
|
||||
artistId: json['artist_id'] as String?,
|
||||
artist: json['artist'] != null
|
||||
? Artist.fromJson(json['artist'] as Map<String, dynamic>)
|
||||
: null,
|
||||
spotifyId: json['spotify_id'] as String?,
|
||||
youtubePlaylistId: json['youtube_playlist_id'] as String?,
|
||||
createdAt: json['created_at'] != null
|
||||
? DateTime.parse(json['created_at'] as String)
|
||||
: DateTime.now(),
|
||||
updatedAt: json['updated_at'] != null
|
||||
? DateTime.parse(json['updated_at'] as String)
|
||||
: DateTime.now(),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id, title, releaseDate, totalTracks];
|
||||
}
|
||||
Reference in New Issue
Block a user