Commit Graph

19 Commits

Author SHA1 Message Date
Shyam Sunder 2b9a4ab786 server/net: prevent youtube-dl errors when downloading image links 2021-01-07 08:28:22 -05:00
Shyam Sunder c732e62844 server/net: fix error handling 2021-01-06 10:37:59 -05:00
Shyam Sunder c7461c7f65 server/net: improve youtube-dl functionality, enforce size limits 2021-01-05 17:05:57 -05:00
Shyam Sunder 143f633eaa server/func/webhooks: call webhooks asynchronously 2020-10-06 11:55:09 -04:00
Shyam Sunder 0dd427755b client+server: fix linter issues due to updated pre-commit hooks 2020-09-01 14:07:39 -04:00
Shyam Sunder 4595f9a2aa server: API support for webhooks
Closes #339
2020-08-13 22:41:43 -04:00
Shyam Sunder 57193b5715 client+server: implement code autoformatting using prettier and black 2020-06-06 08:58:23 -04:00
Shyam Sunder ea623449e7 server: format code to flake8 2020-06-05 10:02:18 -04:00
Shyam Sunder 377fe52072 server/posts/upload: refactor youtube-dl caller code to fix some bugs 2020-04-07 15:14:53 -04:00
Shyam Sunder cd6683c2d8 server/posts/upload: make youtube-dl use best format
Fixes #313
2020-04-05 15:21:03 -04:00
Shyam Sunder 2c6434b08d server/posts/upload: limit filesize for uploads through youtube-dl
This will be controlled by the config parameter 'max_dl_filesize'.

TODO: In a future commit, the regular downloader should also respect
this parameter.
2020-04-03 15:32:25 -04:00
Shyam Sunder 99a69333e6 server/posts/upload: Add youtube-dl functionality
allows for video-based posts to be created by using youtube-dl
on the server. Access is controlled with the 'uploads:use_downloader'
permission.
2020-04-03 13:11:54 -04:00
rr- 5681fd11ef server/net: make the user-agent configurable
Fixes #127
2017-03-03 17:27:23 +01:00
rr- ad842ee8a5 server: refactor + add type hinting
- Added type hinting (for now, 3.5-compatible)
- Split `db` namespace into `db` module and `model` namespace
- Changed elastic search to be created lazily for each operation
- Changed to class based approach in entity serialization to allow
  stronger typing
- Removed `required` argument from `context.get_*` family of functions;
  now it's implied if `default` argument is omitted
- Changed `unalias_dict` implementation to use less magic inputs
2017-02-05 16:34:45 +01:00
rr- 0c61e85340 server: fix lint 2016-09-26 22:51:00 +02:00
rr- 71a4ce8764 server/func: handle download errors 2016-09-25 14:52:47 +02:00
rr- 9aea55e3d1 server/general: embrace most of PEP8
Ignored only the rules about continuing / hanging indentation.

Also, added __init__.py to tests so that pylint discovers them. (I don't
buy pytest's BS about installing your package.)
2016-08-14 16:44:03 +02:00
rr- c2bbf7b62c server/general: add assertions 2016-08-14 16:43:04 +02:00
rr- ab493a01b4 server/net: add basic downloader 2016-05-05 13:24:50 +02:00