Browse Source

Warning about bad Unrar was never shown in Glitter

Now it's a proper warning
pull/869/head
Safihre 8 years ago
parent
commit
30f68bd7b9
  1. 9
      SABnzbd.py
  2. 1
      interfaces/Plush/templates/_inc_header.tmpl
  3. 4
      interfaces/smpl/templates/main.tmpl
  4. 16
      sabnzbd/interface.py
  5. 3
      sabnzbd/newsunpack.py

9
SABnzbd.py

@ -431,8 +431,15 @@ def print_modules():
if sabnzbd.newsunpack.RAR_COMMAND: if sabnzbd.newsunpack.RAR_COMMAND:
logging.info("UNRAR binary... found (%s)", sabnzbd.newsunpack.RAR_COMMAND) logging.info("UNRAR binary... found (%s)", sabnzbd.newsunpack.RAR_COMMAND)
# Report problematic unrar
if sabnzbd.newsunpack.RAR_PROBLEM and not cfg.ignore_wrong_unrar():
have_str = '%.2f' % (float(sabnzbd.newsunpack.RAR_VERSION) / 100)
want_str = '%.2f' % (float(sabnzbd.constants.REC_RAR_VERSION) / 100)
logging.warning(T('Your UNRAR version is %s, we recommend version %s or higher.<br />') % (have_str, want_str))
elif not (sabnzbd.WIN32 or sabnzbd.DARWIN):
logging.debug('UNRAR binary version %.2f', (float(sabnzbd.newsunpack.RAR_VERSION) / 100))
else: else:
logging.warning(T('unrar binary... NOT found')) logging.error(T('unrar binary... NOT found'))
if sabnzbd.newsunpack.ZIP_COMMAND: if sabnzbd.newsunpack.ZIP_COMMAND:
logging.info("unzip binary... found (%s)", sabnzbd.newsunpack.ZIP_COMMAND) logging.info("unzip binary... found (%s)", sabnzbd.newsunpack.ZIP_COMMAND)

1
interfaces/Plush/templates/_inc_header.tmpl

@ -102,7 +102,6 @@
<span id="warning_box"><b><a href="${path}status/#tabs-warnings" id="last_warning" title="#echo $last_warning.replace("\n"," ").replace('"',"'") #"><span id="have_warnings">$have_warnings</span> $T('warnings')</a></b></span> <span id="warning_box"><b><a href="${path}status/#tabs-warnings" id="last_warning" title="#echo $last_warning.replace("\n"," ").replace('"',"'") #"><span id="have_warnings">$have_warnings</span> $T('warnings')</a></b></span>
#if $pane=="Main"# #if $pane=="Main"#
#if $new_release#&sdot; <a href="$new_rel_url" id="new_release" target="_blank">$T('Plush-updateAvailable').replace(' ','&nbsp;')</a>#end if# #if $new_release#&sdot; <a href="$new_rel_url" id="new_release" target="_blank">$T('Plush-updateAvailable').replace(' ','&nbsp;')</a>#end if#
#if $warning#&sdot; <a id="warning_message">$warning.replace(' ','&nbsp;')</a>#end if#
#end if# #end if#
</div> </div>
</div> </div>

4
interfaces/smpl/templates/main.tmpl

@ -1255,10 +1255,6 @@ function loadingJSON(){
<option value="0" >$T("none")</option> <option value="0" >$T("none")</option>
</select> </select>
<br />SABnzbd $T('version'): $version | smpl skin</a></p> <br />SABnzbd $T('version'): $version | smpl skin</a></p>
<!--#if $warning#-->
<h2>$T('ft-warning')</h2>
<b>$warning</b><br />
<!--#end if#-->
<!--#if $new_release#--> <!--#if $new_release#-->
<!--#set $msg=$T('ft-newRelease@1')%($new_release)#--> <!--#set $msg=$T('ft-newRelease@1')%($new_release)#-->
<b>$msg <a href="$new_rel_url" target="_blank">SF.net</a></b><br/> <b>$msg <a href="$new_rel_url" target="_blank">SF.net</a></b><br/>

16
sabnzbd/interface.py

@ -61,8 +61,7 @@ from sabnzbd.utils.diskspeed import diskspeedmeasure
from sabnzbd.utils.getperformance import getpystone from sabnzbd.utils.getperformance import getpystone
from sabnzbd.constants import \ from sabnzbd.constants import \
REC_RAR_VERSION, NORMAL_PRIORITY, \ NORMAL_PRIORITY, MEBI, DEF_SKIN_COLORS, DEF_STDINTF, DEF_STDCONFIG, DEF_MAIN_TMPL, \
MEBI, DEF_SKIN_COLORS, DEF_STDINTF, DEF_STDCONFIG, DEF_MAIN_TMPL, \
DEFAULT_PRIORITY DEFAULT_PRIORITY
from sabnzbd.lang import list_languages, set_language from sabnzbd.lang import list_languages, set_language
@ -354,19 +353,6 @@ class MainPage(object):
bytespersec_list = BPSMeter.do.get_bps_list() bytespersec_list = BPSMeter.do.get_bps_list()
info['bytespersec_list'] = ','.join([str(bps) for bps in bytespersec_list]) info['bytespersec_list'] = ','.join([str(bps) for bps in bytespersec_list])
info['warning'] = ''
if cfg.enable_unrar():
version = sabnzbd.newsunpack.RAR_VERSION
if version and version < REC_RAR_VERSION and not cfg.ignore_wrong_unrar():
have_str = '%.2f' % (float(version) / 100)
want_str = '%.2f' % (float(REC_RAR_VERSION) / 100)
info['warning'] = T('Your UNRAR version is %s, we recommend version %s or higher.<br />') % \
(have_str, want_str)
if not sabnzbd.newsunpack.RAR_COMMAND:
info['warning'] = T('No UNRAR program found, unpacking RAR files is not possible<br />')
if not sabnzbd.newsunpack.PAR2_COMMAND:
info['warning'] = T('No PAR2 program found, repairs not possible<br />')
# For Glitter we pre-load the JSON output # For Glitter we pre-load the JSON output
if 'Glitter' in sabnzbd.WEB_DIR: if 'Glitter' in sabnzbd.WEB_DIR:
# Queue # Queue

3
sabnzbd/newsunpack.py

@ -149,9 +149,6 @@ def find_programs(curdir):
version, original = unrar_check(sabnzbd.newsunpack.RAR_COMMAND) version, original = unrar_check(sabnzbd.newsunpack.RAR_COMMAND)
sabnzbd.newsunpack.RAR_PROBLEM = not original or version < 380 sabnzbd.newsunpack.RAR_PROBLEM = not original or version < 380
sabnzbd.newsunpack.RAR_VERSION = version sabnzbd.newsunpack.RAR_VERSION = version
logging.debug('UNRAR binary version %.2f', (float(version) / 100))
if sabnzbd.newsunpack.RAR_PROBLEM:
logging.info('Problematic UNRAR')
# Run check on par2-multicore # Run check on par2-multicore
sabnzbd.newsunpack.PAR2_MT = par2_mt_check(sabnzbd.newsunpack.PAR2_COMMAND) sabnzbd.newsunpack.PAR2_MT = par2_mt_check(sabnzbd.newsunpack.PAR2_COMMAND)

Loading…
Cancel
Save