spotube/lib/services/sourced_track/enums.dart
Kingkor Roy Tirtho aee2c9282d chore: avoid checking stream accessibility all the time
Only check stream accessible or not when first time it fails or gets blocked
2025-09-03 17:31:38 +06:00

32 lines
648 B
Dart

import 'package:spotube/models/playback/track_sources.dart';
enum SourceCodecs {
m4a._("M4a (Best for downloaded music)"),
weba._("WebA (Best for streamed music)\nDoesn't support audio metadata");
final String label;
const SourceCodecs._(this.label);
}
enum SourceQualities {
high(2),
medium(1),
low(0);
final int priority;
const SourceQualities(this.priority);
bool operator <(SourceQualities other) {
return priority < other.priority;
}
operator >(SourceQualities other) {
return priority > other.priority;
}
}
typedef SiblingType<T extends TrackSourceInfo> = ({
T info,
List<TrackSource>? source
});