2025-02-20 00:57:32 +05:30
|
|
|
import 'package:immich_mobile/domain/models/store.model.dart';
|
2024-04-30 21:36:40 -05:00
|
|
|
import 'package:immich_mobile/entities/store.entity.dart';
|
2022-08-08 02:43:09 +02:00
|
|
|
import 'package:openapi/api.dart';
|
|
|
|
|
|
2026-01-09 17:59:52 -05:00
|
|
|
String getOriginalUrlForRemoteId(final String id, {bool edited = true}) {
|
|
|
|
|
return '${Store.get(StoreKey.serverEndpoint)}/assets/$id/original?edited=$edited';
|
2022-08-08 02:43:09 +02:00
|
|
|
}
|
2022-08-21 18:41:36 +02:00
|
|
|
|
2026-01-09 17:59:52 -05:00
|
|
|
String getThumbnailUrlForRemoteId(
|
|
|
|
|
final String id, {
|
|
|
|
|
AssetMediaSize type = AssetMediaSize.thumbnail,
|
|
|
|
|
bool edited = true,
|
2026-01-19 12:22:53 -06:00
|
|
|
String? thumbhash,
|
2026-01-09 17:59:52 -05:00
|
|
|
}) {
|
2026-01-19 12:22:53 -06:00
|
|
|
final url = '${Store.get(StoreKey.serverEndpoint)}/assets/$id/thumbnail?size=${type.value}&edited=$edited';
|
|
|
|
|
return thumbhash != null ? '$url&c=${Uri.encodeComponent(thumbhash)}' : url;
|
2022-12-04 04:59:39 +01:00
|
|
|
}
|
|
|
|
|
|
2025-06-08 21:55:23 -05:00
|
|
|
String getPlaybackUrlForRemoteId(final String id) {
|
|
|
|
|
return '${Store.get(StoreKey.serverEndpoint)}/assets/$id/video/playback?';
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-23 10:44:02 -05:00
|
|
|
String getFaceThumbnailUrl(final String personId) {
|
2024-05-22 13:24:57 -04:00
|
|
|
return '${Store.get(StoreKey.serverEndpoint)}/people/$personId/thumbnail';
|
2023-06-23 10:44:02 -05:00
|
|
|
}
|