mirror of
https://github.com/immich-app/immich.git
synced 2025-12-24 03:59:04 -08:00
refactor(server): download endpoints (#6653)
* refactor(server): download controller * chore: open api * chore: fix mobile references
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -32,7 +32,7 @@ class ShareService {
|
||||
final fileName = asset.fileName;
|
||||
final tempFile = await File('${tempDir.path}/$fileName').create();
|
||||
final res = await _apiService.assetApi
|
||||
.downloadFileWithHttpInfo(asset.remoteId!);
|
||||
.downloadFileOldWithHttpInfo(asset.remoteId!);
|
||||
|
||||
if (res.statusCode != 200) {
|
||||
_log.severe(
|
||||
|
||||
Reference in New Issue
Block a user