mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00

* feat: implement new SourcedTrack for youtube and piped * refactor: replace old spotube track with sourced track * feat: add jiosaavn as audio source * fix: download not working other than jiosaavn * Merge branch 'dev' into feat-jiosaavn
34 lines
698 B
Dart
34 lines
698 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'source_info.g.dart';
|
|
|
|
@JsonSerializable()
|
|
class SourceInfo {
|
|
final String id;
|
|
final String title;
|
|
final String artist;
|
|
final String artistUrl;
|
|
final String? album;
|
|
|
|
final String thumbnail;
|
|
final String pageUrl;
|
|
|
|
final Duration duration;
|
|
|
|
SourceInfo({
|
|
required this.id,
|
|
required this.title,
|
|
required this.artist,
|
|
required this.thumbnail,
|
|
required this.pageUrl,
|
|
required this.duration,
|
|
required this.artistUrl,
|
|
this.album,
|
|
});
|
|
|
|
factory SourceInfo.fromJson(Map<String, dynamic> json) =>
|
|
_$SourceInfoFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$SourceInfoToJson(this);
|
|
}
|