You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-09 23:17:29 +02:00
feat: sqlite video player (#19792)
* feat: video player * use remote asset id in local query * fix: error from pre-caching beyond total assets * fix: flipped local videos * incorrect aspect ratio on iOS * ignore other storage id during equals check --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
@@ -25,6 +25,7 @@ sealed class BaseAsset {
|
||||
final int? height;
|
||||
final int? durationInSeconds;
|
||||
final bool isFavorite;
|
||||
final String? livePhotoVideoId;
|
||||
|
||||
const BaseAsset({
|
||||
required this.name,
|
||||
@@ -36,18 +37,12 @@ sealed class BaseAsset {
|
||||
this.height,
|
||||
this.durationInSeconds,
|
||||
this.isFavorite = false,
|
||||
this.livePhotoVideoId,
|
||||
});
|
||||
|
||||
bool get isImage => type == AssetType.image;
|
||||
bool get isVideo => type == AssetType.video;
|
||||
|
||||
double? get aspectRatio {
|
||||
if (width != null && height != null && height! > 0) {
|
||||
return width! / height!;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
bool get hasRemote =>
|
||||
storage == AssetState.remote || storage == AssetState.merged;
|
||||
bool get hasLocal =>
|
||||
|
Reference in New Issue
Block a user