mirror of https://github.com/morpheus65535/bazarr
Merge branch 'development' into subsync_improvement
# Conflicts: # bazarr/subtitles/tools/subsyncer.py
This commit is contained in:
commit
8da63932d3
|
@ -13,7 +13,7 @@ from bazarr.app.get_args import args
|
|||
|
||||
def check_python_version():
|
||||
python_version = platform.python_version_tuple()
|
||||
minimum_py3_tuple = (3, 7, 0)
|
||||
minimum_py3_tuple = (3, 8, 0)
|
||||
minimum_py3_str = ".".join(str(i) for i in minimum_py3_tuple)
|
||||
|
||||
if int(python_version[0]) < minimum_py3_tuple[0]:
|
||||
|
|
|
@ -35,7 +35,7 @@ def create_app():
|
|||
app.config["DEBUG"] = False
|
||||
|
||||
socketio.init_app(app, path=f'{base_url.rstrip("/")}/api/socket.io', cors_allowed_origins='*',
|
||||
async_mode='threading', allow_upgrades=False, transports='polling')
|
||||
async_mode='threading', allow_upgrades=False, transports='polling', engineio_logger=False)
|
||||
|
||||
@app.errorhandler(404)
|
||||
def page_not_found(_):
|
||||
|
|
|
@ -122,8 +122,8 @@ validators = [
|
|||
Validator('auth.apikey', must_exist=True, default=hexlify(os.urandom(16)).decode(), is_type_of=str),
|
||||
Validator('auth.type', must_exist=True, default=None, is_type_of=(NoneType, str),
|
||||
is_in=[None, 'basic', 'form']),
|
||||
Validator('auth.username', must_exist=True, default='', is_type_of=str),
|
||||
Validator('auth.password', must_exist=True, default='', is_type_of=str),
|
||||
Validator('auth.username', must_exist=True, default='', is_type_of=str, cast=str),
|
||||
Validator('auth.password', must_exist=True, default='', is_type_of=str, cast=str),
|
||||
|
||||
# cors section
|
||||
Validator('cors.enabled', must_exist=True, default=False, is_type_of=bool),
|
||||
|
@ -523,7 +523,7 @@ def save_settings(settings_items):
|
|||
|
||||
if key == 'settings-auth-password':
|
||||
if value != settings.auth.password and value is not None:
|
||||
value = hashlib.md5(value.encode('utf-8')).hexdigest()
|
||||
value = hashlib.md5(f"{value}".encode('utf-8')).hexdigest()
|
||||
|
||||
if key == 'settings-general-debug':
|
||||
configure_debug = True
|
||||
|
|
|
@ -56,7 +56,7 @@ class SubSyncer:
|
|||
try:
|
||||
unparsed_args = [self.reference, '-i', self.srtin, '-o', self.srtout, '--ffmpegpath', self.ffmpeg_path,
|
||||
'--vad', self.vad, '--log-dir-path', self.log_dir_path, '--max-offset-seconds',
|
||||
max_offset_seconds]
|
||||
max_offset_seconds, '--output-encoding', 'same']
|
||||
if not settings.general.utf8_encode:
|
||||
unparsed_args.append('--output-encoding')
|
||||
unparsed_args.append('same')
|
||||
|
|
|
@ -14,7 +14,7 @@ def check_credentials(user, pw, request, log_success=True):
|
|||
ip_addr = request.environ.get('HTTP_X_FORWARDED_FOR', request.remote_addr)
|
||||
username = settings.auth.username
|
||||
password = settings.auth.password
|
||||
if hashlib.md5(pw.encode('utf-8')).hexdigest() == password and user == username:
|
||||
if hashlib.md5(f"{pw}".encode('utf-8')).hexdigest() == password and user == username:
|
||||
if log_success:
|
||||
logging.info(f'Successful authentication from {ip_addr} for user {user}')
|
||||
return True
|
||||
|
|
|
@ -59,7 +59,7 @@ In the project directory, you can run:
|
|||
### `npm start`
|
||||
|
||||
Runs the app in the development mode.
|
||||
Open `http://localhost:3000` to view it in the browser.
|
||||
Open `http://localhost:5173` to view it in the browser.
|
||||
|
||||
The page will reload if you make edits.
|
||||
You will also see any lint errors in the console.
|
||||
|
|
|
@ -98,7 +98,7 @@ class ZimukuProvider(Provider):
|
|||
video_types = (Episode, Movie)
|
||||
logger.info(str(supported_languages))
|
||||
|
||||
server_url = "https://so.zimuku.org"
|
||||
server_url = "https://srtku.com"
|
||||
search_url = "/search?q={}"
|
||||
|
||||
subtitle_class = ZimukuSubtitle
|
||||
|
|
Loading…
Reference in New Issue