Carl Schwan
0b9e592796
refactor: Soft remove Emitter from IRootFolder interface
...
Move this to the private implementation in OC, so that using IRootFolder
in apps doesn't require dummy stubs.
This will create a new psalm warnings for users of this method but
considering that this is deprecated for a long time and that it still
works at runtime, this shouldn't cause any issue.
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-06-23 16:11:23 +02:00
Carl Schwan
a213e6bb1d
Merge pull request #61011 from nextcloud/carl/cleanup-preview
...
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Psalm static code analysis / changes (push) Waiting to run
Psalm static code analysis / static-code-analysis (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-security (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-ocp (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-ncu (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-strict (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-summary (push) Blocked by required conditions
fix(preview): First cleanup from filecache and then from preview table
2026-06-23 11:08:57 +02:00
cn-shell
cb8c152ed3
fix(previews): movie preview bug fix, in some case stream reading functions may block indefinitly
...
Signed-off-by: cn-shell <jpsn@foxmail.com>
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-06-11 17:14:54 +02:00
Benjamin Gaussorgues
2b7415ef4d
Merge pull request #60960 from nextcloud/carl/querybuilder-magic-number
...
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Integration sqlite / changes (push) Waiting to run
Integration sqlite / integration-sqlite (master, main, 8.4, main, --tags ~@large files_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, capabilities_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, collaboration_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, comments_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, dav_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, federation_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, file_conversions) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, files_reminders) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, filesdrop_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, guests_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, ldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, openldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, openldap_numerical_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, routing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, setup_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, sharees_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, sharing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, theming_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, videoverification_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite-summary (push) Blocked by required conditions
Psalm static code analysis / changes (push) Waiting to run
Psalm static code analysis / static-code-analysis (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-security (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-ocp (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-ncu (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-strict (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-summary (push) Blocked by required conditions
refactor: Use new IQueryBuilder::MAX_IN_PARAMETERS
2026-06-10 23:09:30 +02:00
Carl Schwan
fc4938c3ed
fix(preview): Better handle errors while migrating previews
...
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-06-08 14:44:01 +02:00
Carl Schwan
c00f82aa82
fix(preview): Don't reuse same query builder for delete query
...
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-06-08 14:44:01 +02:00
Andrey Dyakov
136b88180b
fix(previews): ffprobe hangs
...
Signed-off-by: Andrey Dyakov <adduxa@gmail.com>
2026-06-05 16:06:16 +02:00
Carl Schwan
994565fec7
refactor: Use new IQueryBuilder::MAX_IN_PARAMETERS
...
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-06-03 13:45:29 +02:00
Côme Chilliet
2357612b11
fix: Make sure getNumConcurrentPreviews never returns 0
...
Tests were stuck forever waiting for a semaphore because concurrency was
returning 0. It was previously working by chance because cache of the
value in a static var was leaking through tests.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-02 09:46:20 +02:00
Côme Chilliet
b1f07e887e
fix: Remove static vars in preview Generator
...
There is only one instance so caching in a property is enough.
There were two levels of caching, removed one.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-02 09:46:17 +02:00
Côme Chilliet
1ab09ec753
chore: Apply new coding standard to all files
...
The diff can be checked using: git diff --ignore-all-space --ignore-blank-lines
To see only the changes not related to blank lines.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-01 13:46:39 +02:00
Benjamin Gaussorgues
59d330095d
Merge pull request #58425 from nextcloud/chore/delete-empty-preview-dirs
...
chore(previews): delete empty previews directory during migration
2026-05-11 11:06:06 +02:00
Anna Larch
0681ced203
fix(previews): use createParameter/setParameter to reuse query in chunk loop
...
AI-Assisted-By: claude-sonnet-4-6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 10:32:54 +02:00
Anna Larch
59144ace90
fix(previews): fix chunking for querybuilder
...
Signed-off-by: Anna Larch <anna@nextcloud.com>
2026-05-06 10:32:54 +02:00
David Dreschner
fce8b710df
fix(LocalPreviewStorage): Use correct regex to detect files in nested directory format
...
Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
2026-04-29 15:45:47 +02:00
Ferdinand Thiessen
e0ba4d71b6
chore: add missing Override attribute to OC
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-04-28 21:29:27 +02:00
Joas Schilling
5f80f26799
chore: Fix SPDX header
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2026-03-16 08:38:16 +01:00
Daniel
92cf64f798
Merge pull request #58793 from nextcloud/validatePreviewMimeType
...
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Integration sqlite / changes (push) Waiting to run
Integration sqlite / integration-sqlite (master, 8.4, main, --tags ~@large files_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, capabilities_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, collaboration_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, comments_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, dav_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, federation_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, file_conversions) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, files_reminders) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, filesdrop_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, ldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, openldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, openldap_numerical_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, remoteapi_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, routing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, setup_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, sharees_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, sharing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, theming_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, videoverification_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite-summary (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis (push) Waiting to run
Psalm static code analysis / static-code-analysis-security (push) Waiting to run
Psalm static code analysis / static-code-analysis-ocp (push) Waiting to run
Psalm static code analysis / static-code-analysis-ncu (push) Waiting to run
Psalm static code analysis / static-code-analysis-strict (push) Waiting to run
fix(preview): Validate preview MIME type
2026-03-09 17:20:00 +01:00
Git'Fellow
304c9fbc3b
fix(preview): Validate preview MIME type
...
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2026-03-08 18:57:18 +01:00
Anna Larch
e3c6702cd8
perf(preview): bulk process preview regeneration
...
Signed-off-by: Anna Larch <anna@nextcloud.com>
2026-03-08 11:09:37 +01:00
Benjamin Gaussorgues
6727f83a3b
chore(previews): delete empty previews directory during migration
...
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2026-02-19 11:48:34 +01:00
Benjamin Gaussorgues
30e35a8411
fix(perf): use index when deleting old previews
...
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2026-02-18 17:27:36 +01:00
Carl Schwan
2391d58eb0
Merge pull request #58107 from nextcloud/local-preview-mkdir-exists
...
fix: don't try to create preview folder if it already exists
2026-02-13 15:10:24 +01:00
Carl Schwan
3da621d7fb
Merge pull request #58230 from nextcloud/carl/fix-appdata-scanning
...
fix(preview): Fix files:app-data-scan for previews
2026-02-12 00:57:28 +01:00
Carl Schwan
3d18cd7cc5
fix(preview): Fix files:app-data-scan for previews
...
And add unit tests for both migrated files and non-migrated files
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-02-12 00:26:20 +01:00
Carl Schwan
4722f56778
fix(preview): Handle unique constraints
...
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-02-11 19:56:11 +01:00
provokateurin
fe9e43c165
feat(preview): Expire previews
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-02-10 15:35:38 +01:00
Andy Scherzinger
7da7f50203
Merge pull request #58209 from nextcloud/carl/local-preview-fix
...
fix(preview): Fix scanning preview
2026-02-10 12:38:58 +01:00
Carl Schwan
543b46f3aa
fix(preview): Fix scanning preview
...
Make sure we set the mimetype string representation and not int
representation.
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-02-09 22:49:59 +01:00
Anna Larch
99a1150ec2
fix(snowflake): cast lastId to int
...
Signed-off-by: Anna Larch <anna@nextcloud.com>
2026-02-09 21:36:20 +01:00
provokateurin
f12cecb684
feat(rector): Enable SafeDeclareStrictTypesRector
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-02-09 10:59:31 +01:00
Carl Schwan
c96ece0bcb
refactor: Add more typing
...
- repairs job
- database
- redis
And remove Helpertest which was unused outside of some tests.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-02-06 13:55:39 +01:00
Carl Schwan
7b6078875b
refactor: Run rector on lib/private
...
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-02-06 13:50:18 +01:00
Robin Appelman
2e9f6c37d5
fix: don't try to create preview folder if it already exists
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-02-05 15:22:54 +01:00
Carl Schwan
c6c11d474b
Merge pull request #55649 from nextcloud/carl/on-demand-preview-migration
...
feat(preview): On demand preview migration
2026-01-28 22:33:48 +01:00
Ferdinand Thiessen
4b015568fc
test(preview): properly test postscript preview provider
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-01-28 01:09:27 +01:00
Carl Schwan
7a025ffb0b
feat(preview): Make it possible to disable on preview migration
...
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-14 14:09:07 +01:00
Carl Schwan
6149168129
feat(preview): On demand preview migration
...
When requesting previews, which we don't find in oc_previews, search in
IAppData first before creating them.
Move the logic from MovepreviewJob to PreviewMigrationService and reuse
that in the Preview Generator.
At the same time rename MovePreviewJob to PreviewMigrationJob as it is a
better name.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-01-12 14:20:09 +01:00
Carl Schwan
7c1a8a4060
feat: Adapt a bit the snowflake ids API
...
- Rename setId() -> generateId() in SnowflakeAwareEntity
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-06 12:57:17 +01:00
Anna Larch
5f797ebc32
refactor: move existing usages of snoflake IDs SnowflakeAwareEntity
...
Signed-off-by: Anna Larch <anna@nextcloud.com>
2026-01-06 12:57:17 +01:00
Anna Larch
f546daada7
refactor: Rename Snowflake Generator and Decoder
...
And introduce the Snowflake DTO
Signed-off-by: Anna Larch <anna@nextcloud.com>
2026-01-06 12:57:04 +01:00
Carl Schwan
2ea1bd4cdc
feat(movie-preview): Use getDirectDownloadById for generating preview
...
Allow to speed-up considerably the creation of previews for movies
stored on S3.
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-02 17:13:41 +01:00
invario
ffe91b48dc
feat(previews): allow ffmpeg to connect direct for AWS S3 buckets
...
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: invario <67800603+invario@users.noreply.github.com>
2026-01-02 10:48:39 +01:00
Carl Schwan
06b6a5bc05
fix(preview): Correctly insert preview version
...
Use createNamedParameter otherwise values are not correctly escapted.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-12-17 18:23:53 +01:00
Carl Schwan
247b66c5ee
fix(preview-cleanup): Also delete previews stored in the oc_previews table
...
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-12-10 13:49:24 +01:00
Carl Schwan
503a65ddd0
refactor: Run rector
...
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-11-18 17:45:54 +01:00
Carl Schwan
336cc3fa35
feat(Db): Use SnowflakeId for previews
...
Allow to get an id for the storing the preview on disk before inserting
the preview on the DB.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-28 17:50:03 +01:00
Carl Schwan
1dc363581f
fix: get all available previews on Oracle
...
Split the DB requests in chunk of 1000 and use INNER JOIN instead of IN
as this is better supported on all DB.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-23 14:10:15 +02:00
Carl Schwan
9adf6cce55
fix: Fetching previews on Oracle
...
We need an explicit cast on Oracle as Oracle returns number as string.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-23 09:39:05 +02:00
Carl Schwan
d6889e9220
fix(preview): Fix deleting dummy preview in object store
...
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-22 15:40:26 +02:00