-
Notifications
You must be signed in to change notification settings - Fork 43
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
Display critical error if Opencast does not provide a video duration #329
Display critical error if Opencast does not provide a video duration #329
Conversation
This pull request is deployed at test.editor.opencast.org/329/2021-05-31_10-44-08/ . |
A critical error for a missing duration seems excessive. What exactly do we need this duration for so desperately? |
The cutting view relies on the duration to determine where the user is setting cut marks in the cutting view, since the backend asks for absolute timestamps. It may be fine to just display an error in the cutting view, since this should not effect other views like metadata. |
This pull request has conflicts ☹ |
…ration-is-missing
This pull request is deployed at test.editor.opencast.org/329/2022-04-21_11-34-24/ . |
This pull request has conflicts ☹ |
…ration-is-missing
This pull request is deployed at test.editor.opencast.org/329/2022-07-06_09-42-30/ . |
@Arnei did you find out why Opencast does not report durations at times? |
I'll have to admit that I do not remember if we ever found out or not. |
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 not yet found a way to test this (to reproduce the null duration), but the code is straight forward and I'm pretty sure it does what the PR says. I only found one thing that could be improved.
And not for "0". Also improve readability of setError([...])
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.
My comments are resolved!
Unfortunately, there is still a type error (see CI)
Maybe that is good indicator for why we shouldn't allow duration to be of type |
This pull request is deployed at test.editor.opencast.org/329/2023-06-12_14-10-05/ . |
Fair, and I strongly agree with not putting null checks everywhere. But I think the fault lies in the structure here. I think the error should not be "thrown" there but rather in line 200 ( To be clear: I don't want to waltz in here, into a project I haven't written code for, and tell yall how to run your business :D Just some information and opinions. Do with that what you will ^_^ |
Do agree that the error should be thrown asap in the line you suggested. Unfortunately that's non-trivial (or at least way more difficult than throwing the error |
This pull request is deployed at test.editor.opencast.org/329/2023-06-12_15-03-47/ . |
This pull request is deployed at test.editor.opencast.org/329/2023-06-12_15-33-36/ . |
The duration return by the backend can be "null". This is not handled by the frontend at all, resulting in an erroneous state.
Now, the critical error page is shown to inform the user that editing is impossible.
Resolves #253 and provides an alternative to #255, as determining the duration in the frontend does not seem to work properly.