Version 1.4.0

Removed depreaced function `getHighestBitrate`.
This commit is contained in:
Hexah 2020-06-30 15:18:01 +02:00
parent 9327e9307e
commit 32c9f24961
4 changed files with 4 additions and 11 deletions

View File

@ -1,8 +1,7 @@
import 'dart:convert';
import 'package:youtube_explode_dart/src/common/common.dart';
import '../../channels/channel_id.dart';
import '../../common/common.dart';
import '../../exceptions/exceptions.dart';
import '../../extensions/helpers_extension.dart';
import '../../retry.dart';

View File

@ -76,7 +76,7 @@ class WatchPage {
'0');
_PlayerConfig get playerConfig =>
_PlayerConfig(json.decode(_matchJson(_extractJson(
_playerConfig ??= _PlayerConfig(json.decode(_matchJson(_extractJson(
_root.getElementsByTagName('html').first.text,
'ytplayer.config = '))));

View File

@ -30,12 +30,6 @@ extension StreamInfoExt on StreamInfo {
/// Returns true if this video is rate limited.
bool isRateLimited() => _exp.hasMatch(url.toString());
/// Gets the stream with highest bitrate.
@Deprecated('Use `sortByBitrate` extension instead. '
'Will be removed in v1.4.0')
static StreamInfo getHighestBitrate(List<StreamInfo> streams) =>
(streams..sort((a, b) => a.bitrate.compareTo(b.bitrate))).last;
}
/// Extension for Iterables of StreamInfo.

View File

@ -1,6 +1,6 @@
name: youtube_explode_dart
description: A port in dart of the youtube explode library. Supports several API functions without the need of Youtube API Key.
version: 1.3.3
version: 1.4.0
homepage: https://github.com/Hexer10/youtube_explode_dart
environment:
@ -16,6 +16,6 @@ dependencies:
dev_dependencies:
effective_dart: ^1.2.1
effective_dart: ^1.2.3
console: ^3.1.0
test: ^1.12.0