mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-23 01:06:21 +01:00
14 lines
511 B
Dart
14 lines
511 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("mvimg_") && filenameL.endsWith(".jpg")) {
|
||
|
return LivePhotoType.googleMvimg;
|
||
|
} else {
|
||
|
return null;
|
||
|
}
|
||
|
}
|