Merge branch 'development' into halali

pull/249/head
morpheus65535 6 years ago
commit 1fb0a4078f

@ -45,7 +45,7 @@ If you need something that is not already part of Bazarr, feel free to create a
You can get more in the [screenshot](https://github.com/morpheus65535/bazarr/tree/master/screenshot) directory but it should look familiar:
![Series](/screenshot/series.png?raw=true "Series")
![Series](/screenshot/1-series/series-2-episodes.png?raw=true "Series")
### License

@ -97,7 +97,7 @@ def download_subtitle(path, language, hi, providers, providers_auth, sceneName,
logging.debug('BAZARR ' + str(len(subtitles_list)) + " subtitles have been found for this file: " + path)
if len(subtitles_list) > 0:
try:
pdownload_result = False
download_result = False
for subtitle in subtitles_list:
download_result = p.download_subtitle(subtitle)
if download_result == True:
@ -130,7 +130,7 @@ def download_subtitle(path, language, hi, providers, providers_auth, sceneName,
downloaded_language = language_from_alpha3(result[0].language.alpha3)
downloaded_language_code2 = alpha2_from_alpha3(result[0].language.alpha3)
downloaded_language_code3 = result[0].language.alpha3
downloaded_path = get_subtitle_path(path, language=language_set)
downloaded_path = get_subtitle_path(path, downloaded_language_code2)
logging.debug('BAZARR Subtitles file saved to disk: ' + downloaded_path)
if used_sceneName == True:
message = downloaded_language + " subtitles downloaded from " + downloaded_provider + " with a score of " + unicode(calculated_score) + "% using this scene name: " + sceneName
@ -299,7 +299,7 @@ def manual_download_subtitle(path, language, hi, subtitle, provider, providers_a
downloaded_language = language_from_alpha3(result[0].language.alpha3)
downloaded_language_code2 = alpha2_from_alpha3(result[0].language.alpha3)
downloaded_language_code3 = result[0].language.alpha3
downloaded_path = get_subtitle_path(path, language=lang_obj)
downloaded_path = get_subtitle_path(path, downloaded_language_code2)
logging.debug('BAZARR Subtitles file saved to disk: ' + downloaded_path)
message = downloaded_language + " subtitles downloaded from " + downloaded_provider + " with a score of " + unicode(score) + "% using manual search."

@ -54,10 +54,10 @@ def store_subtitles(file):
encoding = UnicodeDammit(text)
try:
text = text.decode(encoding.original_encoding)
detected_language = langdetect.detect(text)
except Exception as e:
logging.exception('BAZARR Error trying to detect character encoding for this subtitles file: ' + path_replace(os.path.join(os.path.dirname(file), subtitle)) + ' You should try to delete this subtitles file manually and ask Bazarr to download it again.')
else:
detected_language = langdetect.detect(text)
if len(detected_language) > 0:
actual_subtitles.append([str(detected_language), path_replace_reverse(os.path.join(os.path.dirname(file), subtitle))])
@ -106,10 +106,10 @@ def store_subtitles_movie(file):
encoding = UnicodeDammit(text)
try:
text = text.decode(encoding.original_encoding)
detected_language = langdetect.detect(text)
except Exception as e:
logging.exception('BAZARR Error trying to detect character encoding for this subtitles file: ' + path_replace_movie(os.path.join(os.path.dirname(file), subtitle)) + ' You should try to delete this subtitles file manually and ask Bazarr to download it again.')
else:
detected_language = langdetect.detect(text)
if len(detected_language) > 0:
actual_subtitles.append([str(detected_language), path_replace_reverse_movie(os.path.join(os.path.dirname(file), subtitle))])

@ -1,19 +1,12 @@
import os
import sys
import logging
import re
from logging.handlers import TimedRotatingFileHandler
from get_argv import config_dir
from get_settings import get_general_settings
logger = logging.getLogger()
debug = get_general_settings()[4]
if debug is False:
log_level = "INFO"
else:
log_level = "DEBUG"
class OneLineExceptionFormatter(logging.Formatter):
def formatException(self, exc_info):
@ -39,7 +32,12 @@ class NoExceptionFormatter(logging.Formatter):
return ''
def configure_logging():
def configure_logging(debug=False):
if not debug:
log_level = "INFO"
else:
log_level = "DEBUG"
logger.handlers = []
logger.setLevel(log_level)
@ -54,7 +52,7 @@ def configure_logging():
# ch.addFilter(MyFilter())
logger.addHandler(ch)
#File Logging
# File Logging
global fh
fh = TimedRotatingFileHandler(os.path.join(config_dir, 'log/bazarr.log'), when="midnight", interval=1,
backupCount=7)
@ -64,7 +62,7 @@ def configure_logging():
fh.addFilter(BlacklistFilter())
fh.addFilter(PublicIPFilter())
if debug is True:
if debug:
logging.getLogger("apscheduler").setLevel(logging.DEBUG)
logging.getLogger("subliminal").setLevel(logging.DEBUG)
logging.getLogger("git").setLevel(logging.DEBUG)
@ -145,13 +143,3 @@ class PublicIPFilter(logging.Filter):
def empty_log():
fh.doRollover()
def update_settings(debug):
if debug == 'False':
level = "INFO"
else:
level = "DEBUG"
logger.setLevel(level)
for handler in logger.handlers:
handler.setLevel(level)

@ -1,4 +1,4 @@
bazarr_version = '0.6.7.1'
bazarr_version = '0.6.8'
import gc
gc.enable()
@ -23,8 +23,9 @@ update_notifier()
from get_settings import get_general_settings, get_proxy_settings
import logging
from logger import configure_logging, empty_log, update_settings
configure_logging()
from logger import configure_logging, empty_log
configure_logging(get_general_settings()[4])
import requests
if get_proxy_settings()[0] != 'None':
@ -469,6 +470,7 @@ def image_proxy_movies(url):
@route(base_url)
@route(base_url.rstrip('/'))
@custom_auth_basic(check_credentials)
def redirect_root():
authorize()
@ -1130,8 +1132,6 @@ def save_settings():
cfg.set('general', 'only_monitored', text_type(settings_general_only_monitored))
cfg.set('general', 'adaptive_searching', text_type(settings_general_adaptive_searching))
update_settings(settings_general_debug)
if after != before:
configured()
get_general_settings()
@ -1301,6 +1301,8 @@ def save_settings():
with open(config_file, 'wb') as f:
cfg.write(f)
configure_logging(get_general_settings()[4])
notifiers = c.execute("SELECT * FROM table_settings_notifier ORDER BY name").fetchall()
for notifier in notifiers:
enabled = request.forms.get('settings_notifier_' + notifier[0] + '_enabled')

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

@ -1059,9 +1059,6 @@
</div>
<div class="ui dividing header">Subtitles providers</div>
<div class="twelve wide column">
<div class="ui orange message">
<p>Be aware that the more providers you enable, the longer it will take everytime you search for a subtitles.</p>
</div>
<div class="ui grid">
<div class="middle aligned row">
<div class="right aligned four wide column">

@ -337,9 +337,6 @@
</div>
<div class="ui dividing header">Subtitles providers</div>
<div class="twelve wide column">
<div class="ui orange message">
<p>Be aware that the more providers you enable, the longer it will take everytime you search for a subtitles.</p>
</div>
<div class="ui grid">
<div class="middle aligned row">
<div class="right aligned four wide column">

Loading…
Cancel
Save