Commit Graph

594 Commits

Author SHA1 Message Date
Travis Abendshien
275cd1b20e fix(ui): revert all item_thumb "pressed" changes (#742) 2025-01-28 11:00:39 -08:00
Travis Abendshien
ba7e13041b feat: add date columns to the entries table (#740)
* feat: add date_created, date_modified, and date_added columns to entries table

* feat: start storing date_added dates
2025-01-28 01:57:01 -08:00
Travis Abendshien
1ba97d50c2 refactor: change exception log levels to error inside library.py 2025-01-28 01:19:30 -08:00
Travis Abendshien
20d788af29 fix: refactor and fix bugs with missing_files.py (#739)
* 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>
2025-01-27 23:49:39 -08:00
Travis Abendshien
458925fbf7 translations: fix typo in drop import 2025-01-27 12:08:16 -08:00
Travis Abendshien
f96ea6b546 fix: always catch db mismatch (#738)
* fix: always catch db mismatch

* chore: remove/modify log statements

* translations: translate library version mismatch

* style: fix line over col limit
2025-01-27 11:48:57 -08:00
Weblate (bot)
19cdd1bf92 translations: update Czech, Hungarian (#727)
* Translated using Weblate (Czech)

Currently translated at 1.7% (4 of 224 strings)

Added translation using Weblate (Czech)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jirka Čapek <jirkacapek13@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tagstudio/strings/cs/
Translation: TagStudio/Strings

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (224 of 224 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Szíjártó Levente Pál <szijartoleventepal@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tagstudio/strings/hu/
Translation: TagStudio/Strings

---------

Co-authored-by: Jirka Čapek <jirkacapek13@gmail.com>
Co-authored-by: Szíjártó Levente Pál <szijartoleventepal@gmail.com>
2025-01-27 11:48:28 -08:00
Travis Abendshien
2a97a5b3aa perf: add all new library entries at once (#737) 2025-01-27 11:43:04 -08:00
Travis Abendshien
14599e90a3 fix: keep initial id order in get_entries_full() (#736)
* fix: keep initial id order in `get_entries_full()`

* fix: correct variable names
2025-01-27 11:41:01 -08:00
Travis Abendshien
ee14e2c200 fix: search for tag aliases in tag search (#726) 2025-01-27 11:40:06 -08:00
Travis Abendshien
c06f3bb336 feat!: expanded tag color system (#709)
* 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
2025-01-27 11:39:42 -08:00
Travis Abendshien
4c337cb1a3 feat(ui): add thumbnail caching (#694)
* 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
2025-01-27 11:39:10 -08:00
Travis Abendshien
3606edf615 fix: have pydub use known ffmpeg+ffprobe locations (#724)
* fix: have pydub use known ffmpeg+ffprobe locations

* chore: format with ruff
2025-01-26 01:51:15 -08:00
Travis Abendshien
f2a2f9a36d fix: replace calls to translate_qobject with translate_formatted inside TagWidget (#735)
* fix: replace `translate_qobject` calls with `translate_formatted`

* refactor: misc code cleanup
2025-01-26 01:50:36 -08:00
SkeleyM
921a8875de fix(ui): don't always create tag on enter ( #731) 2025-01-24 17:03:39 -08:00
mashed5894
2a41c152b3 fix: restore environment before launching external programs (#707)
* rename promptless_Popen

* linux: restore env before calling popen

* windows: set dll directory to default before calling popen

* ruff formatting suggestions

* edited silent_popen docstring
2025-01-24 13:56:35 -08:00
SkeleyM
0ead238aac fix: restore opening last library on startup (#729) 2025-01-24 13:38:42 -08:00
Travis Abendshien
9116cdc9a5 docs: fix typo in readme 2025-01-23 20:15:54 -08:00
mashed5894
17c62802c0 fix: sort tag results (#721)
* sort search results

* ruff fix
2025-01-23 13:41:57 -08:00
Travis Abendshien
ac6774ed23 fix(ui): don't set frame when playing videos
Fixes some videos not being able to play. The frame setting step was copied from thumbnail rendering and shouldn't be used here regardless.
2025-01-23 00:22:03 -08:00
Travis Abendshien
eb1f634d38 fix: don't add ._ files to libraries 2025-01-23 00:19:35 -08:00
Travis Abendshien
a1ab335dcb translations: fix fr.json syntax error 2025-01-22 16:38:45 -08:00
SkeleyM
89a8abca75 feat(ui): add audio volume slider (#691)
* 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>
2025-01-22 16:07:13 -08:00
Travis Abendshien
a02c43c115 feat(ui): add configurable splash screens (#703)
* refactor: move splash images to resource_manager

* feat(ui): add new splash screen widget

* style: restore old resource manager log style

* fix: scale font size for Segoe UI
2025-01-22 16:02:58 -08:00
Travis Abendshien
857f40f2e3 fix: preview panel + main window fixes and optimizations (#700)
* 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
2025-01-22 16:00:01 -08:00
Travis Abendshien
16fb0290a0 fix: don't add default title field, use proper phrasing for adding files (#701)
* fix: use correct message when adding macros

* fix: no longer add title field to new entries

* fix: use `entries` dialog title instead of `macros`
2025-01-22 15:58:49 -08:00
SkeleyM
441ffce4a3 feat(ui): port "create and add tag" to main branch (#711)
* 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>
2025-01-22 15:56:54 -08:00
mashed5894
778028923e feat(ui): add about section (#712)
* 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>
2025-01-22 15:48:57 -08:00
Weblate (bot)
ea9b57b85f translations: update German, Hungarian, French, Swedish (#697)
* Translated using Weblate (German)

Currently translated at 99.5% (217 of 218 strings)

Co-authored-by: Aaron M <muelleraaron0@users.noreply.hosted.weblate.org>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/tagstudio/strings/de/
Translation: TagStudio/Strings

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (218 of 218 strings)

Translated using Weblate (Hungarian)

Currently translated at 100.0% (216 of 216 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Szíjártó Levente Pál <szijartoleventepal@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tagstudio/strings/hu/
Translation: TagStudio/Strings

* Translated using Weblate (French)

Currently translated at 57.7% (126 of 218 strings)

Co-authored-by: Bamowen <mathieu.monsauret@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/tagstudio/strings/fr/
Translation: TagStudio/Strings

* Translated using Weblate (Swedish)

Currently translated at 34.4% (75 of 218 strings)

Co-authored-by: mashed5894 <mashed5894@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tagstudio/strings/sv/
Translation: TagStudio/Strings

---------

Co-authored-by: Aaron M <muelleraaron0@users.noreply.hosted.weblate.org>
Co-authored-by: Szíjártó Levente Pál <szijartoleventepal@gmail.com>
Co-authored-by: Bamowen <mathieu.monsauret@gmail.com>
Co-authored-by: mashed5894 <mashed5894@gmail.com>
2025-01-22 15:24:04 -08:00
Jann Stute
2a836b0d25 docs: discourage force-pushes on prs that are open for review (#714)
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md
2025-01-19 13:07:40 -08:00
SkeleyM
6ea2c99abb fix: drag and drop no longer resets (#710) 2025-01-17 15:04:13 -08:00
Travis Abendshien
44ff17c0b3 fix: dragging files references correct entry IDs
Fixes #705
2025-01-15 14:23:45 -08:00
Jann Stute
0cdb1a8c06 ui: keyboard navigation for editing tags (#407)
* 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.
2025-01-14 03:19:44 -08:00
Travis Abendshien
5caf869867 docs: update roadmap 2025-01-13 18:41:08 -08:00
Travis Abendshien
604837fcaa fix: store tag.id to variable before using in lambda
This fixes an issue where every tag added from the "+" button had ID 0 (the "Archived" tag).

Co-Authored-By: Jann Stute <46534683+Computerdores@users.noreply.github.com>
2025-01-13 14:42:19 -08:00
Jann Stute
5c8f2c507f feat: optimise AND queries (#679)
* 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
2025-01-13 13:48:02 -08:00
Jann Stute
5bab00aa6d refactor: TagDatabasePanel now inherits from TagSearchPanel for code deduplication (#699)
* refactor: TagDatabasePanel now inherits from TagSearchPanel for code deduplication

* refactor: rename callback method

* extract creation of row items to separate method
2025-01-13 13:46:57 -08:00
Jann Stute
a272b18637 feat: improve performance of "Delete Missing Entries" (#696)
* 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>
2025-01-11 13:26:01 -08:00
Travis Abendshien
fce97852d3 feat!: tag categories (#655)
* 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>
2025-01-11 09:44:09 -08:00
Weblate (bot)
5860a2ca9b translations: update German, Hungarian, Spanish, and Chinese (Traditional Han script) (#677)
* Translated using Weblate (German)

Currently translated at 73.3% (157 of 214 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jann Stute <jann.stute@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/tagstudio/strings/de/
Translation: TagStudio/Strings

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (214 of 214 strings)

Translated using Weblate (Hungarian)

Currently translated at 59.8% (128 of 214 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Szíjártó Levente Pál <szijartoleventepal@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tagstudio/strings/hu/
Translation: TagStudio/Strings

* Translated using Weblate (Spanish)

Currently translated at 63.5% (136 of 214 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Nginearing <142851004+Nginearing@users.noreply.github.com>
Translate-URL: https://hosted.weblate.org/projects/tagstudio/strings/es/
Translation: TagStudio/Strings

* Translated using Weblate (Chinese (Traditional Han script))

Currently translated at 94.8% (203 of 214 strings)

Co-authored-by: Brian Su <brisu@me.com>
Translate-URL: https://hosted.weblate.org/projects/tagstudio/strings/zh_Hant/
Translation: TagStudio/Strings

---------

Co-authored-by: Jann Stute <jann.stute@protonmail.com>
Co-authored-by: Szíjártó Levente Pál <szijartoleventepal@gmail.com>
Co-authored-by: Nginearing <142851004+Nginearing@users.noreply.github.com>
Co-authored-by: Brian Su <brisu@me.com>
2025-01-11 07:05:26 -08:00
Travis Abendshien
d8d61cc8c8 docs: fix broken weblate link in README 2025-01-11 07:03:05 -08:00
Travis Abendshien
fc81c43af1 docs: add a linux install notice (#695)
* docs: add a linux install notice (#689)

* docs: add a linux install notice to readme (#690)

---------

Co-authored-by: Qronikarz <84787215+Qronikarz@users.noreply.github.com>
2025-01-11 07:00:13 -08:00
Jann Stute
3cd56a881f feat: sort by "date added" to library (#674)
* 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
2025-01-10 07:46:23 -08:00
Travis Abendshien
936157c3c2 fix(ui): properly mask macOS icon 2025-01-07 01:17:31 -08:00
Travis Abendshien
c4f4bba5e0 build: update macos bundle identifier and version
Update bundle to use `com.companyname.appname` reverse-domain structure
2025-01-06 11:44:18 -08:00
Travis Abendshien
29c0dfdb2d feat(ui): use tag query as default new tag name 2025-01-05 23:40:41 -08:00
Travis Abendshien
bf03e28fdb ui: update macOS icon 2025-01-05 22:49:58 -08:00
Travis Abendshien
0b6b07d0b4 fix(ui): don't create new QFonts in main_window.py
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.
2025-01-05 21:02:36 -08:00
Travis Abendshien
af760ee61a ui: port splash screen from Alpha-v9.4
Reimplements:
- 7f3b3d06af
- 1e4883c577
- 1c53f05e4f
2025-01-05 19:40:37 -08:00
SkeleyM
c5c86747fe fix: only close add tag menu with no search (#685) 2025-01-05 16:34:55 -08:00