#396 fixed inline writing MP4 on API <29
This commit is contained in:
parent
38b54ecd64
commit
bb758cdb34
3 changed files with 6 additions and 4 deletions
|
@ -597,8 +597,10 @@ abstract class ImageProvider {
|
||||||
mimeType = mimeType,
|
mimeType = mimeType,
|
||||||
uri = uri,
|
uri = uri,
|
||||||
path = path,
|
path = path,
|
||||||
// do not truncate
|
// do not truncate with "t"
|
||||||
mode = "w",
|
// "w" is enough on API 29+, but it will yield an empty file on API <29
|
||||||
|
// so "r" is necessary for backward compatibility
|
||||||
|
mode = "rw",
|
||||||
) ?: throw Exception("failed to open file descriptor for uri=$uri path=$path")
|
) ?: throw Exception("failed to open file descriptor for uri=$uri path=$path")
|
||||||
pfd.use {
|
pfd.use {
|
||||||
FileOutputStream(it.fileDescriptor).use { outputStream ->
|
FileOutputStream(it.fileDescriptor).use { outputStream ->
|
||||||
|
|
|
@ -748,7 +748,7 @@ class AvesEntry {
|
||||||
|
|
||||||
bool get isBurst => burstEntries?.isNotEmpty == true;
|
bool get isBurst => burstEntries?.isNotEmpty == true;
|
||||||
|
|
||||||
// for backwards compatibility
|
// for backward compatibility
|
||||||
bool get _isMotionPhotoLegacy => isMultiPage && !isBurst && mimeType == MimeTypes.jpeg;
|
bool get _isMotionPhotoLegacy => isMultiPage && !isBurst && mimeType == MimeTypes.jpeg;
|
||||||
|
|
||||||
bool get isMotionPhoto => (_catalogMetadata?.isMotionPhoto ?? false) || _isMotionPhotoLegacy;
|
bool get isMotionPhoto => (_catalogMetadata?.isMotionPhoto ?? false) || _isMotionPhotoLegacy;
|
||||||
|
|
|
@ -182,7 +182,7 @@ class _SettingsPageState extends State<SettingsPage> with FeedbackMixin {
|
||||||
final version = allJsonMap[exportVersionKey];
|
final version = allJsonMap[exportVersionKey];
|
||||||
final importable = <AppExportItem, dynamic>{};
|
final importable = <AppExportItem, dynamic>{};
|
||||||
if (version == null) {
|
if (version == null) {
|
||||||
// backwards compatibility before versioning
|
// backward compatibility before versioning
|
||||||
importable[AppExportItem.settings] = allJsonMap;
|
importable[AppExportItem.settings] = allJsonMap;
|
||||||
} else {
|
} else {
|
||||||
if (allJsonMap is! Map) {
|
if (allJsonMap is! Map) {
|
||||||
|
|
Loading…
Reference in a new issue