mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 07:48:40 +00:00
workaround for #329
This commit is contained in:
parent
6ab11c4e69
commit
24edf896c5
3 changed files with 11 additions and 0 deletions
|
|
@ -31,6 +31,9 @@ class UserData {
|
|||
@JsonKey(defaultValue: false)
|
||||
bool isDeveloper = false;
|
||||
|
||||
@JsonKey(defaultValue: false)
|
||||
bool disableVideoCompression = false;
|
||||
|
||||
@JsonKey(defaultValue: 0)
|
||||
int deviceId = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ UserData _$UserDataFromJson(Map<String, dynamic> json) => UserData(
|
|||
..appVersion = (json['appVersion'] as num?)?.toInt() ?? 0
|
||||
..avatarCounter = (json['avatarCounter'] as num?)?.toInt() ?? 0
|
||||
..isDeveloper = json['isDeveloper'] as bool? ?? false
|
||||
..disableVideoCompression =
|
||||
json['disableVideoCompression'] as bool? ?? false
|
||||
..deviceId = (json['deviceId'] as num?)?.toInt() ?? 0
|
||||
..lastImageSend = json['lastImageSend'] == null
|
||||
? null
|
||||
|
|
@ -79,6 +81,7 @@ Map<String, dynamic> _$UserDataToJson(UserData instance) => <String, dynamic>{
|
|||
'appVersion': instance.appVersion,
|
||||
'avatarCounter': instance.avatarCounter,
|
||||
'isDeveloper': instance.isDeveloper,
|
||||
'disableVideoCompression': instance.disableVideoCompression,
|
||||
'deviceId': instance.deviceId,
|
||||
'subscriptionPlan': instance.subscriptionPlan,
|
||||
'lastImageSend': instance.lastImageSend?.toIso8601String(),
|
||||
|
|
|
|||
|
|
@ -69,6 +69,11 @@ Future<void> compressAndOverlayVideo(MediaFileService media) async {
|
|||
media.ffmpegOutputPath.deleteSync();
|
||||
}
|
||||
|
||||
if (gUser.disableVideoCompression) {
|
||||
media.originalPath.copySync(media.tempPath.path);
|
||||
return;
|
||||
}
|
||||
|
||||
var overLayCommand = '';
|
||||
if (media.overlayImagePath.existsSync()) {
|
||||
overLayCommand =
|
||||
|
|
|
|||
Loading…
Reference in a new issue