diff --git a/lib/src/model/subtitle.g.dart b/lib/src/model/subtitle.g.dart new file mode 100644 index 0000000..93b7ce8 --- /dev/null +++ b/lib/src/model/subtitle.g.dart @@ -0,0 +1,121 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'subtitle.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +class _$Subtitle extends Subtitle { + @override + final bool? autoGenerated; + @override + final String? code; + @override + final String? mimeType; + @override + final String? url; + + factory _$Subtitle([void Function(SubtitleBuilder)? updates]) => + (new SubtitleBuilder()..update(updates)).build(); + + _$Subtitle._({this.autoGenerated, this.code, this.mimeType, this.url}) + : super._(); + + @override + Subtitle rebuild(void Function(SubtitleBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + SubtitleBuilder toBuilder() => new SubtitleBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is Subtitle && + autoGenerated == other.autoGenerated && + code == other.code && + mimeType == other.mimeType && + url == other.url; + } + + @override + int get hashCode { + return $jf($jc( + $jc($jc($jc(0, autoGenerated.hashCode), code.hashCode), + mimeType.hashCode), + url.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper('Subtitle') + ..add('autoGenerated', autoGenerated) + ..add('code', code) + ..add('mimeType', mimeType) + ..add('url', url)) + .toString(); + } +} + +class SubtitleBuilder implements Builder { + _$Subtitle? _$v; + + bool? _autoGenerated; + bool? get autoGenerated => _$this._autoGenerated; + set autoGenerated(bool? autoGenerated) => + _$this._autoGenerated = autoGenerated; + + String? _code; + String? get code => _$this._code; + set code(String? code) => _$this._code = code; + + String? _mimeType; + String? get mimeType => _$this._mimeType; + set mimeType(String? mimeType) => _$this._mimeType = mimeType; + + String? _url; + String? get url => _$this._url; + set url(String? url) => _$this._url = url; + + SubtitleBuilder() { + Subtitle._defaults(this); + } + + SubtitleBuilder get _$this { + final $v = _$v; + if ($v != null) { + _autoGenerated = $v.autoGenerated; + _code = $v.code; + _mimeType = $v.mimeType; + _url = $v.url; + _$v = null; + } + return this; + } + + @override + void replace(Subtitle other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$Subtitle; + } + + @override + void update(void Function(SubtitleBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + _$Subtitle build() { + final _$result = _$v ?? + new _$Subtitle._( + autoGenerated: autoGenerated, + code: code, + mimeType: mimeType, + url: url); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/lib/src/model/video_info.g.dart b/lib/src/model/video_info.g.dart index f1fa057..6efa06c 100644 --- a/lib/src/model/video_info.g.dart +++ b/lib/src/model/video_info.g.dart @@ -10,12 +10,69 @@ class _$VideoInfo extends VideoInfo { @override final BuiltList? audioStreams; @override + final BuiltList? videoStreams; + @override + final String? description; + @override + final int? dislikes; + @override + final int? duration; + @override + final String? hls; + @override + final String? lbryId; + @override + final int? likes; + @override + final bool? livestream; + @override + final String? proxyUrl; + @override + final BuiltList? subtitles; + @override + final String? dash; + @override + final String? thumbnailUrl; + @override + final String? title; + @override + final String? uploadDate; + @override + final String? uploader; + @override + final String? uploaderAvatar; + @override + final String? uploaderUrl; + @override + final bool? uploaderVerified; + @override final BuiltList? relatedStreams; factory _$VideoInfo([void Function(VideoInfoBuilder)? updates]) => (new VideoInfoBuilder()..update(updates)).build(); - _$VideoInfo._({this.audioStreams, this.relatedStreams}) : super._(); + _$VideoInfo._( + {this.audioStreams, + this.videoStreams, + this.description, + this.dislikes, + this.duration, + this.hls, + this.lbryId, + this.likes, + this.livestream, + this.proxyUrl, + this.subtitles, + this.dash, + this.thumbnailUrl, + this.title, + this.uploadDate, + this.uploader, + this.uploaderAvatar, + this.uploaderUrl, + this.uploaderVerified, + this.relatedStreams}) + : super._(); @override VideoInfo rebuild(void Function(VideoInfoBuilder) updates) => @@ -29,18 +86,91 @@ class _$VideoInfo extends VideoInfo { if (identical(other, this)) return true; return other is VideoInfo && audioStreams == other.audioStreams && + videoStreams == other.videoStreams && + description == other.description && + dislikes == other.dislikes && + duration == other.duration && + hls == other.hls && + lbryId == other.lbryId && + likes == other.likes && + livestream == other.livestream && + proxyUrl == other.proxyUrl && + subtitles == other.subtitles && + dash == other.dash && + thumbnailUrl == other.thumbnailUrl && + title == other.title && + uploadDate == other.uploadDate && + uploader == other.uploader && + uploaderAvatar == other.uploaderAvatar && + uploaderUrl == other.uploaderUrl && + uploaderVerified == other.uploaderVerified && relatedStreams == other.relatedStreams; } @override int get hashCode { - return $jf($jc($jc(0, audioStreams.hashCode), relatedStreams.hashCode)); + return $jf($jc( + $jc( + $jc( + $jc( + $jc( + $jc( + $jc( + $jc( + $jc( + $jc( + $jc( + $jc( + $jc( + $jc( + $jc( + $jc( + $jc( + $jc( + $jc($jc(0, audioStreams.hashCode), + videoStreams.hashCode), + description.hashCode), + dislikes.hashCode), + duration.hashCode), + hls.hashCode), + lbryId.hashCode), + likes.hashCode), + livestream.hashCode), + proxyUrl.hashCode), + subtitles.hashCode), + dash.hashCode), + thumbnailUrl.hashCode), + title.hashCode), + uploadDate.hashCode), + uploader.hashCode), + uploaderAvatar.hashCode), + uploaderUrl.hashCode), + uploaderVerified.hashCode), + relatedStreams.hashCode)); } @override String toString() { return (newBuiltValueToStringHelper('VideoInfo') ..add('audioStreams', audioStreams) + ..add('videoStreams', videoStreams) + ..add('description', description) + ..add('dislikes', dislikes) + ..add('duration', duration) + ..add('hls', hls) + ..add('lbryId', lbryId) + ..add('likes', likes) + ..add('livestream', livestream) + ..add('proxyUrl', proxyUrl) + ..add('subtitles', subtitles) + ..add('dash', dash) + ..add('thumbnailUrl', thumbnailUrl) + ..add('title', title) + ..add('uploadDate', uploadDate) + ..add('uploader', uploader) + ..add('uploaderAvatar', uploaderAvatar) + ..add('uploaderUrl', uploaderUrl) + ..add('uploaderVerified', uploaderVerified) ..add('relatedStreams', relatedStreams)) .toString(); } @@ -55,6 +185,84 @@ class VideoInfoBuilder implements Builder { set audioStreams(ListBuilder? audioStreams) => _$this._audioStreams = audioStreams; + ListBuilder? _videoStreams; + ListBuilder get videoStreams => + _$this._videoStreams ??= new ListBuilder(); + set videoStreams(ListBuilder? videoStreams) => + _$this._videoStreams = videoStreams; + + String? _description; + String? get description => _$this._description; + set description(String? description) => _$this._description = description; + + int? _dislikes; + int? get dislikes => _$this._dislikes; + set dislikes(int? dislikes) => _$this._dislikes = dislikes; + + int? _duration; + int? get duration => _$this._duration; + set duration(int? duration) => _$this._duration = duration; + + String? _hls; + String? get hls => _$this._hls; + set hls(String? hls) => _$this._hls = hls; + + String? _lbryId; + String? get lbryId => _$this._lbryId; + set lbryId(String? lbryId) => _$this._lbryId = lbryId; + + int? _likes; + int? get likes => _$this._likes; + set likes(int? likes) => _$this._likes = likes; + + bool? _livestream; + bool? get livestream => _$this._livestream; + set livestream(bool? livestream) => _$this._livestream = livestream; + + String? _proxyUrl; + String? get proxyUrl => _$this._proxyUrl; + set proxyUrl(String? proxyUrl) => _$this._proxyUrl = proxyUrl; + + ListBuilder? _subtitles; + ListBuilder get subtitles => + _$this._subtitles ??= new ListBuilder(); + set subtitles(ListBuilder? subtitles) => + _$this._subtitles = subtitles; + + String? _dash; + String? get dash => _$this._dash; + set dash(String? dash) => _$this._dash = dash; + + String? _thumbnailUrl; + String? get thumbnailUrl => _$this._thumbnailUrl; + set thumbnailUrl(String? thumbnailUrl) => _$this._thumbnailUrl = thumbnailUrl; + + String? _title; + String? get title => _$this._title; + set title(String? title) => _$this._title = title; + + String? _uploadDate; + String? get uploadDate => _$this._uploadDate; + set uploadDate(String? uploadDate) => _$this._uploadDate = uploadDate; + + String? _uploader; + String? get uploader => _$this._uploader; + set uploader(String? uploader) => _$this._uploader = uploader; + + String? _uploaderAvatar; + String? get uploaderAvatar => _$this._uploaderAvatar; + set uploaderAvatar(String? uploaderAvatar) => + _$this._uploaderAvatar = uploaderAvatar; + + String? _uploaderUrl; + String? get uploaderUrl => _$this._uploaderUrl; + set uploaderUrl(String? uploaderUrl) => _$this._uploaderUrl = uploaderUrl; + + bool? _uploaderVerified; + bool? get uploaderVerified => _$this._uploaderVerified; + set uploaderVerified(bool? uploaderVerified) => + _$this._uploaderVerified = uploaderVerified; + ListBuilder? _relatedStreams; ListBuilder get relatedStreams => _$this._relatedStreams ??= new ListBuilder(); @@ -69,6 +277,24 @@ class VideoInfoBuilder implements Builder { final $v = _$v; if ($v != null) { _audioStreams = $v.audioStreams?.toBuilder(); + _videoStreams = $v.videoStreams?.toBuilder(); + _description = $v.description; + _dislikes = $v.dislikes; + _duration = $v.duration; + _hls = $v.hls; + _lbryId = $v.lbryId; + _likes = $v.likes; + _livestream = $v.livestream; + _proxyUrl = $v.proxyUrl; + _subtitles = $v.subtitles?.toBuilder(); + _dash = $v.dash; + _thumbnailUrl = $v.thumbnailUrl; + _title = $v.title; + _uploadDate = $v.uploadDate; + _uploader = $v.uploader; + _uploaderAvatar = $v.uploaderAvatar; + _uploaderUrl = $v.uploaderUrl; + _uploaderVerified = $v.uploaderVerified; _relatedStreams = $v.relatedStreams?.toBuilder(); _$v = null; } @@ -93,12 +319,36 @@ class VideoInfoBuilder implements Builder { _$result = _$v ?? new _$VideoInfo._( audioStreams: _audioStreams?.build(), + videoStreams: _videoStreams?.build(), + description: description, + dislikes: dislikes, + duration: duration, + hls: hls, + lbryId: lbryId, + likes: likes, + livestream: livestream, + proxyUrl: proxyUrl, + subtitles: _subtitles?.build(), + dash: dash, + thumbnailUrl: thumbnailUrl, + title: title, + uploadDate: uploadDate, + uploader: uploader, + uploaderAvatar: uploaderAvatar, + uploaderUrl: uploaderUrl, + uploaderVerified: uploaderVerified, relatedStreams: _relatedStreams?.build()); } catch (_) { late String _$failedField; try { _$failedField = 'audioStreams'; _audioStreams?.build(); + _$failedField = 'videoStreams'; + _videoStreams?.build(); + + _$failedField = 'subtitles'; + _subtitles?.build(); + _$failedField = 'relatedStreams'; _relatedStreams?.build(); } catch (e) { diff --git a/lib/src/serializers.g.dart b/lib/src/serializers.g.dart index 4c38407..e519a69 100644 --- a/lib/src/serializers.g.dart +++ b/lib/src/serializers.g.dart @@ -13,10 +13,17 @@ Serializers _$serializers = (new Serializers().toBuilder() ..add(Stream.serializer) ..add(StreamFormatEnum.serializer) ..add(StreamItem.serializer) + ..add(Subtitle.serializer) ..add(VideoInfo.serializer) ..addBuilderFactory( const FullType(BuiltList, const [const FullType(Stream)]), () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(Stream)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(Subtitle)]), + () => new ListBuilder()) ..addBuilderFactory( const FullType(BuiltList, const [const FullType(StreamItem)]), () => new ListBuilder())