feat(server): do not automatically download android motion videos (#11774)

feat(server): do not automatically download embedded android motion videos
This commit is contained in:
Jason Rasmussen 2024-08-15 16:06:16 -04:00 committed by GitHub
parent ed6971222c
commit 32c05ea950
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 151 additions and 28 deletions

View file

@ -14,25 +14,31 @@ class DownloadResponse {
/// Returns a new [DownloadResponse] instance.
DownloadResponse({
required this.archiveSize,
this.includeEmbeddedVideos = false,
});
int archiveSize;
bool includeEmbeddedVideos;
@override
bool operator ==(Object other) => identical(this, other) || other is DownloadResponse &&
other.archiveSize == archiveSize;
other.archiveSize == archiveSize &&
other.includeEmbeddedVideos == includeEmbeddedVideos;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(archiveSize.hashCode);
(archiveSize.hashCode) +
(includeEmbeddedVideos.hashCode);
@override
String toString() => 'DownloadResponse[archiveSize=$archiveSize]';
String toString() => 'DownloadResponse[archiveSize=$archiveSize, includeEmbeddedVideos=$includeEmbeddedVideos]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'archiveSize'] = this.archiveSize;
json[r'includeEmbeddedVideos'] = this.includeEmbeddedVideos;
return json;
}
@ -45,6 +51,7 @@ class DownloadResponse {
return DownloadResponse(
archiveSize: mapValueOfType<int>(json, r'archiveSize')!,
includeEmbeddedVideos: mapValueOfType<bool>(json, r'includeEmbeddedVideos')!,
);
}
return null;
@ -93,6 +100,7 @@ class DownloadResponse {
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'archiveSize',
'includeEmbeddedVideos',
};
}