path: root/lib/Multi/
AgeCommit message (Collapse)AuthorFilesLines
2020-07-13Multi::API: Fix harmless Perl warning for entries without imageYorhel1-1/+2
2020-07-12API: Fix JSON type of image_flagging.votecountYorhel1-1/+1
Should be output as an integer rather than a string. Fixes #28.
2020-07-09Multi::API: Fix confusion between vn.c_votecount and images.c_votecountYorhel1-2/+2
2020-07-09API: Deprecate NSFW flags and add image_flagging summaryYorhel1-8/+27
2020-06-15Releases: Allow custom resolutions to be enteredYorhel1-3/+5
The resolution field now works much like the engine field.
2020-04-16API: get ulist: Always return and allow filtering on label 7 (Voted)Yorhel1-2/+2
This allows filtering on (label=7) even when the user has set that label to private and that label will now also be returned with the 'labels' flag. The $ULIST_PUBLIC check in the main query will ensure that only public VNs are included in the results.
2020-04-09Stop keeping track of users/threads/posts count cacheYorhel1-2/+1
Those stats havent been displayed on the site for ages, anyway. The API will now report '0' for these stats.
2020-04-05SQL: Add C-based "vndbid" type and use it for image IDsYorhel1-3/+3
I had already rambled on the current composite type solution in 583ae868dfd3c882a8d2dd40b5d5ed099170c1c2 and I had already explored a few alternatives. This was the one alternative I hadn't yet explored because I wasn't sure the operational complexity was going to be worth it, but after seeing how bad PostgreSQL was at optimizing queries with composite types, I figured I might as well just go with this approach. It improves performance of some queries by a *lot* (especially the image selection query) and it's pretty elegant and convenient to work with. Only downside is the complexity of compiling, installing and maintaining a library for PostgreSQL.
2020-03-12SQL: Use global "images" table for metadata of all images in the DBYorhel1-4/+4
In preparation for an image flagging feature. This replaces the 'screenshots' table. I played around with various implementations of a primary key for the images table; A single integer encoding both the type and id is most efficient, but kind of ugly to work with. Two separate columns are also ugly and force the creation of a separate 'image_type' column on all referencing tables. The current composite type isn't all that much better, but at least it makes it easy to keep treating the image id as a single entity. Old VNDB::* code still treats it as an integer with different namespaces, new VNWeb::* code treats it as a proper composite type.
2020-01-04ulist/API: Fix returning vnlist status=0 instead of buggy nullYorhel1-1/+1
2020-01-01API: Fix "get ulist-labels" and "get ulist labels"Yorhel1-4/+4
Fixes #26
2019-12-30ulist/API: Fix bug with "get wishlist" reporting high prio as mediumYorhel1-1/+1
2019-12-28ulist/API: Make (get|set) (votelist|vnlist|wishlist) commands work with new ↵Yorhel1-38/+77
ulist tables I made an attempt to be as backwards-compatible as possible, but this does introduce some weird and hard-to-fix behavior that didn't exist before. In particular: - Removing a VN from the votelist or wishlist will make it show up on 'get vnlist'. - Removing a VN from the vnlist will also remove it from the votelist and wishlist. - set wishlist status only works if the appropriately-named labels exist. Renaming the converted labels will break and these labels aren't created for new users.
2019-12-19ulist: Update user list with vnlist/votes/wishlist statsYorhel1-3/+11
This adds the users.c_vns and c_wish columns and a function to update the cache. Unlike my previous cache update approaches, I did not use SQL triggers here, as that seemed more complex and less efficient than updating the cache manually. That's not to say that I'm happy with the current approach, but meh... The cache update function is not automatically run for all users, but that could be added to Multi::Maintenance if it turns out that the cached values will not be updated properly in some cases.
2019-12-03API: Add labels field to "set ulist"Yorhel1-1/+15
2019-12-03API: Add "set ulist" commandYorhel1-0/+44
TODO: - Managing labels - Assigning labels to VNs Not yet sure what the API for the latter should look like.
2019-12-03API: Add "get ulist-labels" and "get ulist"Yorhel1-3/+77
To directly query the new list feature. I'll migrate the old vnlist/wishlist/votelist APIs later to query the 'ulist' tables.
2019-10-07API: Add wikidata and pixiv linksYorhel1-5/+12
2019-10-03SQL: Get rid of the users_prefs table, store preferences in users tableYorhel1-6/+6
This bloats the users table a little bit, but that's fine. The main advantage of this change is that we now have a proper schema for user preferences, rather than the schemaless key-value mess we had before. This commit also splits the 'tags_cat' preference up into tags_cont, tags_ero and tags_tech bools, as that's more compact to store and easier to work with. This commit also changes the 'notify_nodbedit' preference to 'notify_dbedit' with inverted meaning. The reason the value was negated in the first place was because the old schemaless approach did not support positive defaults.
2019-09-12Add VNDB::Config module and unified config fileYorhel1-8/+9
This gets rid of, and and uses the cleaner format for the config file. The config is easily accessible from anywhere by importing the new VNDB::Config module; The global $VNDB::S,O,M,ROOT variables have been removed. Sorry for all the churn...
2019-09-12VNDB::Types: Convert medium & resolutionYorhel1-2/+2
2019-09-12VNDB::Types: Convert age_rating and release_typeYorhel1-1/+1
2019-09-12VNDB::Types: Convert producer_typesYorhel1-1/+1
2019-09-11VNDB::Types: Convert platforms into %PLATFORMYorhel1-1/+1
2019-09-11VNDB::Types: Convert languages into %LANGUAGEYorhel1-1/+2
2019-05-16Add password dictionary checkYorhel1-0/+3
This affects the following: - API login with a weak password is disallowed, affected users will have to change their password through the website to continue using the API. - Registration, password reset or password change forms require the new password to not be in the dictionary. - Attempting to log in to the website with a weak password will force-redirect to a password change form, allowing a new password to be set (using the weak-but-still-valid password as check).
2018-10-02DB: Convert resolution into an enumYorhel1-1/+1
Been wanting to do this for a long time - using an integer index into an array that changes once in a while is way too fragile. Doubly so when said indices are also used in filters and URLs that can't be updated every time a new resolution is added.
2018-06-13Multi::API: Add "get characters instances"Yorhel1-1/+17
2018-05-12API: Make username in login command case-insensitiveYorhel1-0/+2
2017-08-14API: Some additions to the "get *list" commandsYorhel1-6/+16
2017-06-21API: Various additionsYorhel1-2/+18
2017-05-25API: Add some hidden checks to staff stuffYorhel1-4/+11
2017-05-22API: Add some flags to query staff/seiyuu dataYorhel1-0/+47
2017-04-28API: Made a start on "get staff" supportYorhel1-0/+75
2017-03-03API: Add traits filter to get characterYorhel1-0/+4
2017-01-25API: Fix Unicode password login + some messagesYorhel1-3/+3
2016-12-04API: Add username filter to "get user" + d11 updatesYorhel1-0/+5
2016-11-27SQL: Use separate role for Multi2.26Yorhel1-25/+24
2016-09-18Suppress silly Perl 5.22 warnings about extra sprintf argsYorhel1-0/+1
2016-09-11API: Add VN relations "official" fieldYorhel1-5/+2
2016-08-31API: Add simple "get user" commandYorhel1-4/+24
2016-07-31API: Support array mathing in "get character" vn filterYorhel1-0/+1
2016-06-19API: Add "tags" filter to "get vn" + increase throttle throttleYorhel1-4/+8
2016-06-12API: Increase some limits + set custom TCP keepalive valuesYorhel1-3/+15
2016-05-15API: Allow sorting 'get vn' on stats fieldsYorhel1-1/+4
2016-04-11API: Added "vns" flag and member to "get character"Yorhel1-0/+9
2016-01-29Multi::API: added 'screens' flag to 'get vn'Yorhel1-0/+18
2016-01-16L10N: Intern languages/platforms/resolutions/media/ptype/rtype/vnlengthYorhel1-4/+4
2015-12-29Multi::API: Add support for TLSYorhel1-8/+23
2015-11-01Removed support for sha256-hashed passwordsYorhel1-5/+1
They had to be deleted from the database at some point, otherwise we still have thousands of easily-cracked password hashes in the database. Note that I could have opted to use scrypt on top of the sha256 hashes so the passwords would remain secure without needing to reset everything, but doing that after one year of switching to scrypt is likely not worth it. Everyone who still actively uses his account has already been converted to scrypt, everyone else should just reset their password whevener they decide to come back.