diff --git a/audiblez/core.py b/audiblez/core.py index 882aa9b..3953d4b 100755 --- a/audiblez/core.py +++ b/audiblez/core.py @@ -298,7 +298,7 @@ def concat_wavs_with_ffmpeg(chapter_files, output_folder, filename): for wav_file in chapter_files: f.write(f"file '{wav_file}'\n") concat_file_path = Path(output_folder) / filename.replace('.epub', '.tmp.mp4') - subprocess.run(['ffmpeg', '-y', '-f', 'concat', '-i', wav_list_txt, '-c', 'copy', concat_file_path]) + subprocess.run(['ffmpeg', '-y', '-f', 'concat', '-safe', '0', '-i', wav_list_txt, '-c', 'copy', concat_file_path]) Path(wav_list_txt).unlink() return concat_file_path diff --git a/pyproject.toml b/pyproject.toml index 6654791..d47e29c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "audiblez" -version = "0.4.8" +version = "0.4.9" description = "Generate audiobooks from e-books (epub to wav/m4b)" authors = [ { name = "Claudio Santini", email = "hireclaudio@gmail.com" } diff --git a/test/test_main.py b/test/test_main.py index 634eba1..a814fde 100644 --- a/test/test_main.py +++ b/test/test_main.py @@ -33,10 +33,10 @@ class MainTest(unittest.TestCase): url = 'https://archive.org/download/AnimalFarmByGeorgeOrwell/Animal%20Farm%20by%20George%20Orwell.epub' self.base('orwell', url) - def test_italian_pirandello(self): + def test_italian_pirandello_and_filename_with_spaces(self): url = 'https://www.liberliber.eu/mediateca/libri/p/pirandello/cosi_e_se_vi_pare_1925/epub/pirandello_cosi_e_se_vi_pare_1925.epub' - self.base('pirandello', url, voice='im_nicola') - self.assertTrue(Path('pirandello.m4b').exists()) + self.base('pirandello e spazio', url, voice='im_nicola') + self.assertTrue(Path('pirandello e spazio.m4b').exists()) def test_italian_manzoni(self): url = 'https://www.liberliber.eu/mediateca/libri/m/manzoni/i_promessi_sposi/epub/manzoni_i_promessi_sposi.epub'