mirror of
https://github.com/Leseratte10/lcpl-calibre-plugin
synced 2024-12-26 09:59:16 +01:00
v0.0.5: Fix Python2 bug, drop minimum Calibre version to 2.0
This commit is contained in:
parent
f9d1f4df74
commit
06d3a1040b
1 changed files with 7 additions and 4 deletions
|
@ -20,9 +20,10 @@
|
||||||
# v0.0.2: Add support for Python2
|
# v0.0.2: Add support for Python2
|
||||||
# v0.0.3: Fix other FileTypePlugins
|
# v0.0.3: Fix other FileTypePlugins
|
||||||
# v0.0.4: Fix Calibre Plugin index / updater
|
# v0.0.4: Fix Calibre Plugin index / updater
|
||||||
|
# v0.0.5: Fix Python2 bug, drop minimum Calibre version to 2.0.0
|
||||||
|
|
||||||
PLUGIN_NAME = "LCPL Input"
|
PLUGIN_NAME = "LCPL Input"
|
||||||
PLUGIN_VERSION_TUPLE = (0, 0, 4)
|
PLUGIN_VERSION_TUPLE = (0, 0, 5)
|
||||||
|
|
||||||
from calibre.customize import FileTypePlugin # type: ignore
|
from calibre.customize import FileTypePlugin # type: ignore
|
||||||
__version__ = PLUGIN_VERSION = ".".join([str(x)for x in PLUGIN_VERSION_TUPLE])
|
__version__ = PLUGIN_VERSION = ".".join([str(x)for x in PLUGIN_VERSION_TUPLE])
|
||||||
|
@ -51,7 +52,7 @@ class LCPLInput(FileTypePlugin):
|
||||||
supported_platforms = ['linux', 'osx', 'windows']
|
supported_platforms = ['linux', 'osx', 'windows']
|
||||||
author = "Leseratte10"
|
author = "Leseratte10"
|
||||||
version = PLUGIN_VERSION_TUPLE
|
version = PLUGIN_VERSION_TUPLE
|
||||||
minimum_calibre_version = (4, 10, 0)
|
minimum_calibre_version = (2, 0, 0)
|
||||||
file_types = set(['lcpl'])
|
file_types = set(['lcpl'])
|
||||||
on_import = True
|
on_import = True
|
||||||
on_preprocess = True
|
on_preprocess = True
|
||||||
|
@ -106,8 +107,10 @@ class LCPLInput(FileTypePlugin):
|
||||||
currenttime = datetime.datetime.now(datetime.timezone.utc)
|
currenttime = datetime.datetime.now(datetime.timezone.utc)
|
||||||
except:
|
except:
|
||||||
# Python 2
|
# Python 2
|
||||||
lic_start = lic_start.replace(tzinfo=None)
|
if lic_start is not None:
|
||||||
lic_end = lic_end.replace(tzinfo=None)
|
lic_start = lic_start.replace(tzinfo=None)
|
||||||
|
if lic_end is not None:
|
||||||
|
lic_end = lic_end.replace(tzinfo=None)
|
||||||
currenttime = datetime.datetime.utcnow()
|
currenttime = datetime.datetime.utcnow()
|
||||||
|
|
||||||
is_in_license_range = True
|
is_in_license_range = True
|
||||||
|
|
Loading…
Reference in a new issue