Commit graph

345 commits

Author SHA1 Message Date
BruebachL
2eba126ed7
Modularize and Doxygen decklist.cpp (#6099) 2025-09-04 22:52:46 -04:00
RickyRister
ab4373d025
Implement replay sharing (#6066)
* new protos

* implement commands on server

* add buttons

* icons

* run formatter

* Message on get replay code failure

* Add new commands to switch statement

* Better failure messages

* Fix permission check query

* Change hash method

* Prevent adding duplicate replays

* Clean up TabReplay ui

* Copy over replay name

* base64 encode the hash

* Shorten hash

* Better failure messages

* change icon back to search icon

* check hash before checking if user already has access

* update share icon

* Update label text
2025-08-24 22:40:44 -04:00
RickyRister
f31d30bf84
[PictureLoader] Remove manual multithreading (#6078) 2025-08-16 20:38:49 -04:00
BruebachL
3e6510b935
Buffer decklists to display until player processing is done instead of reordering player creation. (#6080)
Took 28 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-08-16 20:35:57 -04:00
RickyRister
322fdb14de
Fix segfault when selecting card in replay (#6077) 2025-08-16 14:27:28 -04:00
BruebachL
09381575a7
Add option to share decklists on load. (#6029)
* Add option to share decklists on load.

Took 1 hour 58 minutes

Took 9 minutes


Took 39 minutes

* Lint.

Took 14 minutes


Took 2 minutes

* Stuffs

Took 39 minutes

Took 4 seconds

Took 43 minutes

* Process local player first.

Took 45 minutes

* Consider if the setting is set on the game info first.

Took 4 minutes

* Save an indent level.

Took 43 seconds

* Don't commit logging config.

Took 3 minutes

* Remove a debug print.

Took 10 seconds


Took 7 seconds

* Add another optional guard.

Took 5 minutes

* Hide the tab bar if only one (own deck) is visible.

Took 9 minutes

* Rename setting label for clarity

Took 2 minutes

* Capitalization.

Took 3 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-08-15 17:31:05 -04:00
RickyRister
881243da6a
Refactor TabReplay creation (#6064) 2025-08-15 01:15:02 -04:00
RickyRister
46d65f0b7e
Refactor: rename and consolidate getSpectator (#6067) 2025-08-15 01:13:53 -04:00
RickyRister
03bebbe4c2
Rework card menu handling (#6069)
* extract cardMenu from CardItem

* move cardMenu saving to TabGame

* delete TabGame::updateCardMenu

* move checking to updateCardMenu

* unset activeCard when all cards are unselected
2025-08-15 01:13:28 -04:00
RickyRister
1649f30389
[PictureLoader] Use thread pool instead of creating new thread (#6072)
* delete threads

* Run reply processing in thread pool
2025-08-15 01:11:39 -04:00
BruebachL
38f76d449a
Fix providerId cards getting removed from deckList by convenience replacement function (#6074)
Took 2 hours 25 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-08-15 01:11:02 -04:00
RickyRister
3a42354efd
Refactor: Move files in src/client/game_logic (#6070)
* move abstract_client to src/server

* move key_signals to src/utility
2025-08-07 16:47:48 +02:00
RickyRister
04be0fe634
Refactor: Simplify closeRequest and remove closed signal (#6062)
* Refactor: simplify closeRequest and remove closed signal

* clean up closeRequest usages
2025-08-01 22:45:54 -04:00
RickyRister
e10dd4ef42
Refactor: Don't call stop in TabSupervisor dtor (#6061) 2025-08-01 08:53:06 -04:00
RickyRister
62c02e3fce
Also clear redirect cache when clearing network cache (#6052) 2025-07-29 09:35:09 -04:00
RickyRister
ae2c55c33b
Refactor: use ExactCard to represent specific printings (#6049)
* Create new class

* Update CardInfo and CardDatabase

* Use new class instead of CardInfoPtr

* fix cmake
2025-07-28 21:04:45 -04:00
RickyRister
ae47ee802b
Refactor: Add PrintingInfo::getUuid (#6046) 2025-07-17 09:06:34 -04:00
BruebachL
b9f16e8cce
Refactor replay code in TabGame to replayManager (#6026)
* Refactor replay code to replayManager

* Lint.

* Refresh shortcuts.

Took 13 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-07-16 06:33:48 -04:00
RickyRister
70b4843bc4
Refactor: clean up CardDatabase pt2 (#6042)
* findPrintingWithId

* remove a param

* cleanup up usage of getCardInfo
2025-07-16 06:33:38 -04:00
RickyRister
95190c321c
Refactor: remove second param from CardZone::getCard (#6041) 2025-07-16 05:54:31 -04:00
RickyRister
a9b3be33e0
Refactor: Represent cardName + providerId with CardRef struct (#6039)
* card_ref.h

* update CardDatabase signatures

* make everything compile

* rename methods

* add docs

* mark stuff const

* set cardRef in CardItem

* cleanup

* fix build failure

* Fix builds on mac

---------

Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2025-07-15 22:14:02 -04:00
BruebachL
e05dad4267
Add the option to load decklists from Archidekt, Deckstats, Moxfield, TappedOut in deck editor and lobby (#6030)
* Add the option to load decklists from Archidekt, Deckstats, Moxfield, TappedOut in deck editor and lobby.

Took 3 hours 34 minutes

Took 9 seconds


Took 12 seconds

* Properly set quantities.

Took 11 minutes

* Warnings.

Took 5 minutes

* Static regexes.

Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>

* Category loggings and better warnings.

Took 18 minutes


Took 42 seconds

* use loadFromStream_Plain instead of manually adding CardNodes to the DeckList.

Took 30 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>
2025-07-14 23:12:25 -04:00
BruebachL
ee4ff6e732
Allow more naming schemes for custom pictures (#6021)
* Allow more naming schemes for custom pictures.

Order is cardName_providerId, cardName_setName_collectorNumber, setName-collectorNumber-cardName and then just generically cardName, if the user has decided to override every printing. Most-to-least specific.


Took 2 minutes

Took 8 seconds

* Fixups.

Took 2 minutes

* Even more naming schemes.

Took 6 minutes

* Finally yeet the bug warning in PrintingSelector

Took 3 minutes

* Adjust to PrintingInfo change.

Took 5 minutes

* Don't use suffixes.

Took 7 minutes

Took 9 seconds

* Comments.

Took 2 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-07-14 23:07:03 -04:00
BruebachL
836e168a6c
Properly and consistently capitalize EDHRec (#6027)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-07-09 17:55:04 -04:00
RickyRister
a9684f67cc
Refactor: rename CardInfoPerSet to PrintingInfo (#6024)
* remove unnecessary consts

* removed unused

* rename class

* rename variables and methods

* rename again

* rename variables again

* rename field

* run formatter
2025-07-07 23:41:19 -04:00
RickyRister
686e90d0ed
[PictureLoader] Fix status bar not updating (#6023)
* [PictureLoader] Fix status bar not updating

* rename methods
2025-07-05 23:14:46 -04:00
RickyRister
0b9b39fef7
[PictureLoader] Reduce downtime between load attempts (#6020)
* [PictureLoader] Reduce downtime between load attempts

* rename some stuff

* better comments

* Fix segfault from status bar

Pass just the relevant data through the signals to the status bar, instead of passing the entire Work object.
That way the data is detached from the Work object and we won't segfault when Work self-deletes before status bar tries to use that data.

* Rename method
2025-07-05 22:42:54 -04:00
RickyRister
388db4e995
[PictureLoader] Properly run reply processing on Work's thread (#6016)
* [PictureLoader] Properly run reply processing on Work's thread

* emit cachedImageHit first

* Remove unused fields

* Remove unused fields

* Fix double free requests from cache hit

If we hit a cached url, the request already gets to skip the queue.
By sending another free request once the cached request finishes, we're actually sending two free requests on each cache hit.
2025-07-04 23:01:25 -04:00
RickyRister
ed82106359
[PictureLoader] Fix double-queueing bug (#6014) 2025-07-02 23:08:31 -04:00
BruebachL
2dfe9fcf45
Add as set instance on subsequent loads as well. (#6013)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-07-01 15:29:48 -04:00
BruebachL
f3913949b2
Automatic Card Database Updates (#6004)
* Add the option to background the oracle wizard, add an option to automatically launch oracle wizard in background every X days since last launch.

* Mocks and a typo.

* Lint.

* Lint?

* qOverload the spinBox.

* Change to a prompt instead.

* An Label.

* Update window_main.cpp

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-06-29 22:21:52 -04:00
RickyRister
76fdbfaa2f
[PictureLoader] Dumb hack to fix segfault (#6010) 2025-06-29 22:21:12 -04:00
RickyRister
8615c4c3b0
[PictureLoader] Refactor PictureLoaderWorkerWork (#6009)
* Extract tryLoadImageFromReply

* Make imageIsBlackListed static

* Make picDownloadFailed private
2025-06-25 09:22:51 -04:00
RickyRister
66e44f3448
[PictureLoader] Fix worker leak (#6001) 2025-06-22 18:29:20 -04:00
RickyRister
c1f12f52ae
[PictureLoader] Periodically refresh the local images index (#5997) 2025-06-22 18:25:04 -04:00
RickyRister
34f5552c7d
[PictureLoader] Remove redundant startNextPicDownload calls; clean up (#5998)
* Add docs

* Remove unused signal

* Remove redundant startNextPicDownload

* explicitly emit signals

* delete reply first if able

* Log download fail at warning
2025-06-22 16:19:20 -04:00
BruebachL
53e27ff4d3
Printing Selector Bulk Editor (#5993)
* Bulk editing dialog.

* Bulk editing dialog functionality.

* Performance fixes, hide sets which can't offer any new cards, better dragging indicators.

* Update count label.

* Add a display for modified cards.

* Include long setName in checkbox label

* Fix drag & drop.

* New layout updating?

* Re-layout, add instruction label.

* Qt version check.

* Add buttons to clear and set all to preferred printing.

* tr UI

* Add the button to the print selector instead.

* Qt5 compatibility stuff.

* Qt5 compatibility stuff again.

* Toggled works, I guess.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-06-21 21:15:48 -04:00
RickyRister
6f3a07b756
[PictureLoader] Fix freezes from local image search (#5994)
* [PictureLoader] Fix freezes/crashes from parallel folder search

* fix build failure
2025-06-21 21:10:29 -04:00
RickyRister
6cb4e203f1
Move "show status bar" action under Help menu (#5989) 2025-06-14 11:08:39 -04:00
BruebachL
d5dc70ccee
More granular decklist signals (#5981)
* Performance stuffs.

* Actually make widgets track their indices.

* Functional stuff.

* More display stuff.

* Determine where we will insert the card before actually inserting it in the model.

* Allow overlap layouts to insert widgets at specific positions.

* Modified signals.

* Raise trailing widgets on overlap layout widget insertion.

* Nix the logging config changes.

* Lint.

* Address comments.

* Address comments.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-06-13 13:21:34 -04:00
BruebachL
c388cee1fe
Add a new dialog that allows editing the default suggested tags. (#5979)
* Add a new dialog that allows editing the default suggested tags.

* Lint.

* Actually hand linting, lol.

* Fix Build

* Add dialog.

* Use show() instead of exec(), properly size hint list item widgets.

* Fix... something to do with the build?

* Cast to abstract tab deck editor instead of regular.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2025-06-13 09:16:57 -04:00
RickyRister
da2488f7d8
Add option to hide status bar (#5983)
* reorganize actions

* add setting to settingsCache

* use setting

* add shortcut

* fix typo
2025-06-13 08:55:04 -04:00
BruebachL
f059643187
[Picture Loader] Consider local images, remove some unused variables. (#5985)
* Consider local images, remove some unused variables.

* Move checking for local card images outside of card download loop, add NOT found debug line.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-06-13 08:54:43 -04:00
RickyRister
39df168891
Fix picDownloadFinished not being called on failure (#5982) 2025-06-13 08:46:58 -04:00
RickyRister
7e08f7df67
[VDS] Remove searchFolderName setting (#5970)
* [VDS] Remove searchFolderName setting

* rename property in ExtraDeckSearchInfo
2025-06-12 20:45:01 -04:00
BruebachL
a688a5fe72
[VDD] Filter performance (#5974)
* Sort saved filters by name.

* Optimize performance, allow loading name filters from clipboard.

* Fix include.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-06-12 19:47:03 -04:00
BruebachL
fe57efb1a8
Parallel picture loader (#5977)
* Parallelize picture loader.

* Queue requests instead.

* Include a status bar for the picture loader.

* Save redirect cache on destruction.

* Address comments.

* Let's not overwrite an ambigious variable name.

* Lint.

* Oracle needs the status bar too.

* We actually get a free request if we hit a cached image.

* Fix cmake list.

* toString() the url.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-06-12 19:44:38 -04:00
BruebachL
9af3fbc35f
Propagate display type from visual deck editor to card group display widget correctly on initialization. (#5978)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-06-12 19:37:57 -04:00
RickyRister
7495d2dc65
[VDS] Use display name for generic search expression (#5976) 2025-06-12 19:32:24 -04:00
RickyRister
a5638ccc3b
Parent the "new sets found" dialog (#5948) 2025-05-18 22:06:32 -04:00