Michael Manganiello
eba2971ffb
fix: Simplify query that validates new username already exists
...
Instead of fetching all users and checking if the new username is present
in the list, we can directly query the database for the username.
2024-10-14 01:10:31 -03:00
Ali Scissons
5acbdfdf8b
add offset parameter to get_roms endpoint
2024-10-11 23:28:30 -05:00
Georges-Antoine Assi
9b6b19eb27
Merge branch 'master' into romm-829
2024-09-03 18:58:06 -04:00
Georges-Antoine Assi
ae05c6be8c
[ROMM-1154] fix setting main sibling
2024-09-01 22:11:49 -04:00
Georges-Antoine Assi
efcc2badea
connect to the backend
2024-08-29 18:03:55 -04:00
Georges-Antoine Assi
e4816911d9
Better performance for large collections
2024-08-28 11:44:31 -04:00
Michael Manganiello
a85c84a7d4
misc: Use single SQLAlchemy engine and session maker
...
As recommended by SQLAlchemy [1], this change makes a single
instantiation of the database engine and session maker, instead of one
entity per handler.
It also uses the provided `URL` constructor to better define the
database URL structure.
[1] https://docs.sqlalchemy.org/en/20/core/connections.html#basic-usage
2024-08-21 09:56:28 -03:00
Georges-Antoine Assi
5f0577b900
more cleanup
2024-08-09 00:17:11 -04:00
Georges-Antoine Assi
1ae9cd0b5a
remove unneded code
2024-08-09 00:10:31 -04:00
Georges-Antoine Assi
3a1986f453
single lines for the virtual table
2024-08-08 23:27:31 -04:00
Georges-Antoine Assi
cd54d902a7
create database view for sibling roms
2024-08-08 22:25:50 -04:00
Georges-Antoine Assi
141edf9d2e
Merge pull request #1028 from rommapp/share-public-collections
...
Public collections
2024-07-25 22:38:21 -04:00
Georges-Antoine Assi
ad3a588631
filter collections for each user
2024-07-25 19:53:44 -04:00
Georges-Antoine Assi
92b23656aa
start making collecitons public
2024-07-25 13:49:43 -04:00
Michael Manganiello
2bfc3c4c7e
misc: Refactor scan process by splitting single function
...
This change mainly refactors the `scan_platforms` function, moving part
of its logic to `_identify_platform`, `_identify_firmware`, and
`_identify_rom`.
The logic is simpler this way, each smaller function returns `ScanStats`
that can be merged by the caller, and it simplifies future performance
improvements.
2024-07-25 10:29:46 -03:00
Zurdi
b1f5ae50e5
fixes from PR review
2024-07-06 17:25:08 +02:00
Zurdi
65589393c8
Merge remote-tracking branch 'origin/master' into feature/setup-wizard
2024-07-05 21:13:12 +02:00
Zurdi
ebaa5d6520
fixed filter roms both by platform and collection
2024-07-05 20:59:14 +02:00
Zurdi
7cdc12c7b2
fixed stats and user handler
2024-07-04 23:11:07 +02:00
zurdi
f2f202de9e
add user collections to details
2024-07-04 01:25:44 +02:00
Zurdi
5126c56ba9
get collections for detailed rom info
2024-07-04 00:05:37 +02:00
Zurdi
2a7def81ac
added reactivity to collections
2024-07-03 21:58:58 +02:00
zurdi
59c2a51a6f
added collection cover management
2024-07-03 14:31:17 +02:00
Zurdi
23e0a064ab
added update collection endpoint
2024-07-02 23:34:50 +02:00
zurdi
1d6ba70080
collections get_roms endpoint added
2024-07-02 14:31:27 +02:00
Zurdi
cc9e05f668
collections migration added
2024-07-01 23:47:15 +02:00
Georges-Antoine Assi
7530fdd576
mega refactor of pr
2024-07-01 15:12:07 -04:00
Zurdi
a937b0ddcf
added publicNotes schema
2024-07-01 17:42:23 +02:00
zurdi
15f7522da5
rom db hanlder refactor to adapt to user_rom_props
2024-07-01 15:30:14 +02:00
zurdi
66e185db47
Merge branch 'master' into feature/fav_for_siblings
2024-07-01 08:34:04 +02:00
Georges-Antoine Assi
b7c2350123
Merge branch 'master' into misc/simplify-stat-query-platforms
2024-06-30 20:24:47 -04:00
Georges-Antoine Assi
bffffcc9c3
Merge pull request #969 from adamantike/fix/implement-total-filesize-stat
...
fix: Add implementation for total filesize statistic
2024-06-30 20:00:00 -04:00
Michael Manganiello
bc13e69a5b
misc: Simplify statistics query to retrieve platforms count
...
Instead of counting `Platform` rows, and filtering based on a subquery
in `Rom`, we can simply count the different `platform_id` values in
`Rom`.
2024-06-30 17:55:11 -03:00
Michael Manganiello
b0f834282a
fix: Add implementation for total filesize statistic
...
Add query that calculates total filesize statistic, currently hardcoded
to zero.
2024-06-30 17:40:48 -03:00
Michael Manganiello
8281d5679b
misc: Split database handler logic to get/list entities
...
The current implementation for some of the database handlers, where the
same method is used to retrieve either a single entity (when an `id` is
passed), a list of entities, or `None`, makes the typing and overall
design more complex.
This change simplifies database handlers, by having two separate methods
where appropiate:
* A method that receives an `id`, and returns either an entity, or `None`.
* A method that optionally receives filters, and returns (depending on
the current handler implementation) a list of entities, or a `Select`
object that allows chaining more SQLAlchemy operations.
2024-06-30 13:12:48 -03:00
zurdi
aff4bb65de
add user_rom_props to get_roms
2024-06-30 13:26:50 +02:00
zurdi
4749bf84c6
atomic update user_rom_props
2024-06-30 01:50:08 +02:00
Zurdi
43cd6a8383
added main sibling per user
2024-06-29 14:09:41 +02:00
zurdi
0a0bab6730
migrated rom_notes to user_rom_props
2024-06-29 11:26:16 +02:00
Zurdi
c022e9cef7
added user_rom_props entity
2024-06-29 00:13:28 +02:00
Zurdi
7d9ce05c3c
added main sibling to the front and database
2024-06-27 21:50:04 +02:00
Georges-Antoine Assi
9b62641d55
Merge branch 'master' into trunk-io
2024-05-31 18:42:43 -04:00
Georges-Antoine Assi
39437b52c8
[ROMM-886] Fix fetching all firmware
2024-05-27 21:38:31 -04:00
Georges-Antoine Assi
7635bbeac2
run trunk fixes
2024-05-24 16:59:54 -04:00
Georges-Antoine Assi
b075e93321
Merge branch 'master' into trunk-io
2024-05-24 16:47:19 -04:00
Georges-Antoine Assi
d99c1996ae
use platforms store + fix scan
2024-05-24 12:01:47 -04:00
Georges-Antoine Assi
2d4d1b5ae3
improve roms loading time
2024-05-24 10:14:44 -04:00
Georges-Antoine Assi
ac59fa16eb
hotfix scanning rom_count field
2024-05-24 09:56:41 -04:00
Georges-Antoine Assi
8eddd03665
fix tests
2024-05-23 23:50:41 -04:00
Georges-Antoine Assi
2b1f4e59c9
typo fixes
2024-05-23 23:29:55 -04:00