refactor(server): download endpoints (#6653)

* refactor(server): download controller

* chore: open api

* chore: fix mobile references
This commit is contained in:
Jason Rasmussen 2024-01-26 09:19:13 -05:00 committed by GitHub
parent de47a6a330
commit 7ea55c7236
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 1420 additions and 388 deletions

View file

@ -24,11 +24,11 @@ class ImageViewerService {
try {
// Download LivePhotos image and motion part
if (asset.isImage && asset.livePhotoVideoId != null && Platform.isIOS) {
var imageResponse = await _apiService.assetApi.downloadFileWithHttpInfo(
var imageResponse = await _apiService.assetApi.downloadFileOldWithHttpInfo(
asset.remoteId!,
);
var motionReponse = await _apiService.assetApi.downloadFileWithHttpInfo(
var motionReponse = await _apiService.assetApi.downloadFileOldWithHttpInfo(
asset.livePhotoVideoId!,
);
@ -70,7 +70,7 @@ class ImageViewerService {
return entity != null;
} else {
var res = await _apiService.assetApi
.downloadFileWithHttpInfo(asset.remoteId!);
.downloadFileOldWithHttpInfo(asset.remoteId!);
if (res.statusCode != 200) {
_log.severe(

View file

@ -166,7 +166,7 @@ class BackupVerificationService {
final Uint64List localImage =
_fakeDecodeImg(local, await file.readAsBytes());
final res = await apiService.assetApi
.downloadFileWithHttpInfo(remote.remoteId!);
.downloadFileOldWithHttpInfo(remote.remoteId!);
final Uint64List remoteImage = _fakeDecodeImg(remote, res.bodyBytes);
final eq = const ListEquality().equals(remoteImage, localImage);