dartfmt
This commit is contained in:
parent
1cd6283e82
commit
2fadb3a13c
|
@ -71,7 +71,6 @@ Future<void> download(String id) async {
|
|||
// console.cursorPosition = Coordinate(row, 0);
|
||||
// console.write(msg);
|
||||
|
||||
|
||||
// Listen for data received.
|
||||
await for (var data in audioStream) {
|
||||
count += data.length;
|
||||
|
|
|
@ -19,7 +19,6 @@ class ChannelClient {
|
|||
/// [id] must be either a [ChannelId] or a string
|
||||
/// which is parsed to a [ChannelId]
|
||||
Future<Channel> get(dynamic id) async {
|
||||
|
||||
var channelPage = await ChannelPage.get(_httpClient, id.value);
|
||||
|
||||
return Channel(id, channelPage.channelTitle, channelPage.channelLogoUrl);
|
||||
|
|
|
@ -3,4 +3,4 @@ library youtube_explode.channels;
|
|||
export 'channel.dart';
|
||||
export 'channel_client.dart';
|
||||
export 'channel_id.dart';
|
||||
export 'username.dart';
|
||||
export 'username.dart';
|
||||
|
|
|
@ -4,7 +4,6 @@ import 'youtube_explode_exception.dart';
|
|||
|
||||
/// Exception thrown when a fatal failure occurs.
|
||||
class RequestLimitExceededException implements YoutubeExplodeException {
|
||||
|
||||
/// Description message
|
||||
@override
|
||||
final String message;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import '../extensions/helpers_extension.dart';
|
||||
|
||||
|
||||
/// Encapsulates a valid YouTube playlist ID.
|
||||
class PlaylistId {
|
||||
static final _regMatchExp =
|
||||
|
|
|
@ -11,8 +11,7 @@ class PlayerSource {
|
|||
|
||||
final RegExp _funcNameExp = RegExp(r'(\w+).\w+\(\w+,\d+\);');
|
||||
|
||||
final RegExp _calledFuncNameExp =
|
||||
RegExp(r'\w+(?:.|\[)(\"?\w+(?:\")?)\]?\(');
|
||||
final RegExp _calledFuncNameExp = RegExp(r'\w+(?:.|\[)(\"?\w+(?:\")?)\]?\(');
|
||||
|
||||
final String _root;
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ class WatchPage {
|
|||
}
|
||||
}
|
||||
}
|
||||
return str.substring(0, lastI+1);
|
||||
return str.substring(0, lastI + 1);
|
||||
}
|
||||
|
||||
WatchPage.parse(String raw) : _root = parser.parse(raw);
|
||||
|
|
|
@ -4,7 +4,6 @@ import 'closed_caption.dart';
|
|||
|
||||
/// Track that contains closed captions in a specific language.
|
||||
class ClosedCaptionTrack {
|
||||
|
||||
/// Closed captions.
|
||||
final UnmodifiableListView<ClosedCaption> captions;
|
||||
|
||||
|
|
|
@ -23,4 +23,4 @@ class Framerate extends Comparable<Framerate> with EquatableMixin {
|
|||
@override
|
||||
int compareTo(Framerate other) =>
|
||||
framesPerSecond.compareTo(other.framesPerSecond);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/// Video quality.
|
||||
enum VideoQuality {
|
||||
/// Low quality (144p).
|
||||
|
|
|
@ -1 +1 @@
|
|||
//TODO: Implement this
|
||||
//TODO: Implement this
|
||||
|
|
|
@ -48,12 +48,13 @@ void main() {
|
|||
throwsArgumentError);
|
||||
});
|
||||
test('InvalidPlaylistUrl', () {
|
||||
expect(() => PlaylistId('youtube.com/playlist?lisp=PLOU2XLYxmsIJGErt5rrCqaSGTMyyqNt2H'),
|
||||
expect(
|
||||
() => PlaylistId(
|
||||
'youtube.com/playlist?lisp=PLOU2XLYxmsIJGErt5rrCqaSGTMyyqNt2H'),
|
||||
throwsArgumentError);
|
||||
expect(() => PlaylistId('youtube.com/playlist?list=asd'),
|
||||
throwsArgumentError);
|
||||
expect(() => PlaylistId('youtube.com/'),
|
||||
throwsArgumentError);
|
||||
expect(() => PlaylistId('youtube.com/'), throwsArgumentError);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
//TODO: Implement this
|
||||
//TODO: Implement this
|
||||
|
|
|
@ -32,8 +32,8 @@ void main() {
|
|||
expect(() => VideoId('pI2I2z zeKg'), throwsArgumentError);
|
||||
});
|
||||
test('InvalidVideoUrl', () {
|
||||
expect(() => VideoId('youtube.com/xxx?v=pI2I2zqzeKg'),
|
||||
throwsArgumentError);
|
||||
expect(
|
||||
() => VideoId('youtube.com/xxx?v=pI2I2zqzeKg'), throwsArgumentError);
|
||||
expect(() => VideoId('youtu.be/watch?v=xxx'), throwsArgumentError);
|
||||
expect(() => VideoId('youtube.com/embed/'), throwsArgumentError);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue