Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -135,14 +135,6 @@ import shutil
|
|
| 135 |
def convert_cbr_to_cbz(cbr_path):
|
| 136 |
temp_dir = tempfile.mkdtemp()
|
| 137 |
cbz_path = cbr_path.replace('.cbr', '.cbz')
|
| 138 |
-
with zipfile.ZipFile(cbz_path, 'w') as zipf:
|
| 139 |
-
for root, _, files in os.walk(temp_dir):
|
| 140 |
-
for file in files:
|
| 141 |
-
file_path = os.path.join(root, file)
|
| 142 |
-
arcname = os.path.relpath(file_path, temp_dir)
|
| 143 |
-
zipf.write(file_path, arcname)
|
| 144 |
-
|
| 145 |
-
shutil.rmtree(temp_dir)
|
| 146 |
return cbz_path
|
| 147 |
|
| 148 |
|
|
|
|
| 135 |
def convert_cbr_to_cbz(cbr_path):
|
| 136 |
temp_dir = tempfile.mkdtemp()
|
| 137 |
cbz_path = cbr_path.replace('.cbr', '.cbz')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
return cbz_path
|
| 139 |
|
| 140 |
|