mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-12-22 21:40:01 +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
|
torrent.complete = upload_form.is_complete.data
|
||||||
# Copy trusted status from user if possible
|
# Copy trusted status from user if possible
|
||||||
can_mark_trusted = uploading_user and uploading_user.is_trusted
|
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
|
# To do, automatically mark trusted if user is trusted unless user specifies otherwise
|
||||||
if can_mark_trusted:
|
torrent.trusted = upload_form.is_trusted.data if can_mark_trusted else False
|
||||||
torrent.trusted = True
|
|
||||||
if upload_form.is_trusted.data is False:
|
|
||||||
torrent.trusted = False
|
|
||||||
else:
|
|
||||||
torrent.trusted = False
|
|
||||||
|
|
||||||
# Set category ids
|
# Set category ids
|
||||||
torrent.main_category_id, torrent.sub_category_id = \
|
torrent.main_category_id, torrent.sub_category_id = \
|
||||||
|
|
|
@ -121,7 +121,8 @@ metadata={
|
||||||
'is_anonymous' : is_anonymous,
|
'is_anonymous' : is_anonymous,
|
||||||
'is_hidden' : is_hidden,
|
'is_hidden' : is_hidden,
|
||||||
'is_remake' : is_remake,
|
'is_remake' : is_remake,
|
||||||
'is_complete' : is_complete
|
'is_complete' : is_complete,
|
||||||
|
'is_trusted' : is_trusted
|
||||||
}
|
}
|
||||||
|
|
||||||
files = {
|
files = {
|
||||||
|
|
Loading…
Reference in a new issue