-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
Video files in album cause server error #1075
Comments
|
The problem occurs, because the This unfortunate design has evolved historically, because support for video has been added much later to Lychee and the way how videos are supported always feels a little bit "hack-ish". I have already found many of those issues and corrected them, while I was heavily re-factoring the core part of Lychee. In particular, I added a lot of type hints and non-null checks into the code, because if those issues. I actually wonder, if the bug might be gone with PR #1055.
@ildyria Totally correct. In the current master, there are still a lot of this kind of checks and corrected quite a few of them in my current PR. |
Yeah, that's definitely a bug, and a relatively new one at that, I think. The code is not supposed to assume that the duration or frame rate of videos are known, as they are dependent on optional external binaries such as All I can say is that it "used to work"... |
Fixed with #1113 |
Detailed description of the problem
Albums with videos weren't shown, but caused an internal server error. The log reads:
This points to the following line of code, which rounds the value of "focal" for videos:
Lychee/app/Models/Extensions/PhotoCast.php
Lines 71 to 72 in a385767
In my case, the value for focal was an empty string for all videos. (Basically all my photos/videos are synced from an iPhone to Nextcloud and then imported to Lychee, using cmdline sync operation, from the Nextcloud files.)
Not sure what it is that should be fixed - focal always containing a number, or the above code not relying on focal being a number.
For now, a simple work-around solved the issue for me:
(Caution for others: I had not videos with any value set in focal. If you have, you should probably add
and focal = ''
to the query.)Steps to reproduce the issue
Output of the diagnostics
Browser and system
Firefox 90.0.2 on mac OS 11.4
The text was updated successfully, but these errors were encountered: