Skip to content

feat: add command-line library refresh capability - #1274

Open
Gvolexe wants to merge 4 commits into
TagStudioDev:mainfrom
Gvolexe:main
Open

Gvolexe wants to merge 4 commits into
TagStudioDev:mainfrom
Gvolexe:main

Conversation

@Gvolexe

@Gvolexe Gvolexe commented Dec 23, 2025

Copy link
Copy Markdown
Contributor
  • Add CliDriver class for non-GUI CLI operations
  • Implement --refresh/-r argument to refresh libraries without GUI
  • Scan directory for new files and add them to the database
  • Proper error handling and logging
  • Include comprehensive documentation
  • Add test suite for CLI refresh functionality

This solves issue #1270 by allowing users to set up automated background refreshes for large libraries without opening the GUI.

Summary

Tasks Completed

  • Platforms Tested:
    • Windows x86
    • Windows ARM
    • macOS x86
    • macOS ARM
    • Linux x86
    • Linux ARM
  • Tested For:
    • Basic functionality
    • PyInstaller executable

- Add CliDriver class for non-GUI CLI operations
- Implement --refresh/-r argument to refresh libraries without GUI
- Scan directory for new files and add them to the database
- Proper error handling and logging
- Include comprehensive documentation
- Add test suite for CLI refresh functionality

This solves issue TagStudioDev#1270 by allowing users to set up automated
background refreshes for large libraries without opening the GUI.
- Add directory type validation to catch incorrect paths early
- Improve exception handling with specific exception types
- Distinguish between expected and unexpected errors in logging
- Better error categorization aids debugging and monitoring
The Library class auto-creates a library if one doesn't exist.
Update test to reflect actual behavior: empty directories are
valid targets for library creation and refresh.

Fixes failing test: test_cli_driver_refresh_invalid_library
@TrigamDev TrigamDev added Type: Feature New feature or request TagStudio: Library Relating to the TagStudio library system Type: File System File system interactions labels Jan 18, 2026
@TrigamDev TrigamDev added the Status: Review Needed A review of this is needed label Mar 1, 2026
@CyanVoxel CyanVoxel added Status: Blocked This issue or pull request is awaiting the outcome of another issue or pull request and removed Status: Review Needed A review of this is needed labels May 9, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Blocked This issue or pull request is awaiting the outcome of another issue or pull request TagStudio: Library Relating to the TagStudio library system Type: Feature New feature or request Type: File System File system interactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants