summaryrefslogtreecommitdiff
path: root/lib/Multi/API.pm
AgeCommit message (Collapse)AuthorFilesLines
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 conf.pl config fileYorhel1-8/+9
This gets rid of global.pl, config.pl and config3.pl and uses the cleaner config3.pl 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
https://vndb.org/t3599.201
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.
2015-10-21SQL: Fix Multi to use the new DB schemaYorhel1-88/+88
That should be the last thing to convert to the new schema.
2015-09-08Multi::API: Set keepalive on sockets to detect dead TCP connectionsYorhel1-0/+1
Hopefully prevents issues like https://vndb.org/t3599.53
2015-07-21Multi::API: Support IPv6Yorhel1-1/+5
This was more trivial than I had expected. I already took ipv6 into account when rewriting the API for AnyEvent (including the use of norm_ip()), so that part was fine. The only part I had to fix was the listening socket, and I had to ensure that the $c->{ip} was correct. The first was easy, and the latter was properly handled by AnyEvent automatically. Looks like AnyEvent automatically 'unpacks' IPv4-mapped IPv6 addresses, so I didn't have to deal with that myself.
2015-07-20Multi::API: Throttle "throttled" error repliesYorhel1-3/+13
This is to save system resources when a misbehaving client keeps sending commands while it's being throttled. It also protects against trivial DoS attacks.
2015-04-29Multi::(API:IRC): Fix some unicode handling issuesYorhel1-2/+2
I forgot that AnyEvent::Handle works with bytes rather than unicode strings, even though that is kind of obvious. I expected that AnyEvent::IRC would automatically handle the conversion between byte strings and Unicode strings, but it doesn't, so that has to be done manually.
2015-04-27Multi::API: Fixed various bugs found while testingYorhel1-4/+7
Ugh I wish I had proper unit tests. Ugh writing proper unit tests is a loooot more work than just doing a bunch of quick manual tests.
2015-04-27Multi::API: Fix bug when querying stuff while logged inYorhel1-1/+1
2015-04-27Multi::API: Fully implement the 'set' command with AnyEventYorhel1-58/+59
2015-04-27Multi::API: Fully implement 'get' command with AnyEventYorhel1-510/+315