Skip to content

Commit

Permalink
Merge pull request #498 from quickmic/next-gen-dev-python3
Browse files Browse the repository at this point in the history
9.4.13, review changelog for details
  • Loading branch information
quickmic authored Feb 16, 2024
2 parents e71a466 + ad70ccd commit a45c982
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8' standalone="yes"?>
<addon id="plugin.video.emby-next-gen" name="Emby for Kodi Next Gen" version="9.4.12" provider-name="quickmic, angelblue05, sualfred">
<addon id="plugin.video.emby-next-gen" name="Emby for Kodi Next Gen" version="9.4.13" provider-name="quickmic, angelblue05, sualfred">
<requires>
<import addon="xbmc.python" version="3.0.1"/>
<import addon="script.module.requests" version="2.22.0" />
Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
9.4.13
=============
fix invalid year values sync issue


9.4.12
=============
fix database option set
Expand Down
16 changes: 8 additions & 8 deletions helper/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,18 +515,18 @@ def convert_to_local(date, DateOnly=False, YearOnly=False):
if not date or str(date) == "0":
return "0"

if isinstance(date, int):
date = str(date)
try:
if isinstance(date, int):
date = str(date)

if isinstance(date, str):
date = parser.parse(date.encode('utf-8'))
if isinstance(date, str):
date = parser.parse(date.encode('utf-8'))

if not date.tzname():
date = date.replace(tzinfo=tz.tzutc())
if not date.tzname():
date = date.replace(tzinfo=tz.tzutc())

timestamp = (date - datetime(1970, 1, 1, tzinfo=tz.tzutc())).total_seconds()
timestamp = (date - datetime(1970, 1, 1, tzinfo=tz.tzutc())).total_seconds()

try:
if timestamp >= 0:
timestamp = datetime.fromtimestamp(timestamp)
else:
Expand Down

0 comments on commit a45c982

Please sign in to comment.