Update subgen.py
This commit is contained in:
@@ -606,8 +606,8 @@ def get_jellyfin_admin(users):
|
|||||||
|
|
||||||
def has_audio(file_path):
|
def has_audio(file_path):
|
||||||
try:
|
try:
|
||||||
with av.open(file_path) as container
|
with av.open(file_path) as container:
|
||||||
return any(stream.type == 'audio' for stream in container.streams)
|
return any(stream.type == 'audio' for stream in container.streams)
|
||||||
except (av.AVError, UnicodeDecodeError):
|
except (av.AVError, UnicodeDecodeError):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user