mirror of
https://github.com/immich-app/immich.git
synced 2026-07-31 08:00:49 -07:00
* chore(mobile): Apply stricter linting rules for formatting * Formatting fixes
27 lines
1.0 KiB
Dart
27 lines
1.0 KiB
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&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, {DateTime? updatedAt}) {
|
|
final url = '${Store.get(StoreKey.serverEndpoint)}/people/$personId/thumbnail';
|
|
return updatedAt != null ? '$url?c=${updatedAt.millisecondsSinceEpoch}' : url;
|
|
}
|