Compare commits
5 Commits
1.4.4-alph
...
1.4.4-alph
Author | SHA1 | Date | |
---|---|---|---|
710d9bf6a5 | |||
bb81f921ff | |||
1468b1932f | |||
74d95b6a50 | |||
d33fb6ef31 |
@ -537,7 +537,7 @@ class RarArchiver(UnknownArchiver):
|
||||
|
||||
return namelist
|
||||
|
||||
def get_rar_obj(self) -> Optional[rarfile.RarFile]:
|
||||
def get_rar_obj(self) -> "Optional[rarfile.RarFile]":
|
||||
try:
|
||||
rarc = rarfile.RarFile(str(self.path))
|
||||
except (OSError, IOError) as e:
|
||||
|
@ -275,4 +275,7 @@ publishers: dict[str, ImprintDict] = {}
|
||||
|
||||
|
||||
def load_publishers() -> None:
|
||||
update_publishers(json.loads((pathlib.Path(__file__).parent / "data" / "publishers.json").read_text("utf-8")))
|
||||
try:
|
||||
update_publishers(json.loads((pathlib.Path(__file__).parent / "data" / "publishers.json").read_text("utf-8")))
|
||||
except Exception:
|
||||
logger.exception("Failed to load publishers.json; The are no publishers or imprints loaded")
|
||||
|
@ -3,6 +3,7 @@
|
||||
import platform
|
||||
from os.path import join
|
||||
from comictaggerlib import ctversion
|
||||
from PyInstaller.utils.hooks import get_module_file_attribute
|
||||
|
||||
enable_console = False
|
||||
binaries = []
|
||||
@ -13,7 +14,7 @@ if platform.system() == "Windows":
|
||||
|
||||
a = Analysis(['comictagger.py'],
|
||||
binaries=binaries,
|
||||
datas=[('comictaggerlib/ui/*.ui', 'ui'), ('comictaggerlib/graphics', 'graphics')],
|
||||
datas=[('comictaggerlib/ui/*.ui', 'ui'), ('comictaggerlib/graphics', 'graphics'), ('comicapi/data', 'comicapi/data'),(os.path.join(os.path.dirname(get_module_file_attribute('wordninja')),"wordninja"), "wordninja")],
|
||||
hiddenimports=['PIL'],
|
||||
hookspath=[],
|
||||
runtime_hooks=[],
|
||||
|
@ -736,7 +736,7 @@ class ComicVineTalker:
|
||||
self.nam.finished.connect(self.async_fetch_issue_cover_url_complete)
|
||||
self.nam.get(QtNetwork.QNetworkRequest(QtCore.QUrl(issue_url)))
|
||||
|
||||
def async_fetch_issue_cover_url_complete(self, reply: QtNetwork.QNetworkReply) -> None:
|
||||
def async_fetch_issue_cover_url_complete(self, reply: "QtNetwork.QNetworkReply") -> None:
|
||||
# read in the response
|
||||
data = reply.readAll()
|
||||
|
||||
@ -772,7 +772,7 @@ class ComicVineTalker:
|
||||
self.nam.finished.connect(self.async_fetch_alternate_cover_urls_complete)
|
||||
self.nam.get(QtNetwork.QNetworkRequest(QtCore.QUrl(str(issue_page_url))))
|
||||
|
||||
def async_fetch_alternate_cover_urls_complete(self, reply: QtNetwork.QNetworkReply) -> None:
|
||||
def async_fetch_alternate_cover_urls_complete(self, reply: "QtNetwork.QNetworkReply") -> None:
|
||||
# read in the response
|
||||
html = str(reply.readAll())
|
||||
alt_cover_url_list = self.parse_out_alt_cover_urls(html)
|
||||
|
@ -41,7 +41,7 @@ class ImageFetcherException(Exception):
|
||||
pass
|
||||
|
||||
|
||||
def fetch_complete(image_data: Union[bytes, QtCore.QByteArray]) -> None:
|
||||
def fetch_complete(image_data: "Union[bytes, QtCore.QByteArray]") -> None:
|
||||
...
|
||||
|
||||
|
||||
@ -106,7 +106,7 @@ class ImageFetcher:
|
||||
# we'll get called back when done...
|
||||
return bytes()
|
||||
|
||||
def finish_request(self, reply: QtNetwork.QNetworkReply) -> None:
|
||||
def finish_request(self, reply: "QtNetwork.QNetworkReply") -> None:
|
||||
# read in the image data
|
||||
logger.debug("request finished")
|
||||
image_data = reply.readAll()
|
||||
@ -134,7 +134,7 @@ class ImageFetcher:
|
||||
|
||||
cur.execute("CREATE TABLE Images(url TEXT,filename TEXT,timestamp TEXT,PRIMARY KEY (url))")
|
||||
|
||||
def add_image_to_cache(self, url: str, image_data: Union[bytes, QtCore.QByteArray]) -> None:
|
||||
def add_image_to_cache(self, url: str, image_data: "Union[bytes, QtCore.QByteArray]") -> None:
|
||||
|
||||
con = lite.connect(self.db_file)
|
||||
|
||||
|
@ -87,6 +87,10 @@ try:
|
||||
qt_exception_hook = UncaughtHook()
|
||||
from comictaggerlib.taggerwindow import TaggerWindow
|
||||
except ImportError as e:
|
||||
|
||||
def show_exception_box(log_msg: str):
|
||||
pass
|
||||
|
||||
logger.error(str(e))
|
||||
qt_available = False
|
||||
|
||||
@ -101,8 +105,9 @@ def update_publishers() -> None:
|
||||
if json_file.exists():
|
||||
try:
|
||||
utils.update_publishers(json.loads(json_file.read_text("utf-8")))
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
logger.exception("Failed to load publishers from %s", json_file)
|
||||
show_exception_box(str(e))
|
||||
|
||||
|
||||
def ctmain() -> None:
|
||||
|
@ -5,4 +5,6 @@ requests==2.*
|
||||
pathvalidate
|
||||
pycountry
|
||||
py7zr
|
||||
text2digits
|
||||
text2digits
|
||||
typing_extensions
|
||||
wordninja
|
||||
|
4
setup.py
4
setup.py
@ -54,9 +54,7 @@ setup(
|
||||
author_email="comictagger@gmail.com",
|
||||
url="https://github.com/comictagger/comictagger",
|
||||
packages=["comictaggerlib", "comicapi"],
|
||||
package_data={
|
||||
"comictaggerlib": ["ui/*", "graphics/*"],
|
||||
},
|
||||
package_data={"comictaggerlib": ["ui/*", "graphics/*"], "comicapi": ["data/*"]},
|
||||
entry_points=dict(console_scripts=["comictagger=comictaggerlib.main:ctmain"]),
|
||||
classifiers=[
|
||||
"Development Status :: 4 - Beta",
|
||||
|
Reference in New Issue
Block a user