2023-03-25 05:44:53 +02:00
|
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
|
|
import 'package:immich_mobile/shared/models/asset.dart';
|
|
|
|
import 'package:immich_mobile/shared/providers/db.provider.dart';
|
2023-12-26 23:41:51 +02:00
|
|
|
import 'package:isar/isar.dart';
|
2023-03-25 05:44:53 +02:00
|
|
|
|
2023-12-26 23:41:51 +02:00
|
|
|
final allVideoAssetsProvider = FutureProvider<List<Asset>>((ref) async {
|
|
|
|
return ref
|
|
|
|
.watch(dbProvider)
|
2023-03-25 05:44:53 +02:00
|
|
|
.assets
|
|
|
|
.filter()
|
2023-12-26 23:41:51 +02:00
|
|
|
.typeEqualTo(AssetType.video)
|
2023-03-25 05:44:53 +02:00
|
|
|
.findAll();
|
|
|
|
});
|