Skip to content

Conversation

@onkoe
Copy link
Member

@onkoe onkoe commented Jan 18, 2025

also a lot of other stuff bc i was too lazy to merge before i knew it worked well

onkoe added 30 commits January 14, 2025 22:54
it's just easier tbh. even without the compile-time checks, it's muuuuch cleaner and easier to understand for me.

i think that orms really hurt there so my future work will likely be based on this branch
just to show that it's a SQLite database, instead of being ambiguous
(like Surreal)
this isn't great, as preferably, we'd have the database ensure that media files aren't duplicated

we'll need to do so ourselves, i guess.

nonetheless, this is important because of update-insert rules: you can't have more than one trigger for ON CONFLICT during an INSERT
unsurprisingly, it's a way to describe how something should be inserted into a table.

but really, it's important for eliminating verbosity - especially since we get to use the macro now!
to use `tokio-console` without compiling everything over and over again... :D
idea's been in my head a while
we don't need users to pass that in. just makes things more difficult (makes tokio literally cry)
currently just checks if the database fns actually do metadata lol

and hey! they do :D
for the UUID and "first seen date" on Media, we'll want to save those from the database instead of making new ones each time.

having them as fields on the `MediaBuilder` was a bad call, so now they're gone, to be generated if they don't exist already in the database.

this doesn't yet account for media files that were moved, but checking their hash should help with that later on!
they were split weirdly s.t. it was hard to find them lol
onkoe added 16 commits January 17, 2025 14:12
tbh not sure if i'll keep this going or not. might be a better idea to use UNIX files or whatever the fuck, but they might be hard to connect to!

...could possibly use the name of the test in a hardcoded place?
without them, we're kinda clueless as to where our files came from.
im about to remove this function lol. but it's nice to have it updated for completion's sake
we'll know if we break hashing with this! :D
we no longer model a `Metadata` ty directly in the database! as such, it's weird to have a `model` import for it.
lol that's been there for this whole time?
no need for a folder; it's really not that verbose, surprisingly!
was causing a panic before, after my refactor that i totally havent done yet
we only need one. before, they were all doing the same thing lol
it was pretty awful before, man
@onkoe onkoe merged commit bb48039 into main Jan 18, 2025
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants