Browse Source

Test disk-speed first time DirectUnpack is called

tags/2.2.0Alpha3
Safihre 8 years ago
parent
commit
0930f0dcee
  1. 51
      po/main/SABnzbd.pot
  2. 1
      sabnzbd/cfg.py
  3. 13
      sabnzbd/directunpacker.py
  4. 2
      sabnzbd/skintext.py

51
po/main/SABnzbd.pot

@ -12,7 +12,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ASCII\n" "Content-Type: text/plain; charset=ASCII\n"
"Content-Transfer-Encoding: 7bit\n" "Content-Transfer-Encoding: 7bit\n"
"POT-Creation-Date: 2017-06-26 10:38+W. Europe Daylight Time\n" "POT-Creation-Date: 2017-07-15 13:06+W. Europe Daylight Time\n"
"Generated-By: pygettext.py 1.5\n" "Generated-By: pygettext.py 1.5\n"
@ -402,11 +402,29 @@ msgid "Unknown Error while decoding %s"
msgstr "" msgstr ""
#: sabnzbd/decoder.py #: sabnzbd/decoder.py
msgid "%s => missing from all servers, discarding" msgid "UUencode detected, only yEnc encoding is supported [%s]"
msgstr "" msgstr ""
#: sabnzbd/decoder.py #: sabnzbd/decoder.py
msgid "UUencode detected, only yEnc encoding is supported [%s]" msgid "%s => missing from all servers, discarding"
msgstr ""
#: sabnzbd/directunpacker.py # sabnzbd/newsunpack.py
#: sabnzbd/newsunpack.py # sabnzbd/newsunpack.py
#: sabnzbd/newsunpack.py
msgid "Unpacking"
msgstr ""
#: sabnzbd/directunpacker.py # sabnzbd/newsunpack.py
msgid "Unpacked %s files/folders in %s"
msgstr ""
#: sabnzbd/directunpacker.py [Warning message]
msgid "Enabled Direct Unpack:"
msgstr ""
#: sabnzbd/directunpacker.py [Warning message] # sabnzbd/skintext.py
msgid "Jobs will start unpacking during the download, reduces post-processing time but requires capable hard drive. Only works for jobs that do not need repair."
msgstr "" msgstr ""
#: sabnzbd/dirscanner.py [Error message] # sabnzbd/dirscanner.py [Error message] #: sabnzbd/dirscanner.py [Error message] # sabnzbd/dirscanner.py [Error message]
@ -748,8 +766,6 @@ msgstr ""
#: sabnzbd/newsunpack.py [Warning message] # sabnzbd/newsunpack.py [Warning message] #: sabnzbd/newsunpack.py [Warning message] # sabnzbd/newsunpack.py [Warning message]
#: sabnzbd/newsunpack.py [Warning message] # sabnzbd/newsunpack.py [Warning message] #: sabnzbd/newsunpack.py [Warning message] # sabnzbd/newsunpack.py [Warning message]
#: sabnzbd/newsunpack.py [Warning message] # sabnzbd/newsunpack.py [Warning message] #: sabnzbd/newsunpack.py [Warning message] # sabnzbd/newsunpack.py [Warning message]
#: sabnzbd/newsunpack.py [Warning message] # sabnzbd/newsunpack.py [Warning message]
#: sabnzbd/newsunpack.py [Warning message] # sabnzbd/newsunpack.py [Warning message]
#: sabnzbd/newsunpack.py [Warning message] #: sabnzbd/newsunpack.py [Warning message]
msgid "Deleting %s failed!" msgid "Deleting %s failed!"
msgstr "" msgstr ""
@ -763,11 +779,6 @@ msgstr ""
msgid "Unpacking failed, archive requires a password" msgid "Unpacking failed, archive requires a password"
msgstr "" msgstr ""
#: sabnzbd/newsunpack.py # sabnzbd/newsunpack.py
#: sabnzbd/newsunpack.py # sabnzbd/newsunpack.py
msgid "Unpacking"
msgstr ""
#: sabnzbd/newsunpack.py # sabnzbd/skintext.py [PP phase "unpack"] #: sabnzbd/newsunpack.py # sabnzbd/skintext.py [PP phase "unpack"]
msgid "Unpack" msgid "Unpack"
msgstr "" msgstr ""
@ -829,10 +840,6 @@ msgstr ""
msgid "Corrupt RAR file" msgid "Corrupt RAR file"
msgstr "" msgstr ""
#: sabnzbd/newsunpack.py
msgid "Unpacked %s files/folders in %s"
msgstr ""
#: sabnzbd/newsunpack.py # sabnzbd/newsunpack.py #: sabnzbd/newsunpack.py # sabnzbd/newsunpack.py
msgid "%s files in %s" msgid "%s files in %s"
msgstr "" msgstr ""
@ -1385,10 +1392,6 @@ msgid "Download failed - Not on your server(s)"
msgstr "" msgstr ""
#: sabnzbd/postproc.py #: sabnzbd/postproc.py
msgid "Cannot create final folder %s"
msgstr ""
#: sabnzbd/postproc.py
msgid "No post-processing because of failed verification" msgid "No post-processing because of failed verification"
msgstr "" msgstr ""
@ -1453,6 +1456,10 @@ msgid "Download Completed"
msgstr "" msgstr ""
#: sabnzbd/postproc.py #: sabnzbd/postproc.py
msgid "Cannot create final folder %s"
msgstr ""
#: sabnzbd/postproc.py
msgid "Post-processing" msgid "Post-processing"
msgstr "" msgstr ""
@ -2961,6 +2968,10 @@ msgid "Automatically sort items by (average) age."
msgstr "" msgstr ""
#: sabnzbd/skintext.py #: sabnzbd/skintext.py
msgid "Direct Unpack"
msgstr ""
#: sabnzbd/skintext.py
msgid "Posts will be paused untill they are at least this age. Setting job priority to Force will skip the delay." msgid "Posts will be paused untill they are at least this age. Setting job priority to Force will skip the delay."
msgstr "" msgstr ""
@ -3856,7 +3867,7 @@ msgstr ""
msgid "Delete" msgid "Delete"
msgstr "" msgstr ""
#: sabnzbd/skintext.py [Job details page, move file to top] #: sabnzbd/skintext.py [Job details page, move file to top] # sabnzbd/skintext.py
msgid "Top" msgid "Top"
msgstr "" msgstr ""
@ -3868,7 +3879,7 @@ msgstr ""
msgid "Down" msgid "Down"
msgstr "" msgstr ""
#: sabnzbd/skintext.py [Job details page, move file to bottom] #: sabnzbd/skintext.py [Job details page, move file to bottom] # sabnzbd/skintext.py
msgid "Bottom" msgid "Bottom"
msgstr "" msgstr ""

1
sabnzbd/cfg.py

@ -143,6 +143,7 @@ backup_for_duplicates = OptionBool('misc', 'backup_for_duplicates', True)
ignore_samples = OptionBool('misc', 'ignore_samples', False) ignore_samples = OptionBool('misc', 'ignore_samples', False)
auto_sort = OptionBool('misc', 'auto_sort', False) auto_sort = OptionBool('misc', 'auto_sort', False)
direct_unpack = OptionBool('misc', 'direct_unpack', False) direct_unpack = OptionBool('misc', 'direct_unpack', False)
direct_unpack_tested = OptionBool('misc', 'direct_unpack_tested', False)
propagation_delay = OptionNumber('misc', 'propagation_delay', 0) propagation_delay = OptionNumber('misc', 'propagation_delay', 0)
folder_rename = OptionBool('misc', 'folder_rename', True) folder_rename = OptionBool('misc', 'folder_rename', True)
folder_max_length = OptionNumber('misc', 'folder_max_length', DEF_FOLDER_MAX, 20, 65000) folder_max_length = OptionNumber('misc', 'folder_max_length', DEF_FOLDER_MAX, 20, 65000)

13
sabnzbd/directunpacker.py

@ -31,6 +31,7 @@ from sabnzbd.misc import int_conv, clip_path, remove_all, globber, format_time_s
from sabnzbd.encoding import unicoder from sabnzbd.encoding import unicoder
from sabnzbd.newsunpack import build_command from sabnzbd.newsunpack import build_command
from sabnzbd.postproc import prepare_extraction_path from sabnzbd.postproc import prepare_extraction_path
from sabnzbd.utils.diskspeed import diskspeedmeasure
if sabnzbd.WIN32: if sabnzbd.WIN32:
# Load the POpen from the fixed unicode-subprocess # Load the POpen from the fixed unicode-subprocess
@ -108,6 +109,9 @@ class DirectUnpacker(threading.Thread):
def add(self, nzf): def add(self, nzf):
""" Add jobs and start instance of DirectUnpack """ """ Add jobs and start instance of DirectUnpack """
if not cfg.direct_unpack_tested():
test_disk_performance()
# Stop if something is wrong # Stop if something is wrong
if not self.check_requirements(): if not self.check_requirements():
return return
@ -352,3 +356,12 @@ def abort_all():
for direct_unpacker in ACTIVE_UNPACKERS: for direct_unpacker in ACTIVE_UNPACKERS:
direct_unpacker.abort() direct_unpacker.abort()
def test_disk_performance():
""" Test the incomplete-dir performance and enable
Direct Unpack if good enough (> 60MB/s)
"""
if diskspeedmeasure(sabnzbd.cfg.download_dir.get_path()) > 60:
cfg.direct_unpack.set(True)
logging.warning(T('Enabled Direct Unpack:') + ' ' + T('Jobs will start unpacking during the download, reduces post-processing time but requires capable hard drive. Only works for jobs that do not need repair.'))
cfg.direct_unpack_tested.set(True)

2
sabnzbd/skintext.py

@ -454,7 +454,7 @@ SKIN_TEXT = {
'opt-auto_sort' : TT('Sort by Age'), 'opt-auto_sort' : TT('Sort by Age'),
'explain-auto_sort' : TT('Automatically sort items by (average) age.'), 'explain-auto_sort' : TT('Automatically sort items by (average) age.'),
'opt-direct_unpack' : TT('Direct Unpack'), 'opt-direct_unpack' : TT('Direct Unpack'),
'explain-direct_unpack' : TT('Start unpacking during download, reduces post-processing time. Requires fast hard drive. Only works for jobs that do not need repair.'), 'explain-direct_unpack' : TT('Jobs will start unpacking during the download, reduces post-processing time but requires capable hard drive. Only works for jobs that do not need repair.'),
'opt-propagation_delay' : TT('Propagation delay'), 'opt-propagation_delay' : TT('Propagation delay'),
'explain-propagation_delay' : TT('Posts will be paused untill they are at least this age. Setting job priority to Force will skip the delay.'), 'explain-propagation_delay' : TT('Posts will be paused untill they are at least this age. Setting job priority to Force will skip the delay.'),
'opt-check_new_rel' : TT('Check for New Release'), 'opt-check_new_rel' : TT('Check for New Release'),

Loading…
Cancel
Save