mirror of
https://github.com/immich-app/immich.git
synced 2026-04-16 15:41:54 -04:00
* refactor: yank old timeline # Conflicts: # mobile/lib/presentation/pages/editing/drift_edit.page.dart # mobile/lib/providers/websocket.provider.dart # mobile/lib/routing/router.dart * more cleanup * remove native code * chore: bump sqlite-data version * remove old background tasks from BGTaskSchedulerPermittedIdentifiers * rebase --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
26 lines
929 B
Dart
26 lines
929 B
Dart
import 'package:immich_mobile/domain/models/store.model.dart';
|
|
import 'package:immich_mobile/entities/store.entity.dart';
|
|
import 'package:openapi/api.dart';
|
|
|
|
String getOriginalUrlForRemoteId(final String id, {bool edited = true}) {
|
|
return '${Store.get(StoreKey.serverEndpoint)}/assets/$id/original?edited=$edited';
|
|
}
|
|
|
|
String getThumbnailUrlForRemoteId(
|
|
final String id, {
|
|
AssetMediaSize type = AssetMediaSize.thumbnail,
|
|
bool edited = true,
|
|
String? thumbhash,
|
|
}) {
|
|
final url = '${Store.get(StoreKey.serverEndpoint)}/assets/$id/thumbnail?size=${type.value}&edited=$edited';
|
|
return thumbhash != null ? '$url&c=${Uri.encodeComponent(thumbhash)}' : url;
|
|
}
|
|
|
|
String getPlaybackUrlForRemoteId(final String id) {
|
|
return '${Store.get(StoreKey.serverEndpoint)}/assets/$id/video/playback?';
|
|
}
|
|
|
|
String getFaceThumbnailUrl(final String personId) {
|
|
return '${Store.get(StoreKey.serverEndpoint)}/people/$personId/thumbnail';
|
|
}
|