mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
17 lines
647 B
Dart
17 lines
647 B
Dart
import 'package:nc_photos/entity/file_descriptor.dart';
|
|
import 'package:video_player_platform_interface/video_player_platform_interface.dart';
|
|
|
|
LivePhotoType? getLivePhotoTypeFromFile(FileDescriptor file) {
|
|
final filenameL = file.filename.toLowerCase();
|
|
if (filenameL.startsWith("pxl_") && filenameL.endsWith(".mp.jpg")) {
|
|
return LivePhotoType.googleMp;
|
|
} else if (filenameL.startsWith("pxl_") &&
|
|
filenameL.endsWith(".mp.cover.jpg")) {
|
|
// RAW
|
|
return LivePhotoType.googleMp;
|
|
} else if (filenameL.startsWith("mvimg_") && filenameL.endsWith(".jpg")) {
|
|
return LivePhotoType.googleMvimg;
|
|
} else {
|
|
return null;
|
|
}
|
|
}
|