1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 11:29:59 +00:00

fixed api_uploader and reverted backend.py change

This commit is contained in:
aldacron 2017-05-22 00:36:01 -07:00
parent ec72d8bf3d
commit 29e878a1ec
2 changed files with 4 additions and 8 deletions

View file

@ -72,13 +72,8 @@ def handle_torrent_upload(upload_form, uploading_user=None, fromAPI=False):
torrent.complete = upload_form.is_complete.data
# Copy trusted status from user if possible
can_mark_trusted = uploading_user and uploading_user.is_trusted
# Automatically mark trusted if user is trusted unless user specifies it to not be trusted
if can_mark_trusted:
torrent.trusted = True
if upload_form.is_trusted.data is False:
torrent.trusted = False
else:
torrent.trusted = False
# To do, automatically mark trusted if user is trusted unless user specifies otherwise
torrent.trusted = upload_form.is_trusted.data if can_mark_trusted else False
# Set category ids
torrent.main_category_id, torrent.sub_category_id = \

View file

@ -121,7 +121,8 @@ metadata={
'is_anonymous' : is_anonymous,
'is_hidden' : is_hidden,
'is_remake' : is_remake,
'is_complete' : is_complete
'is_complete' : is_complete,
'is_trusted' : is_trusted
}
files = {