Fis SMIL files not being removed when removing TTS narration

This commit is contained in:
Kovid Goyal 2024-10-25 14:53:14 +05:30
parent 5d7c6937de
commit 2ea2460753
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -434,6 +434,7 @@ def remove_embedded_tts(container):
smil_href = smil_item.get('href') smil_href = smil_item.get('href')
if smil_href: if smil_href:
smil_name = container.href_to_name(smil_item.get('href'), container.opf_name) smil_name = container.href_to_name(smil_item.get('href'), container.opf_name)
media_files.add(smil_name)
smil_root = container.parsed(smil_name) smil_root = container.parsed(smil_name)
for ahref in smil_root.xpath('//*[local-name() = "audio"]/@src'): for ahref in smil_root.xpath('//*[local-name() = "audio"]/@src'):
aname = container.href_to_name(ahref, smil_name) aname = container.href_to_name(ahref, smil_name)