Browse Source

Assume Rating feedback if Indexer integration enabled

With the changes in 1.1.0 we now have more indexers in the wild actually use the system, by sending the headers or using the fields in the NZB.
But nowadays very few files have actual audio/video ratings of users, so the main purpose of this feature has evolved to automatically report back if the download failed on the server.
The text is also updated as such, that enabling it will send to the indexer if a download failed, only if it failed.
pull/832/head
Safihre 8 years ago
parent
commit
a70a1e6290
  1. 5
      interfaces/Config/templates/config_switches.tmpl
  2. 1
      sabnzbd/cfg.py
  3. 2
      sabnzbd/interface.py
  4. 2
      sabnzbd/rating.py
  5. 2
      sabnzbd/skintext.py

5
interfaces/Config/templates/config_switches.tmpl

@ -324,11 +324,6 @@
<span class="desc">$T('explain-rating_enable')</span>
</div>
<div class="field-pair">
<label class="config" for="rating_feedback">$T('opt-rating_feedback')</label>
<input type="checkbox" name="rating_feedback" id="rating_feedback" value="1" <!--#if int($rating_feedback) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-rating_feedback')</span>
</div>
<div class="field-pair">
<label class="config" for="rating_host">$T('opt-rating_host')</label>
<input type="text" name="rating_host" id="rating_host" value="$rating_host" />
</div>

1
sabnzbd/cfg.py

@ -113,7 +113,6 @@ req_completion_rate = OptionNumber('misc', 'req_completion_rate', 100.2, 100, 20
rating_enable = OptionBool('misc', 'rating_enable', False)
rating_host = OptionStr('misc', 'rating_host', 'api.oznzb.com')
rating_api_key = OptionStr('misc', 'rating_api_key')
rating_feedback = OptionBool('misc', 'rating_feedback', True)
rating_filter_enable = OptionBool('misc', 'rating_filter_enable', False)
rating_filter_abort_audio = OptionNumber('misc', 'rating_filter_abort_audio', 0)
rating_filter_abort_video = OptionNumber('misc', 'rating_filter_abort_video', 0)

2
sabnzbd/interface.py

@ -1412,7 +1412,7 @@ SWITCH_LIST = \
'pre_check', 'max_art_tries', 'max_art_opt', 'fail_hopeless_jobs', 'enable_all_par',
'enable_recursive', 'no_series_dupes', 'script_can_fail', 'new_nzb_on_failure',
'unwanted_extensions', 'action_on_unwanted_extensions', 'sanitize_safe',
'rating_enable', 'rating_host', 'rating_api_key', 'rating_feedback', 'rating_filter_enable',
'rating_enable', 'rating_host', 'rating_api_key', 'rating_filter_enable',
'rating_filter_abort_audio', 'rating_filter_abort_video', 'rating_filter_abort_encrypted',
'rating_filter_abort_encrypted_confirm', 'rating_filter_abort_spam', 'rating_filter_abort_spam_confirm',
'rating_filter_abort_downvoted', 'rating_filter_abort_keywords',

2
sabnzbd/rating.py

@ -233,7 +233,7 @@ class Rating(Thread):
@synchronized(RATING_LOCK)
def update_auto_flag(self, nzo_id, flag, flag_detail=None):
if not flag or not cfg.rating_enable() or not cfg.rating_feedback() or (nzo_id not in self.nzo_indexer_map):
if not flag or not cfg.rating_enable() or (nzo_id not in self.nzo_indexer_map):
return
logging.debug('Updating auto flag (%s: %s)', nzo_id, flag)
indexer_id = self.nzo_indexer_map[nzo_id]

2
sabnzbd/skintext.py

@ -514,8 +514,6 @@ SKIN_TEXT = {
'opt-rating_api_key' : TT('API Key'),
'opt-rating_host' : TT('Server address'),
'explain-rating_api_key' : TT('This key provides identity to indexer. Check your profile on the indexer\'s website.'),
'opt-rating_feedback' : TT('Automatic Feedback'),
'explain-rating_feedback' : TT('Send automatically calculated validation results for downloads to indexer.'),
'opt-rating_filter_enable' : TT('Enable Filtering'),
'explain-rating_filter_enable' : TT('Action downloads according to filtering rules.'),
'opt-rating_filter_abort_if' : TT('Abort If'),

Loading…
Cancel
Save