-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
nextcloud31Packages.apps.memories: package by hand to remove pre-compiled binaries; nextcloud31Packages.apps.recognize: more cleanup #388067
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
base: master
Are you sure you want to change the base?
Conversation
47204f4
to
0d2df4d
Compare
I tried this in a vm but I get:
Memories - Administration settings - Nextcloud.pdf But this does look cool 🙂 |
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.
Hmm, does this app have enough CLI tooling around, so we could write a VM test for this?
The patching in here and recognize is a little brittle, unfortunately.
Anyways, "requesting changes" until the issue @beardhatcode reported is sorted out.
@SuperSandro2000 , I made a patch that makes a patch that puts makes it use the right paths: beardhatcode@3d0d447 In essence, I manually patch lib/Settings/SystemConfig.php with patch, to get the paths from the nix store. With that it works for me I can now watch my videos transcoded to 480p (anything more is too slow because I do not have a GPU). The patch can likely go into |
0d2df4d
to
25b0de3
Compare
We don't need this as exiftool from us always works.
That should be handles by
You need sizeable amount of pictures (200 IIRC) before it really kicks in. So with just a handful it just sits there and does not much. And not really
|
I didn't really want to make a module for this, so I mostly relied on the upstream fallbacks and patched them to work. I've been using this though https://github.com/NuschtOS/nixos-modules/blob/main/modules/nextcloud.nix#L106-L111 |
I don't really want to do this. Changing the defaults behind the back silently and throwing errors when any of those settings are set can certainly brick your nextcloud mid upgrade, especially in the future with maybe new migrations. 7.5.0 already bricked your nextcloud mid upgrade and required a hotfix to recover. |
And if we only patch the get function? That way no errors are thrown, and we know what keys are overwritten. I think we could make a test for this that just requests the a transcoded video and sees if it returns something. |
We could do that but I am not sure how we should communicate that to the end user. I don't really want to write a test for this. I don't think I will get a reliable test to work. Probably the easiest to just deploy the update locally and see how the admin page behaves after a few cron runs. Without any content I think it just idles anyway and waits for more pictures to be added. |
Wait a second: if we patch the get functions, is that also shown in the admin settings? That would be fine for me. Let me try that later. |
Yes, it is shown in the admin interface. If we do not also patch the set, the user might be able to update it but uppon refresh the nix values will be there again |
This is what I get using the defaults with my patch (and after enabling transcoding, which is off by default) |
bb4d14e
to
91dd9bf
Compare
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.
Nice with the patch file :) , but in its current for this causes a syntax error for me
412121e
to
2c96eb7
Compare
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.
Turns out we also need to set memories.exiftool_no_local
to false.
I suggest to re-add the exception such that it shows up in the logs. If the user sees the failed to set they might look there.
+ // Ignore those paths and always use the nix paths. | ||
+ // We cannot return a proper error message except a 500 here without changing the code to much. | ||
+ if (in_array($key, array("memories.exiftool", "memories.vod.ffmpeg", "memories.vod.ffprobe", "memories.vod.path"))) { | ||
+ return; |
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.
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 really do not want to do that and fill the log app with more logs that are not actionable. I already have way to much noise in there which just exists.
We already have some options which are fixed by nextcloud and reverted on restart. We maybe need to write that somewhere down.
Also when just changing the setting in the admin UI there is no feedback that the request failed. It is logged in the browser console and in the log app.
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.
2c96eb7
to
9453a55
Compare
Also contains another cleanup for recognize from which I copied most of the code.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.