Update subgen.py
This commit is contained in:
@@ -780,13 +780,16 @@ def get_jellyfin_admin(users):
|
||||
|
||||
def has_audio(file_path):
|
||||
try:
|
||||
if has_image_extension(file_path):
|
||||
logging.debug("{file_path} is an image, skipping processing")
|
||||
return False
|
||||
with av.open(file_path) as container:
|
||||
if has_image_extension(file_path):
|
||||
return False
|
||||
return any(stream.type == 'audio' for stream in container.streams)
|
||||
except (av.AVError, UnicodeDecodeError):
|
||||
return False
|
||||
|
||||
|
||||
|
||||
def path_mapping(fullpath):
|
||||
if use_path_mapping:
|
||||
logging.debug("Updated path: " + fullpath.replace(path_mapping_from, path_mapping_to))
|
||||
|
||||
Reference in New Issue
Block a user