* fix: relink unlinked entry to existing entry without sql error (#720)
* edited and added db functions get_entry_full_by_path & merge_entries
* implemented edge case for entry existing on relinking
* added test for merge_entries
* fix: don't remove item while iterating over list
* fix: catch `FileNotFoundError` for unlinked raw files
* refactor: rename methods and variables in missing_files.py
* refactor: rename `missing_files_count` to `missing_file_entries_count`
---------
Co-authored-by: mashed5894 <mashed5894@gmail.com>
* fix: always catch db mismatch
* chore: remove/modify log statements
* translations: translate library version mismatch
* style: fix line over col limit
* attempt at adding `TagColor` table
* store both columns of `TagColor` inside `Tag` table
* fix: fix tag color relationships
* refactor: replace TagColor enums with TagColorGroup system
* ui: derive tag accent colors from primary
* refactor: move dynamic tag color logic, apply to "+" button
* feat(ui): add neon tag colors
* remove tag text color field
* ui: use secondary color for border and text
* ui: add TagColorPreview widget
* feat(ui): add new tag color selector
* ui: add color name tooltips
* ui: tweak tag colors and selector
* feat: add `namespaces` table
* translations: add + update translation keys
* tests: update fixtures
* chore: code cleanup
* ui: add spacing between color groups
* fix: expand refactor to create and add button
* chore: format with ruff
* feat(ui): add thumbnail caching
* feat: enforce total size limit for thumb cache
* fix: add file modification date to thumb hash
This change allows for modified files to have their cached thumbnail regenerated.
* feat: add menu option to clear thumbnail cache
* fix: check if `cached_path` is None further on
* refactor: move configurable cache vars to class level
* docs: complete roadmap items
* feat: use cache size limit from config file
TODO: Store this on a per-library basis and allow it to be configurable inside the program.
* fix: move `last_cache_folder` to class level
* chore: add/tweak type hints
* refactor: use make `CacheManager` a singleton
* Add Volume Slider
* Slider reflects muted state
* Default Volume Value
* Update roadmap to reflect current state
* Forgot a period in a comment
* Add suggestions
* Update tagstudio/src/qt/widgets/media_player.py
Co-authored-by: VasigaranAndAngel <72515046+VasigaranAndAngel@users.noreply.github.com>
* remove unwanted line
---------
Co-authored-by: VasigaranAndAngel <72515046+VasigaranAndAngel@users.noreply.github.com>
* fix: only update file preview when necessary
* fix: don't update thumb from tag_box callbacks
* fix: reset preview panel and filters when loading new library
* fix: clear library state on close; close old library on open
* fix: reset scrollbar position on library close
* Port create & add tag
* Fix Name Conflict
* Add translation keys
* unify uses of BuildTagPanel
* replace tabs with spaces
* Add tag on creation
* Add Suggestions
* Trigger on return
---------
Co-authored-by: bjorn-out <b.g.out@uva.nl>
* added about section to the help menu and modal to display information
* load image through resource manager
* cleaned up about text
* remove visit github repo menu, moved to about modal
* added function to check ffmpeg version
* fixed version formatting
* copied in ffmpeg checker code from v9.4 with a warning message on startup if ffmpeg is not detected
* mypy fixes
* about.content spacing
* about.content title formatting
* added config path to about screen
* ruff fixes
---------
Co-authored-by: Sean Krueger <skrueger2270@gmail.com>
* build_tag modal: make Tag Title selected when opening modal
* build_tag modal: Tab now changes focus when aliases field is in focus
* fix: unpredictable tab order in build tag modal
* feat: implement proper tab order
* ci: fix mypy errors
* fix: merge issue 1
* fix: merge issue 2
* refactor: TagDatabasePanel now inherits from TagSearchPanel for code deduplication
* Revert "refactor: TagDatabasePanel now inherits from TagSearchPanel for code deduplication"
This reverts commit fac589b3e3.
* feat: optimise tag constraint
* feat: use less subqueries
* refactoring: __entry_satisfies_ast was unnecessary
* feat: reduce time consumption of counting total results massively
* feat: log the time it takes to fetch the results
* Revert "feat: reduce time consumption of counting total results massively"
This reverts commit 30af514681.
* feat: log the time it takes to count the results
* feat: optimise __entry_has_all_tags
* refactor: TagDatabasePanel now inherits from TagSearchPanel for code deduplication
* refactor: rename callback method
* extract creation of row items to separate method
* feat: Delete all unlinked entries at once (#617)
This technically removes the usefulness progress indicator, but brief
testing on my end had it delete ~8000 entries in less time than it took
me to see if the progress indicator was properly indeterminate or not
* fix(fmt): remove unused import
* fix: wasn't able to delete more than 32766 entries
* chose: ruff check --fix
* fix: address review comment
---------
Co-authored-by: Tobias Berger <toby@tobot.dev>
* refactor: remove TagBoxField and TagField (NOT WORKING)
* refactor: remove tag field types
* ci: fix mypy and ruff tests
* refactor: split up preview_panel
* fix: search now uses `TagEntry` (#656)
* fix: move theme check inside class
* refactor: reimplement file previews
* refactor: modularize `file_attributes.py`
* ui: show fields in preview panel
known issues:
- fields to not visually update after being edited until the entries are reloaded from the thumbnail grid (yes, the thumbnail grid)
- add field button currently non-functional
- surprise segfaults
* search: remove TagEntry join
* fix: remove extra `self.filter` assignment
* add success return flag to `add_tags_to_entry()`
* refactor: use entry IDs instead of objects and indices
- fixes preview panel not updating after entry edits
- fixes slow selection performance
- fixes double render call
* feat: add tag categories to preview panel
* ui: add "is category" checkbox in tag panel
* fix: tags can be compared for name sorting
* fix: don't add tags to previous selections
* fix: badges now properly update
* ui: hide sizeGrip
* ui: add blue ui color
* ui: display empty selection; better multi-selection
* cleanup comments; rename tsp to tag_search_panel
* fix(ui): properly unset container callbacks
* fix: optimize queries
* fix: catch int cast exception
* fix: remove unnecessary update calls
* fix: restore try/except block in preview_panel
* fix: correct type hints for get_tag_categories
* fix: tags no longer lazy load subtags and aliases
* fix: recursively include parent tag categories
* chore: update copyright info
* chore: remove unused code
* fix: load fields for selected entry
* refactor: remove `is_connected` from AddFieldModal
* fix: include category tags under their own categories
* fix: badges now update when last tag is removed
* fix: resolve differences with main
* fix: return empty set in place of `None`
* ui: add field highlighting, tweak theming
* refactor!: eradicate use of the term "subtag"
- Removes ambiguity between the use of the term "parent tag" and "subtag"
- Fixes inconstancies between the use of the term "subtag" to refer to either parent tags or child tags
- Fixes duplicate and ambiguous subtags mapped relationship for the Tag model
- Does NOT fix tests
* fix: catch and show library load errors
* tests: fix and/or remove tests
* suppress db preference warnings
* tests: add field container tests
* tests: add tag category tests
* refactor(ui): move recent libraries list to file menu
* docs: update roadmap and docs for tag categories
* fix: restore json migration functionality
* logs: remove/update debug logs
* chore: remove unused code
* tests: remove tests related to `TagBoxWidget`
* ui: optimize selection and badge updates
* docs: update usage
* fix: change typo of `tag.id` to `tag_id`
Co-authored-by: Jann Stute <46534683+Computerdores@users.noreply.github.com>
* fix: use term "child tags" instead of "subtags" in docstring
Co-authored-by: Jann Stute <46534683+Computerdores@users.noreply.github.com>
* fix: reference `child_id` instead of `parent_id` when deleting tags
Co-Authored-By: Jann Stute <46534683+Computerdores@users.noreply.github.com>
* add TODO comment for `update_thumbs()` optimization
* fix: combine and check (most) built-in tag data from JSON
Known issue: Tag colors from built-in JSON tags are not updated. This can be seen in the failing test.
* refactor: rename `select_item()` to `toggle_item_selection()`
* add TODO to optimize `add_tags_to_entry()`
* fix: remove unnecessary joins in search
* Revert "fix: remove unnecessary joins in search"
This reverts commit 4c019ca19c.
* fix: remove unnecessary joins in search
* reremove unused method `get_all_child_tag_ids()`
* fix: migrate user-edited tag colors for built-in tags
* style: update header for contributor-created files
* fix: use absolute path in "open file" context menu
* chore: change paramater type hint
---------
Co-authored-by: python357-1 <jb2101554@gmail.com>
Co-authored-by: Jann Stute <46534683+Computerdores@users.noreply.github.com>
* ui: add sorting mode dropdown
* feat: pass sorting mode to Library.search_library
* feat: implement sorting by creation date
* ui: add dropdown for sorting direction
* ui: update shown entries after changing sorting mode / direction
* docs: mark sorting by "Date Created" as completed
* fix: remove sorting options that have not been implemented
* fix: rename sorting mode to "Date Added"
* fix: check off the right item on the roadmap
* feat: translate sorting UI
* fix: address review comments
This fix uses stylesheets instead of initializing new QFonts in the Ui_MainWindow class. This fixes the fonts appearing differently on different OSes, including a fix for text using these QFonts appearing small on macOS. The use of stylesheets also puts the styling in line with how the rest of the program operates.