-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[fix] steaming fixes #5168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix] steaming fixes #5168
Conversation
…og, seekbar smooth, player ux buttons same position, failure title for preview
if (!initSuccess) { | ||
_putFilesForPreviewCreation(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will always run on app init as initSuccess will be false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will basically not trigger again in sync is ran again by any other function. I have updated the logic how it will be set and reset based on the state of the logic.
mobile/lib/db/upload_locks_db.dart
Outdated
@@ -118,6 +127,15 @@ class UploadLocksDB { | |||
PRIMARY KEY (${_partsTable.columnObjectKey}, ${_partsTable.columnPartNumber}) | |||
) | |||
''', | |||
''' | |||
CREATE TABLE IF NOT EXISTS ${_streamUploadErrorTable.table} ( | |||
${_streamUploadErrorTable.columnID} INTEGER PRIMARY KEY, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason for adding separate id? Why can't we just use uploadedFileID as the primary key?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok It's fine to remove that.
@@ -29,6 +29,12 @@ class FileDataService { | |||
_prefs = prefs; | |||
} | |||
|
|||
void appendPreview(int id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you document what this method does and why do we need it? Unable to infer quickly while looking that the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have documented, let me know if it seems fine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood. Don't we have objectID and size information avoid at this point? If yes, why not just append that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, we do have that info as it is just uploaded.
mobile/android/gradle.properties
Outdated
@@ -1,3 +1,4 @@ | |||
org.gradle.jvmargs=-Xmx4608m | |||
android.useAndroidX=true | |||
android.enableJetifier=true | |||
android.enableR8.fullMode=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add an comment here why this is disable, with may be some references for relevant Github Issues. So that in future, if someone revisits this, they will have some context.
class PreviewVideoStore { | ||
final LinkedHashMap<int, PreviewItem> _items = LinkedHashMap(); | ||
LinkedHashMap<int, PreviewItem> get previews => _items; | ||
late Set<int> _failureFiles; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to either define this as emptySet or nullable.
Ideally, late variables should be initialized in the construction phase. Otherwise there's a risk of running into late variable not initialized error
mobile/lib/db/upload_locks_db.dart
Outdated
await db.insert( | ||
_streamUploadErrorTable.table, | ||
{ | ||
_streamUploadErrorTable.columnUploadedFileID: uploadedFileID, | ||
_streamUploadErrorTable.columnErrorMessage: errorMessage, | ||
_streamUploadErrorTable.columnLastAttemptedAt: | ||
DateTime.now().millisecondsSinceEpoch, | ||
}, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's specify the conflict resolution here. insertOrReplace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
insertOrReplace is not a method.
d14e4b1
to
ebab9fd
Compare
Description
Now the player decision logic is:
The UseMediaKitEvent is still there in case of any error or if user long presses on that button (android) for original source.
Tests