mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05:18 +00:00
42 lines
1.1 KiB
Dart
42 lines
1.1 KiB
Dart
import 'package:spotify/spotify.dart';
|
|
import 'package:youtube_explode_dart/youtube_explode_dart.dart';
|
|
|
|
enum SpotubeTrackMatchAlgorithm {
|
|
// selects the first result returned from YouTube
|
|
youtube,
|
|
// selects the most popular one
|
|
popular,
|
|
// selects the most popular one from the author of the track
|
|
authenticPopular,
|
|
}
|
|
|
|
class SpotubeTrack extends Track {
|
|
Video ytTrack;
|
|
String ytUri;
|
|
|
|
SpotubeTrack.fromTrack({
|
|
required Track track,
|
|
required this.ytTrack,
|
|
required this.ytUri,
|
|
}) {
|
|
album = track.album;
|
|
artists = track.artists;
|
|
availableMarkets = track.availableMarkets;
|
|
discNumber = track.discNumber;
|
|
durationMs = track.durationMs;
|
|
explicit = track.explicit;
|
|
externalIds = track.externalIds;
|
|
externalUrls = track.externalUrls;
|
|
href = track.href;
|
|
id = track.id;
|
|
isPlayable = track.isPlayable;
|
|
linkedFrom = track.linkedFrom;
|
|
name = track.name;
|
|
popularity = track.popularity;
|
|
previewUrl = track.previewUrl;
|
|
trackNumber = track.trackNumber;
|
|
type = track.type;
|
|
uri = track.uri;
|
|
}
|
|
}
|