cbr/cbz cleanups

This commit is contained in:
j 2019-02-01 18:27:58 +05:30
commit 106ae904c3
3 changed files with 14 additions and 5 deletions

View file

@ -1,14 +1,14 @@
# -*- coding: utf-8 -*-
import logging
import os
import zipfile
import logging
import ox
from .cbr import filter_images
logger = logging.getLogger(__name__)
def cover(path):
data = None
logger.debug('cover %s', path)
@ -19,6 +19,7 @@ def cover(path):
logger.debug('invalid zbc file %s', path)
return data
files = [f.filename for f in z.filelist]
files = filter_images(files)
if files:
cover = ox.sorted_strings(files)[0]
try: