Commit Graph
58 Commits
Author SHA1 Message Date
REDCODE 5727da5798 refactor(Lactose): await folder lookups in scheduler, jobs API and CreateAlbumsJob 2026-08-21 17:30:36 +02:00
REDCODE 8a4783367a feat(Lactose): make FilesystemBrowseService database access async 2026-08-21 17:30:36 +02:00
REDCODE e279e91f0d refactor(Lactose): make JobScheduler lifecycle and settings seeding async 2026-08-21 17:04:17 +02:00
REDCODE b6386aad98 refactor(asset): rename fs-browse to directory and remove the DB-path browse endpoint
- Rename the filesystem browse route from /api/asset/fs-browse to /api/asset/directory
  (controller route, client URL, REST tests, and service log label).
- Remove the old /api/asset/browse endpoint and its BrowseAssets/GetDirectoryNames
  repository code, plus the client BrowseAsync method. Repoint AlbumAssetPicker's
  admin/curator folder browse to the /directory endpoint.
- Drop the now-unused pg_catalog.split_part DbFunction mapping.
- Refresh .env GIT_VERSION.
2026-08-21 01:00:38 +02:00
REDCODE bfd99c578d chore: drop unused CurrentPath from browse result and refresh GIT_VERSION
AssetBrowseResultDto.CurrentPath was populated but unused by the fs-browse flow.
Remove it from the DTO and FilesystemBrowseService, and refresh the .env GIT_VERSION.
2026-08-20 23:59:26 +02:00
REDCODE 70247200f1 feat(asset): flag folders containing assets without an album in fs-browse
Adds HasUnassignedAssets to directory entries and HasUnassignedFilesHere to
the browse result. The service computes both in a single parameterized
VALUES + EXISTS anti-join over the unique OriginalPath index, using ESCAPE ''
so Windows separator paths survive LIKE semantics.
2026-08-20 18:37:34 +02:00
REDCODE ba66000748 merge: integrate develop (incremental scans, visibility cascade, view-mode search) 2026-08-20 18:03:58 +02:00
REDCODE 87259a02a5 feat(jobs): support deep and folder-scoped scan/discovery runs 2026-08-19 14:10:29 +02:00
REDCODE 3872fb05ed feat: expose converted path and ffmpeg settings in the settings UI
Adds Converted Path and FFmpeg Path to the Paths group and Converted Format
to the Jobs group so the GIF conversion settings are editable in the UI.
Seeds a default Converted Path (cwd/converted) when missing.

Refs #181
2026-08-18 18:21:55 +02:00
REDCODE 6add667ef6 fix: reject empty base path in filesystem browse 2026-08-18 11:15:52 +02:00
REDCODE f940d5603a feat: convert GIFs to mp4 via ffmpeg with first-frame thumbnail
Add ConvertAnimatedJob (EJobType.AnimatedConversion) targeting image/gif
assets: extracts a static WebP first-frame thumbnail and converts the full
animation to mp4/H.264, leaving originals untouched. New ConvertedPath/
ConvertedFormat/FfmpegPath settings, PathUtils extension parameter,
FfmpegRunner helper, and Dockerfile ffmpeg install. Thumbnail/preview
jobs now skip GIFs (handled by the conversion job) and IntegrityCheck
validates converted outputs. Failed conversions are marked broken.

Refs #181
2026-08-18 11:13:48 +02:00
REDCODE 03e4c3e86d feat: add broken-assets report and filesystem browse endpoints
Add GET /api/asset/broken (paginated broken list), POST
/api/asset/broken/retry (clear broken state), and GET
/api/asset/fs-browse which walks the filesystem and looks up DB asset
records by path, replacing the slow DB path-string traversal for the
maintenance page. AssetPreviewDto now carries original path, broken
state, and directory entries carry relative paths.

Refs #180
2026-08-18 11:06:47 +02:00
REDCODE 9607746912 fix: allow manual folder scan when scheduled scan is off
QueueFileSystemCrawl() relied on the 'folders' field which is only
populated when FolderScanEnabled is true. Now falls back to fetching
active folders from the DB when the cached list is empty. Fixes #151.
2026-07-21 14:14:41 +02:00
REDCODE 9d9491253b refactor: clean up imports, simplify checks, and add SearchDropdown component
- Remove unused using directives across C# and Razor files
- Remove unused IServiceProvider from SettingsRepository
- Simplify null/empty string checks in StatsRepository
- Add null-safe navigation for Albums/Tags in stats queries
- Initialize Asset.Hash default to prevent null refs
- Deduplicate AssetIds in AssetPicker
- Add OnStartedWaiting/OnFinishedWaiting/OnProgressChanged to Job
- Add global SearchDropdown component with keyboard nav
- Fix XML doc param mismatches
2026-07-12 20:47:24 +02:00
MrFastwind cb47336230 fix(Lactose): Change to use UtcNow, even if alredy working without timeline 2026-07-08 22:38:05 +02:00
REDCODE 923aaa6865 feat: add CreatePersons and CreateAlbums jobs 2026-07-07 20:33:30 +02:00
REDCODE 970f99db54 fix: wire MaxConcurrentJobs to database setting on startup and runtime changes 2026-07-07 19:56:41 +02:00
REDCODE 96f431fb41 feat: add PreviewJob and upgrade thumbnails to WebP
- Add PreviewJob (WebP) — same master/sub-job pattern as ThumbnailJob
- Convert ThumbnailJob from JPEG to WebP with configurable quality
- Add ThumbnailQuality/PreviewQuality settings (configurable in settings UI)
- Add PreviewSize, ThumbnailFormat, PreviewFormat fields to Asset model
- Add format-aware repo queries for auto-regeneration of stale JPEGs
- Fix MIME types in MediaRepository/MediaController to return image/webp
- Wire PreviewJob into JobScheduler, JobMapper, JobsController
- Expose quality settings on Settings page (Jobs group, range sliders)
- Add 'Make Previews' button on Jobs page, reorder to scan/metadata/thumb/preview/phash/integrity
2026-07-07 19:41:51 +02:00
REDCODE 07fcd05031 feat: masonry gallery on homepage with infinite scroll
- Enrich AssetPreviewDto with ResolutionWidth/Height, HasThumbnail, HasPreview
- Extend GET /api/asset with ?type=&random=true for gallery queries
- Add general GetAssets repository method (type, dates, random, pagination)
- Fix LactoseAuthService.GetUserData to handle unmapped JWT claim names
- Add request-level auth debug logging middleware
- New AssetService (MilkStream.Client) for gallery API calls
- Rewrite Home.razor: CSS column-count masonry, infinite scroll via
  IntersectionObserver JS interop, inline preview overlay with
  progressive loading (preview -> thumbnail fallback), arrow/Esc nav
- Home.razor.css: responsive 2-5 column masonry, overlay styles,
  content-visibility:auto for memory optimization
- Sliding window of 10 pages (300 tiles) with loading=lazy images
- Broken thumbnail fallback to Bootstrap bi-image icon
2026-07-07 15:44:03 +02:00
REDCODE 9f8ec47a15 feat(settings): add JobBatchSize setting for batch job sizing 2026-07-07 12:09:05 +02:00
REDCODE 25ac326d7e fix(phash): display child jobs grouped by status
- Refactor PHashJob to match ThumbnailJob's master/sub-job pattern:
  - return after JobStatus.Fail() so failures stay Failed
  - track failedAssets counter, use CompleteWithErrors
  - descriptive sub-job names (pHash for {path})
  - lock-based sub-jobs list for thread safety
- Fix JobTree.razor: re-fetch children when parent still active
  - OnExpanded invalidates _childrenCache if job is Queued/Running/Waiting
- Fix scope leaks in IntegrityCheckJob and JobScheduler.FetchSettings
- Increase JobRecord.Name to VARCHAR(2048) to prevent truncation
- Add debug logging for sub-job completion tracking
2026-07-06 21:33:53 +02:00
REDCODE 09883c797c feat: implement MetadataJob for image resolution extraction
- Create MetadataJob with master/sub-job pattern (mirrors PHashJob)
- Register MetadataJob in JobMapper.ToJobStatusDto()
- Implement QueueMetadataExtraction in JobScheduler with duplicate guard
- Remove NotImplementedException catch in JobsController
2026-07-06 18:55:03 +02:00
REDCODE eb9f0d14d3 docs: add XML documentation to all public APIs across all projects
Achieves 100% XML doc coverage on non-trivial types with CS1591
enforcement via Directory.Build.props.

Coverage by project:
- Butter: from 6.5% to 100% (DTOs, enums, MIME types)
- Lactose: from ~28% to 100% (controllers, services, repos, jobs, models)
- MilkStream.Client: from ~29% to 100% (all frontend services)

Uses <inheritdoc /> on repository implementations (interfaces
already documented) and full <summary>/<param>/<returns> tags
elsewhere. Enums include member-level docs.
2026-07-06 18:45:21 +02:00
REDCODE 0a9c3ba207 feat: optimize jobs API with pagination, DB persistence, and cleanup
- Split /api/jobs into three endpoints: active roots, paginated past,
  children fetched on expand — reduces response from ~1MB to ~5KB
- Persist completed jobs to PostgreSQL via JobRecord entity + migration
- Add configurable job retention cleanup (hourly timer, default 30 days)
- Fix PHashJob master not persisting (missing Complete() call)
- Add PastJobsResponse DTO to fix case-sensitive JsonElement deserialization
- Refactor JobTree/JobRow for lazy-loaded children via FetchChildren callback
- Handle 401 responses in JwtTokenRefresher with token refresh + retry
- Remove JobChildrenSummary component (replaced by inline parent summary)
2026-07-06 18:17:49 +02:00
ab5e9e7de4 Fix hanging jobs and missing FolderId in FileSystemCrawlJob
Agent-Logs-Url: https://github.com/SamueleLorefice/MilkyShots/sessions/92e2d123-7cee-43cd-ae8f-fe89aa3954ec

Co-authored-by: SamueleLorefice <6562494+SamueleLorefice@users.noreply.github.com>
2026-05-06 03:38:39 +00:00
Samuele Lorefice f31369bea9 Added missing settings and power slider. Broken state 2025-09-05 04:56:53 +02:00
Samuele Lorefice bd18d8f636 Tasks now fail when they fail. 2025-09-04 20:34:03 +02:00
Samuele Lorefice a170025520 Moved to a compatible pgvector db variant, implemented Thumbnails job 2025-09-04 04:59:15 +02:00
REDCODE 28e53eb31b PHash Job implementation 2025-09-03 23:37:56 +02:00
Samuele Lorefice a4747ca417 Front end work on Jobs page 2025-09-03 20:55:57 +02:00
REDCODE 74f3584dd0 FrontEnd work (partial) 2025-09-03 03:45:03 +02:00
REDCODE 1e3a0eae53 Added IntegrityCheck job 2025-09-03 01:02:20 +02:00
Samuele Lorefice b18f294db4 Scaffolded Jobs controller basics 2025-09-02 20:40:16 +02:00
Samuele Lorefice 21d865e654 Fixed crashes on UpdateProgress, reorganized logic for scanner service, fixed scheduler not being able to get hold of the JobManager, JobManager now uses ConcurrentDictionary for thread safe access. 2025-09-02 19:19:44 +02:00
Samuele Lorefice d5148c1722 feat(backend): Added JobScheduler
feat(backend): Added logging to JobManager
feat(API): FolderRepository now exposes FolderAdded / FolderRemoved static events.
2025-09-02 17:35:20 +02:00
Samuele Lorefice 516c4dba61 misc. 2025-08-31 23:46:31 +02:00
Samuele Lorefice a4457a824a fix(API): solved filesystem scanner not scanning 2025-08-31 23:43:03 +02:00
Samuele Lorefice 3bd30dfde9 filesystem scanner troubleshooting 2025-08-31 22:16:17 +02:00
MrFastwind 3de1cd6b14 feat(API): Adds method to modify the FileWatcherService: folders, time 2025-07-30 20:39:56 +02:00
Samuele Lorefice d28b53e793 feat(API): Settings rework
feat(db): extended amount of settings informations stored on the database
feat(frontend): added support for updating the refreshToken after a refresh request.
feat(backend): added a defaultSettings.json file that defines how the settings are initialized.
2025-07-18 20:40:42 +02:00
Samuele Lorefice 5780aaec73 feat: added disposability to some repositories, changed the FileSystemScanner service to be a singleton. 2025-07-16 18:03:15 +02:00
Samuele Lorefice 8bb0741069 fix(Services): Added FileSystem scan service to the startup of the webserver. 2025-07-10 18:50:30 +02:00
Samuele Lorefice 409a32e1d2 fix(FS Service): Added error handling on asset addition
feat(FS Service): Added setting string retrieval from newly added Setting enum
feat(FS Service): Added ability to deactivate the service via settings.
2025-07-10 18:18:44 +02:00
Samuele Lorefice c739c17266 Reworks Settings to be a key/value pair 2025-07-08 20:15:20 +02:00
Samuele Lorefice 54d0cd0343 Added FolderScanInterval to settings 2025-07-08 17:53:04 +02:00
Samuele Lorefice ce7dba34c8 Added implementation to FileSystemScanService 2025-07-08 17:30:26 +02:00
MrFastwind dbdce9d731 feat(Lactose): Adds RefreshToken Endpoint 2025-07-02 17:51:22 +02:00
MrFastwind 1c0ac12e76 feat(Lactose): Adds RefreshToken 2025-07-02 17:49:16 +02:00
MrFastwind 176f33a8a0 chore(API): Removes Redundant Check 2025-06-04 18:05:51 +02:00
Samuele Lorefice 647c5be859 Moved DTOs to external library, referenced the library back into Lactose 2025-05-10 01:57:00 +02:00