mirror of
https://github.com/TeamPiped/piped_dart.git
synced 2024-08-14 22:27:49 +00:00
Add uploaded field.
This commit is contained in:
parent
f9be9522e9
commit
4ab4098c9a
3 changed files with 33 additions and 3 deletions
|
@ -11,6 +11,7 @@ Name | Type | Description | Notes
|
||||||
**duration** | **int** | The duration of the video in seconds. |
|
**duration** | **int** | The duration of the video in seconds. |
|
||||||
**thumbnail** | **String** | The thumbnail of the video. |
|
**thumbnail** | **String** | The thumbnail of the video. |
|
||||||
**title** | **String** | The title of the video. |
|
**title** | **String** | The title of the video. |
|
||||||
|
**uploaded** | **int** | The date in unix epoch the video was uploaded. | [optional]
|
||||||
**uploadedDate** | **String** | The relative date the video was uploaded on. | [optional]
|
**uploadedDate** | **String** | The relative date the video was uploaded on. | [optional]
|
||||||
**uploaderAvatar** | **String** | The avatar of the channel of the video. | [optional]
|
**uploaderAvatar** | **String** | The avatar of the channel of the video. | [optional]
|
||||||
**uploaderName** | **String** | The name of the channel of the video. | [optional]
|
**uploaderName** | **String** | The name of the channel of the video. | [optional]
|
||||||
|
|
|
@ -13,6 +13,7 @@ part 'stream_item.g.dart';
|
||||||
/// * [duration] - The duration of the video in seconds.
|
/// * [duration] - The duration of the video in seconds.
|
||||||
/// * [thumbnail] - The thumbnail of the video.
|
/// * [thumbnail] - The thumbnail of the video.
|
||||||
/// * [title] - The title of the video.
|
/// * [title] - The title of the video.
|
||||||
|
/// * [uploaded] - The date in unix epoch the video was uploaded.
|
||||||
/// * [uploadedDate] - The relative date the video was uploaded on.
|
/// * [uploadedDate] - The relative date the video was uploaded on.
|
||||||
/// * [uploaderAvatar] - The avatar of the channel of the video.
|
/// * [uploaderAvatar] - The avatar of the channel of the video.
|
||||||
/// * [uploaderName] - The name of the channel of the video.
|
/// * [uploaderName] - The name of the channel of the video.
|
||||||
|
@ -33,6 +34,10 @@ abstract class StreamItem implements Built<StreamItem, StreamItemBuilder> {
|
||||||
@BuiltValueField(wireName: r'title')
|
@BuiltValueField(wireName: r'title')
|
||||||
String get title;
|
String get title;
|
||||||
|
|
||||||
|
/// The date in unix epoch the video was uploaded.
|
||||||
|
@BuiltValueField(wireName: r'uploaded')
|
||||||
|
int? get uploaded;
|
||||||
|
|
||||||
/// The relative date the video was uploaded on.
|
/// The relative date the video was uploaded on.
|
||||||
@BuiltValueField(wireName: r'uploadedDate')
|
@BuiltValueField(wireName: r'uploadedDate')
|
||||||
String? get uploadedDate;
|
String? get uploadedDate;
|
||||||
|
@ -95,6 +100,12 @@ class _$StreamItemSerializer implements StructuredSerializer<StreamItem> {
|
||||||
..add(r'title')
|
..add(r'title')
|
||||||
..add(serializers.serialize(object.title,
|
..add(serializers.serialize(object.title,
|
||||||
specifiedType: const FullType(String)));
|
specifiedType: const FullType(String)));
|
||||||
|
if (object.uploaded != null) {
|
||||||
|
result
|
||||||
|
..add(r'uploaded')
|
||||||
|
..add(serializers.serialize(object.uploaded,
|
||||||
|
specifiedType: const FullType(int)));
|
||||||
|
}
|
||||||
if (object.uploadedDate != null) {
|
if (object.uploadedDate != null) {
|
||||||
result
|
result
|
||||||
..add(r'uploadedDate')
|
..add(r'uploadedDate')
|
||||||
|
@ -165,6 +176,11 @@ class _$StreamItemSerializer implements StructuredSerializer<StreamItem> {
|
||||||
specifiedType: const FullType(String)) as String;
|
specifiedType: const FullType(String)) as String;
|
||||||
result.title = valueDes;
|
result.title = valueDes;
|
||||||
break;
|
break;
|
||||||
|
case r'uploaded':
|
||||||
|
final valueDes = serializers.deserialize(value,
|
||||||
|
specifiedType: const FullType(int)) as int;
|
||||||
|
result.uploaded = valueDes;
|
||||||
|
break;
|
||||||
case r'uploadedDate':
|
case r'uploadedDate':
|
||||||
final valueDes = serializers.deserialize(value,
|
final valueDes = serializers.deserialize(value,
|
||||||
specifiedType: const FullType(String)) as String;
|
specifiedType: const FullType(String)) as String;
|
||||||
|
|
|
@ -14,6 +14,8 @@ class _$StreamItem extends StreamItem {
|
||||||
@override
|
@override
|
||||||
final String title;
|
final String title;
|
||||||
@override
|
@override
|
||||||
|
final int? uploaded;
|
||||||
|
@override
|
||||||
final String? uploadedDate;
|
final String? uploadedDate;
|
||||||
@override
|
@override
|
||||||
final String? uploaderAvatar;
|
final String? uploaderAvatar;
|
||||||
|
@ -35,6 +37,7 @@ class _$StreamItem extends StreamItem {
|
||||||
{required this.duration,
|
{required this.duration,
|
||||||
required this.thumbnail,
|
required this.thumbnail,
|
||||||
required this.title,
|
required this.title,
|
||||||
|
this.uploaded,
|
||||||
this.uploadedDate,
|
this.uploadedDate,
|
||||||
this.uploaderAvatar,
|
this.uploaderAvatar,
|
||||||
this.uploaderName,
|
this.uploaderName,
|
||||||
|
@ -63,6 +66,7 @@ class _$StreamItem extends StreamItem {
|
||||||
duration == other.duration &&
|
duration == other.duration &&
|
||||||
thumbnail == other.thumbnail &&
|
thumbnail == other.thumbnail &&
|
||||||
title == other.title &&
|
title == other.title &&
|
||||||
|
uploaded == other.uploaded &&
|
||||||
uploadedDate == other.uploadedDate &&
|
uploadedDate == other.uploadedDate &&
|
||||||
uploaderAvatar == other.uploaderAvatar &&
|
uploaderAvatar == other.uploaderAvatar &&
|
||||||
uploaderName == other.uploaderName &&
|
uploaderName == other.uploaderName &&
|
||||||
|
@ -80,11 +84,13 @@ class _$StreamItem extends StreamItem {
|
||||||
$jc(
|
$jc(
|
||||||
$jc(
|
$jc(
|
||||||
$jc(
|
$jc(
|
||||||
|
$jc(
|
||||||
$jc(
|
$jc(
|
||||||
$jc(
|
$jc(
|
||||||
$jc($jc(0, duration.hashCode),
|
$jc($jc(0, duration.hashCode),
|
||||||
thumbnail.hashCode),
|
thumbnail.hashCode),
|
||||||
title.hashCode),
|
title.hashCode),
|
||||||
|
uploaded.hashCode),
|
||||||
uploadedDate.hashCode),
|
uploadedDate.hashCode),
|
||||||
uploaderAvatar.hashCode),
|
uploaderAvatar.hashCode),
|
||||||
uploaderName.hashCode),
|
uploaderName.hashCode),
|
||||||
|
@ -100,6 +106,7 @@ class _$StreamItem extends StreamItem {
|
||||||
..add('duration', duration)
|
..add('duration', duration)
|
||||||
..add('thumbnail', thumbnail)
|
..add('thumbnail', thumbnail)
|
||||||
..add('title', title)
|
..add('title', title)
|
||||||
|
..add('uploaded', uploaded)
|
||||||
..add('uploadedDate', uploadedDate)
|
..add('uploadedDate', uploadedDate)
|
||||||
..add('uploaderAvatar', uploaderAvatar)
|
..add('uploaderAvatar', uploaderAvatar)
|
||||||
..add('uploaderName', uploaderName)
|
..add('uploaderName', uploaderName)
|
||||||
|
@ -126,6 +133,10 @@ class StreamItemBuilder implements Builder<StreamItem, StreamItemBuilder> {
|
||||||
String? get title => _$this._title;
|
String? get title => _$this._title;
|
||||||
set title(String? title) => _$this._title = title;
|
set title(String? title) => _$this._title = title;
|
||||||
|
|
||||||
|
int? _uploaded;
|
||||||
|
int? get uploaded => _$this._uploaded;
|
||||||
|
set uploaded(int? uploaded) => _$this._uploaded = uploaded;
|
||||||
|
|
||||||
String? _uploadedDate;
|
String? _uploadedDate;
|
||||||
String? get uploadedDate => _$this._uploadedDate;
|
String? get uploadedDate => _$this._uploadedDate;
|
||||||
set uploadedDate(String? uploadedDate) => _$this._uploadedDate = uploadedDate;
|
set uploadedDate(String? uploadedDate) => _$this._uploadedDate = uploadedDate;
|
||||||
|
@ -166,6 +177,7 @@ class StreamItemBuilder implements Builder<StreamItem, StreamItemBuilder> {
|
||||||
_duration = $v.duration;
|
_duration = $v.duration;
|
||||||
_thumbnail = $v.thumbnail;
|
_thumbnail = $v.thumbnail;
|
||||||
_title = $v.title;
|
_title = $v.title;
|
||||||
|
_uploaded = $v.uploaded;
|
||||||
_uploadedDate = $v.uploadedDate;
|
_uploadedDate = $v.uploadedDate;
|
||||||
_uploaderAvatar = $v.uploaderAvatar;
|
_uploaderAvatar = $v.uploaderAvatar;
|
||||||
_uploaderName = $v.uploaderName;
|
_uploaderName = $v.uploaderName;
|
||||||
|
@ -199,6 +211,7 @@ class StreamItemBuilder implements Builder<StreamItem, StreamItemBuilder> {
|
||||||
thumbnail, 'StreamItem', 'thumbnail'),
|
thumbnail, 'StreamItem', 'thumbnail'),
|
||||||
title: BuiltValueNullFieldError.checkNotNull(
|
title: BuiltValueNullFieldError.checkNotNull(
|
||||||
title, 'StreamItem', 'title'),
|
title, 'StreamItem', 'title'),
|
||||||
|
uploaded: uploaded,
|
||||||
uploadedDate: uploadedDate,
|
uploadedDate: uploadedDate,
|
||||||
uploaderAvatar: uploaderAvatar,
|
uploaderAvatar: uploaderAvatar,
|
||||||
uploaderName: uploaderName,
|
uploaderName: uploaderName,
|
||||||
|
|
Loading…
Reference in a new issue