Remove meta dependency
This commit is contained in:
parent
ef08c1e27f
commit
e71e8f3dd4
|
@ -1,5 +1,4 @@
|
||||||
import 'package:http/http.dart';
|
import 'package:http/http.dart';
|
||||||
import 'package:meta/meta.dart';
|
|
||||||
|
|
||||||
import '../exceptions/exceptions.dart';
|
import '../exceptions/exceptions.dart';
|
||||||
import '../videos/streams/streams.dart';
|
import '../videos/streams/streams.dart';
|
||||||
|
@ -53,10 +52,9 @@ class YoutubeHttpClient {
|
||||||
return response.body;
|
return response.body;
|
||||||
}
|
}
|
||||||
|
|
||||||
Stream<List<int>> getStream(dynamic url,
|
Stream<List<int>> getStream(StreamInfo streamInfo,
|
||||||
{Map<String, String> headers,
|
{Map<String, String> headers, bool validate = true}) async* {
|
||||||
@required StreamInfo streamInfo,
|
var url = streamInfo.url;
|
||||||
bool validate = true}) async* {
|
|
||||||
if (!streamInfo.isRateLimited()) {
|
if (!streamInfo.isRateLimited()) {
|
||||||
var request = Request('get', url);
|
var request = Request('get', url);
|
||||||
request.headers.addAll(_userAgent);
|
request.headers.addAll(_userAgent);
|
||||||
|
|
|
@ -245,13 +245,7 @@ class StreamsClient {
|
||||||
return hlsManifest;
|
return hlsManifest;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Test this
|
|
||||||
/// Gets the actual stream which is identified by the specified metadata.
|
/// Gets the actual stream which is identified by the specified metadata.
|
||||||
Stream<List<int>> get(StreamInfo streamInfo) {
|
Stream<List<int>> get(StreamInfo streamInfo) =>
|
||||||
return _httpClient.getStream(streamInfo.url, streamInfo: streamInfo);
|
_httpClient.getStream(streamInfo);
|
||||||
}
|
|
||||||
|
|
||||||
//TODO: Implement CopyToAsync
|
|
||||||
|
|
||||||
//TODO: Implement DownloadAsync
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue