mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-23 06:16:36 +08:00
update subliminal_patch to a70f9c0; fixes #334
This commit is contained in:
parent
340862401d
commit
8ed84886f8
2 changed files with 5 additions and 1 deletions
|
@ -559,13 +559,16 @@ def _search_external_subtitles(path, languages=None, only_one=False, scandir_gen
|
||||||
subtitles = {}
|
subtitles = {}
|
||||||
_scandir = _scandir_generic if scandir_generic else scandir
|
_scandir = _scandir_generic if scandir_generic else scandir
|
||||||
for entry in _scandir(dirpath):
|
for entry in _scandir(dirpath):
|
||||||
|
if not entry.name and not scandir_generic:
|
||||||
|
logger.debug('Could not determine the name of the file, retrying with scandir_generic')
|
||||||
|
return _search_external_subtitles(path, languages, only_one, True)
|
||||||
if not entry.is_file(follow_symlinks=False):
|
if not entry.is_file(follow_symlinks=False):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
p = entry.name
|
p = entry.name
|
||||||
|
|
||||||
# keep only valid subtitle filenames
|
# keep only valid subtitle filenames
|
||||||
if not p.lower().startswith(fileroot.lower()) or not p.endswith(SUBTITLE_EXTENSIONS):
|
if not p.lower().startswith(fileroot.lower()) or not p.lower().endswith(SUBTITLE_EXTENSIONS):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
p_root, p_ext = os.path.splitext(p)
|
p_root, p_ext = os.path.splitext(p)
|
||||||
|
|
|
@ -63,3 +63,4 @@ subliminal.refiner_manager.register('drone = subliminal_patch.refiners.drone:ref
|
||||||
subliminal.refiner_manager.register('filebot = subliminal_patch.refiners.filebot:refine')
|
subliminal.refiner_manager.register('filebot = subliminal_patch.refiners.filebot:refine')
|
||||||
subliminal.refiner_manager.register('file_info_file = subliminal_patch.refiners.file_info_file:refine')
|
subliminal.refiner_manager.register('file_info_file = subliminal_patch.refiners.file_info_file:refine')
|
||||||
subliminal.refiner_manager.register('symlinks = subliminal_patch.refiners.symlinks:refine')
|
subliminal.refiner_manager.register('symlinks = subliminal_patch.refiners.symlinks:refine')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue