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:
parent
ec72d8bf3d
commit
29e878a1ec
|
@ -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 = \
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue