diff --git a/nyaa/backend.py b/nyaa/backend.py index b8b9926..a9ea97e 100644 --- a/nyaa/backend.py +++ b/nyaa/backend.py @@ -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 = \ diff --git a/utils/api_uploader.py b/utils/api_uploader.py index 5bbb962..5119685 100644 --- a/utils/api_uploader.py +++ b/utils/api_uploader.py @@ -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 = {