TheAMM
a92d886b5c
Name fixes, DRY
2018-02-02 20:39:02 +01:00
nyaadev
fd0a02b95c
Move bencoded info dicts from mysql torrent_info table to info_dict directory. DB change!
...
IMPORTANT!!! Make sure to run utils/infodict_mysql2file.py before upgrading the database.
2018-02-02 20:39:02 +01:00
Anna-Maria Meriniemi
3941a0b9b3
Quick and dirty comment list for moderators to look at ( #421 )
2017-12-04 15:51:31 +02:00
TheAMM
faf7548cd0
Convert edited timestamp to local time
2017-11-10 05:50:50 +02:00
Shane
72c997173c
[Schema+config change] Comment editing ( #396 )
...
* Comment editing
* Optional time limit for comment editing
2017-11-05 16:26:30 +02:00
Nicolas F
19eaa2c532
Fix timezone awareness for account creation time ( #378 )
2017-10-06 22:36:13 +03:00
Anna-Maria Meriniemi
1e5f61ddf7
[Config change] Require recaptcha of new uploaders ( #376 )
...
* Reorganize config.example.py, add ACCOUNT_RECAPTCHA_AGE
* Require new accounts to pass recaptcha on upload
Based on ACCOUNT_RECAPTCHA_AGE in config.
2017-10-04 16:05:35 -07:00
nyaadev
2e6e924247
fix pep8 error message
2017-09-19 01:16:34 +02:00
nyaadev
89590c91bb
Add ascii check in User.by_username to fix mysql errors
2017-09-18 13:28:15 +02:00
A nyaa developer
f8a314df4f
Better bans ( #341 )
...
* better bans
* put jinja2 template into correct file
2017-08-25 18:53:35 -04:00
nyaadev
0bcd782695
Minor improvements
2017-08-15 01:41:31 +02:00
nyaadev
d5b8a3a2ae
Increase maximum comment size from 255 to 1024.
...
DB change: Change comment text field from VARCHAR(255) to mysql.TEXT
2017-08-14 19:08:36 +02:00
A nyaa developer
e728ca1818
Expose soft delete to users and allow reuploading of deleted torrents. ( #331 )
...
Add banning torrents for moderators which disallows reuploading.
New delete UI.
2017-08-05 15:41:59 -04:00
Kfir Hadas
87dd95f1e0
Refactor into an app factory [2 of 2] ( #322 )
...
* Replace all `from nyaa import app` imports with `app = flask.current_app` (or `from flask import current_app as app` where possible)
* Add a separate config object for top-level and class statements as `nyaa.extensions.config`
Required because those codes don't have app context at the time of evaluation/execution.
* Remove `routes.py` file and register all blueprints in `nyaa/__init__.py`
* Refactor `nyaa/__init__.py` into an app factory
* Update tools
* Update tests (temporary, will be replaced)
2017-08-01 21:02:08 +03:00
Kfir Hadas
0181d6cb33
Prepare for app factory [1 of 2] ( #315 )
...
* Move db, assets, debug toolbar and fix_paginate into nyaa.extensions
* Change all `from nyaa import db` imports to `from nyaa.extensions import db`
* Move `nyaa.torrents.create_magnet_from_es_info` context processor into template-utils blueprint
* Fix tools (wrap in `with app.app_context():` where needed)
2017-07-30 20:35:16 +03:00
Anna-Maria Meriniemi
1bc36c5a17
[Schema change] Add webseed support (BEP-19) ( #317 )
...
Store webseeds in Trackers table with is_webseed flag
Adjusts torrent creation accordingly
2017-07-30 00:00:39 +03:00
Kfir Hadas
b992467dad
Apply isort & flake8 ( #312 )
...
* Update isort settings
* Apply import sorting (isort) on all files in nyaa/
* Fixed Flake8 errors in nyaa/ (see PR for list)
* Add isort to lint.sh and requirements.txt
2017-07-28 20:01:19 +03:00
Kfir Hadas
99c052c85f
Tiny code reformat
2017-07-27 23:29:25 +03:00
Kfir Hadas
42725d4a3c
Hotfix Gravatar
2017-07-27 23:17:06 +03:00
Kfir Hadas
ab6193d01d
Update Gravatar ( #313 )
...
* Update help.html with a section about user avatars
* Update Gravatar implementation to use the rating feature
2017-07-27 16:03:13 -04:00
mreweilk
b51045503d
Fix banned display on selection box
2017-07-16 14:19:20 -04:00
Matt Kliewer
708e0da5a1
Add logging to report view and add option to disable (ban) a user for superadmins
2017-07-09 18:07:31 -05:00
mreweilk
dd8cb4757e
Admin Log 2.0 ( #283 )
...
* Admin log added
* Add admin log to top bar
* Fixed some admin log bugs
* Remove comment_id column because comments die when they are killed
* Fix tabs in admin log template
* Fixed sort of admin logs to be created_time desc
* Fix navbar wrapping to a new line
when 992px <= width <= 1200px
* Put reports and admin log in "Admin" dropdown
Applied ./lint.sh fixes
Fixed long lines
* Updated log to be text instead of id based to account for future deletions
* Small fix in log message formatting
2017-07-04 23:13:59 -05:00
Kfir Hadas
3165389d52
Fix lint check + update lint script ( #224 )
...
* Fix PEP8 E301 on nyaa/models.py
* Add utils/ to lint checker
* Run of lint.sh + manual fixes
As suggested https://github.com/nyaadevs/nyaa/pull/157#issuecomment-305051428
* Fix backwards tick in README
* Updated script
* Update Travis config
2017-06-01 06:40:33 -05:00
TheAMM
051f3f38d2
Clean up Torrent flag properties
2017-05-30 12:46:27 +03:00
TheAMM
2b331c307e
Optimize MySQL COUNT queries and pagination
...
Also leaves 'Torrent.trackers' as 'select' for the joining, since we don't need it on listings
2017-05-29 18:27:34 +03:00
nyaazi
5dc8bdaf74
For the green
2017-05-29 16:24:45 +03:00
nyaazi
bea63315cd
Merge branch 'master' into reports
2017-05-29 16:20:48 +03:00
Anna-Maria Meriniemi
d65602ee9f
[DB Changes! Read PR!] Merge pull request #196 from nyaadevs/elasticsearch-comment-count
...
Elasticsearch comment count. Read PR #201 as well.
2017-05-27 20:12:43 +03:00
TheAMM
07cf0de6f9
Rewrite site-specific database models into declarative bases
...
This allows us to easily extend the bases into Nyaa and Sukebei models, with working FKs and relationships.
Note: the schema will (should!) otherwise match, however; the following index on Torrent was renamed:
uploader_flag_idx will be <prefix>_uploader_flag_idx, as we will be always creating both flavors.
The index rename should not affect SQA, but will potentially break migrations.
2017-05-27 18:14:39 +03:00
TheAMM
f7ed2c06d3
Jeez fine PEP8 I get it
2017-05-27 18:10:21 +03:00
TheAMM
6c80557e39
SCHEMA CHANGE: Add comment_count to Torrent
...
with a helper function on Torrent to update the count.
2017-05-26 16:08:46 +03:00
nyaazi
5332ba1a49
Merge branch 'master' into reports
2017-05-26 15:25:02 +03:00
Kfir Hadas
ebcf1dc836
PEP8
2017-05-25 09:08:18 +03:00
nyaadev
02c04ce893
order torrent.trackers relation
2017-05-25 00:36:49 +02:00
TheAMM
3a4280ccc5
Redirect searches with an info hash to torrent if found
...
Redirect will not happen on RSS or user page views (/searches).
Adds a helper to models.Torrent to search with a hex hash
Reformats "special search logic"
2017-05-24 17:34:36 +03:00
snowfag
d38f30a7b7
Admins should have same userlevel_str as mods.
2017-05-24 02:18:09 -04:00
nyaadev
020a0871bd
fix #173 and add avatar to mod user info
...
add rank color to username everywhere
some other minor changes
2017-05-24 00:28:17 +02:00
nyaadev
af61e5b1e9
some html + css changes around comments
2017-05-23 02:47:20 +02:00
nyaadev
8ef6e915da
shameful late edit: change comment text collation to utf8mb4
2017-05-23 00:36:53 +02:00
nyaadev
b7144f80f9
Make comments great again.
2017-05-22 23:38:06 +02:00
snowfag
aab3eaccaa
Spruce up comments.
2017-05-22 23:20:52 +02:00
nyaadev
fee55c1792
comments can be added+removed. gravatar for user avatar
2017-05-22 23:20:49 +02:00
Sn0wCrack
c3a637c8eb
Added date column t o comments
2017-05-22 23:19:36 +02:00
Sn0wCrack
6d608ab2f4
Added comments
2017-05-22 23:19:23 +02:00
nyaadev
9af778217b
DB CHANGE: Add uploader ip address to torrent column and show on torrent view page for superadmins.
...
Added migration script!: remove sukebei_ lines if your local db does not have those.
Show users ip address on user page for superadmins.
Rename Admin to Moderator internally.
Moderators can now change user level to trusted.
Superadmins can make users moderator.
Improve changing user level.
2017-05-21 19:12:15 +02:00
nyaazi
92a6074fa2
Merge branch 'master' into reports
2017-05-21 18:48:45 +03:00
TheAMM
752a5a1f95
Clean up models.User.level helpers
2017-05-20 21:59:24 +03:00
nyaazi
04c9ef6685
Redundant query
2017-05-20 15:02:26 +03:00
nyaazi
73c84ce5ec
Remove duplicate reports for already reviewed torrent
2017-05-20 13:58:58 +03:00