Remove meta dependency

This commit is contained in:
Hexah 2020-06-05 20:20:53 +02:00
parent ef08c1e27f
commit e71e8f3dd4
2 changed files with 5 additions and 13 deletions

View File

@ -1,5 +1,4 @@
import 'package:http/http.dart';
import 'package:meta/meta.dart';
import '../exceptions/exceptions.dart';
import '../videos/streams/streams.dart';
@ -53,10 +52,9 @@ class YoutubeHttpClient {
return response.body;
}
Stream<List<int>> getStream(dynamic url,
{Map<String, String> headers,
@required StreamInfo streamInfo,
bool validate = true}) async* {
Stream<List<int>> getStream(StreamInfo streamInfo,
{Map<String, String> headers, bool validate = true}) async* {
var url = streamInfo.url;
if (!streamInfo.isRateLimited()) {
var request = Request('get', url);
request.headers.addAll(_userAgent);

View File

@ -245,13 +245,7 @@ class StreamsClient {
return hlsManifest;
}
//TODO: Test this
/// Gets the actual stream which is identified by the specified metadata.
Stream<List<int>> get(StreamInfo streamInfo) {
return _httpClient.getStream(streamInfo.url, streamInfo: streamInfo);
}
//TODO: Implement CopyToAsync
//TODO: Implement DownloadAsync
Stream<List<int>> get(StreamInfo streamInfo) =>
_httpClient.getStream(streamInfo);
}