From 2fadb3a13c4952ee16e37939cd303abf81bed1d0 Mon Sep 17 00:00:00 2001 From: Hexah Date: Fri, 5 Jun 2020 21:06:54 +0200 Subject: [PATCH] dartfmt --- example/video_download.dart | 1 - lib/src/channels/channel_client.dart | 1 - lib/src/channels/channels.dart | 2 +- lib/src/exceptions/request_limit_exceeded_exception.dart | 1 - lib/src/playlists/playlist_id.dart | 1 - lib/src/reverse_engineering/responses/player_source.dart | 3 +-- lib/src/reverse_engineering/responses/watch_page.dart | 2 +- lib/src/videos/closed_captions/closed_caption_track.dart | 1 - lib/src/videos/streams/framerate.dart | 2 +- lib/src/videos/streams/video_quality.dart | 1 - test/closed_caption_test.dart | 2 +- test/playlist_id_test.dart | 7 ++++--- test/search_test.dart | 2 +- test/video_id_test.dart | 4 ++-- 14 files changed, 12 insertions(+), 18 deletions(-) diff --git a/example/video_download.dart b/example/video_download.dart index b7851b4..751ab44 100644 --- a/example/video_download.dart +++ b/example/video_download.dart @@ -71,7 +71,6 @@ Future 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; diff --git a/lib/src/channels/channel_client.dart b/lib/src/channels/channel_client.dart index 7c1f54a..8364c87 100644 --- a/lib/src/channels/channel_client.dart +++ b/lib/src/channels/channel_client.dart @@ -19,7 +19,6 @@ class ChannelClient { /// [id] must be either a [ChannelId] or a string /// which is parsed to a [ChannelId] Future get(dynamic id) async { - var channelPage = await ChannelPage.get(_httpClient, id.value); return Channel(id, channelPage.channelTitle, channelPage.channelLogoUrl); diff --git a/lib/src/channels/channels.dart b/lib/src/channels/channels.dart index 391ad92..488019d 100644 --- a/lib/src/channels/channels.dart +++ b/lib/src/channels/channels.dart @@ -3,4 +3,4 @@ library youtube_explode.channels; export 'channel.dart'; export 'channel_client.dart'; export 'channel_id.dart'; -export 'username.dart'; \ No newline at end of file +export 'username.dart'; diff --git a/lib/src/exceptions/request_limit_exceeded_exception.dart b/lib/src/exceptions/request_limit_exceeded_exception.dart index 148c9fb..5fcf057 100644 --- a/lib/src/exceptions/request_limit_exceeded_exception.dart +++ b/lib/src/exceptions/request_limit_exceeded_exception.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; diff --git a/lib/src/playlists/playlist_id.dart b/lib/src/playlists/playlist_id.dart index 28327a4..c318539 100644 --- a/lib/src/playlists/playlist_id.dart +++ b/lib/src/playlists/playlist_id.dart @@ -1,6 +1,5 @@ import '../extensions/helpers_extension.dart'; - /// Encapsulates a valid YouTube playlist ID. class PlaylistId { static final _regMatchExp = diff --git a/lib/src/reverse_engineering/responses/player_source.dart b/lib/src/reverse_engineering/responses/player_source.dart index d05ef9f..65a1347 100644 --- a/lib/src/reverse_engineering/responses/player_source.dart +++ b/lib/src/reverse_engineering/responses/player_source.dart @@ -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; diff --git a/lib/src/reverse_engineering/responses/watch_page.dart b/lib/src/reverse_engineering/responses/watch_page.dart index 0d4d074..50df574 100644 --- a/lib/src/reverse_engineering/responses/watch_page.dart +++ b/lib/src/reverse_engineering/responses/watch_page.dart @@ -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); diff --git a/lib/src/videos/closed_captions/closed_caption_track.dart b/lib/src/videos/closed_captions/closed_caption_track.dart index 9729511..2989439 100644 --- a/lib/src/videos/closed_captions/closed_caption_track.dart +++ b/lib/src/videos/closed_captions/closed_caption_track.dart @@ -4,7 +4,6 @@ import 'closed_caption.dart'; /// Track that contains closed captions in a specific language. class ClosedCaptionTrack { - /// Closed captions. final UnmodifiableListView captions; diff --git a/lib/src/videos/streams/framerate.dart b/lib/src/videos/streams/framerate.dart index d82ea83..bd0c32a 100644 --- a/lib/src/videos/streams/framerate.dart +++ b/lib/src/videos/streams/framerate.dart @@ -23,4 +23,4 @@ class Framerate extends Comparable with EquatableMixin { @override int compareTo(Framerate other) => framesPerSecond.compareTo(other.framesPerSecond); -} \ No newline at end of file +} diff --git a/lib/src/videos/streams/video_quality.dart b/lib/src/videos/streams/video_quality.dart index 0d93932..9f2c32f 100644 --- a/lib/src/videos/streams/video_quality.dart +++ b/lib/src/videos/streams/video_quality.dart @@ -1,4 +1,3 @@ - /// Video quality. enum VideoQuality { /// Low quality (144p). diff --git a/test/closed_caption_test.dart b/test/closed_caption_test.dart index 67f85c3..c532bde 100644 --- a/test/closed_caption_test.dart +++ b/test/closed_caption_test.dart @@ -1 +1 @@ -//TODO: Implement this \ No newline at end of file +//TODO: Implement this diff --git a/test/playlist_id_test.dart b/test/playlist_id_test.dart index 38a8440..038b7f4 100644 --- a/test/playlist_id_test.dart +++ b/test/playlist_id_test.dart @@ -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); }); }); } diff --git a/test/search_test.dart b/test/search_test.dart index 67f85c3..c532bde 100644 --- a/test/search_test.dart +++ b/test/search_test.dart @@ -1 +1 @@ -//TODO: Implement this \ No newline at end of file +//TODO: Implement this diff --git a/test/video_id_test.dart b/test/video_id_test.dart index ae8ea3a..0b46ab6 100644 --- a/test/video_id_test.dart +++ b/test/video_id_test.dart @@ -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); });