From 9de1da53e3343fbecf4fcaea0f493adaaecf7690 Mon Sep 17 00:00:00 2001 From: Axel Date: Fri, 14 Jan 2022 09:15:29 -0500 Subject: [PATCH] 1.0.3 --- Dockerfile | 2 +- setup.cfg | 2 +- setup.py | 2 +- sportyfin/sportyfin.py | 2 +- sportyfin/util/scraping.py | 5 +++-- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index d9bbf58..cfd9719 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,6 @@ FROM python:3.8-slim-buster WORKDIR /sportyfin -RUN pip install sportyfin==1.0.2 --no-binary=sportyfin +RUN pip install sportyfin==1.0.3 --no-binary=sportyfin CMD [ "python3", "-m" , "sportyfin", "run", "-a", "-o", "/sportyfin/output"] diff --git a/setup.cfg b/setup.cfg index 41b0fb4..adf7e27 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ # https://github.com/axelmierczuk/sportyfin [metadata] name = sportyfin -version = 1.0.2 +version = 1.0.3 author = Axel Mierczuk author_email = axelmierczuk@gmail.com url = https://github.com/axelmierczuk/sportyfin diff --git a/setup.py b/setup.py index 9ea856d..19ee1c4 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='sportyfin', - version='1.0.2', + version='1.0.3', author='Axel Mierczuk', author_email='axelmierczuk@gmail.com', packages=['sportyfin', 'sportyfin.util'], diff --git a/sportyfin/sportyfin.py b/sportyfin/sportyfin.py index a29f60f..2508a52 100644 --- a/sportyfin/sportyfin.py +++ b/sportyfin/sportyfin.py @@ -33,7 +33,7 @@ def header(): print(f"{colours.OKGREEN} is used in Jellyfin to provide a great viewing experience.") print() print(f"{colours.OKGREEN} Author: Axel Mierczuk") - print(f"{colours.OKGREEN} Version: 1.0.2") + print(f"{colours.OKGREEN} Version: 1.0.3") print(f"{colours.OKGREEN} Github: https://github.com/axelmierczuk/sportyfin") print() print() diff --git a/sportyfin/util/scraping.py b/sportyfin/util/scraping.py index 54485ab..d5ad8df 100644 --- a/sportyfin/util/scraping.py +++ b/sportyfin/util/scraping.py @@ -195,10 +195,11 @@ def make_match(api_res, hosts, lg) -> list: "name": g.get('name', ''), "img_location": "", "url": f"{hosts[0]}{host_id}{hosts[1]}", - "start": str(g['startTimestamp']), - "stop": str(int(g['startTimestamp']) + (3*3600)) + "start": ''.join(g['formatedStartDate'].split('-')) + ''.join(g['startTime'].split(':')), + "stop": ''.join(g['formatedStartDate'].split('-')) + str(int(''.join(g['startTime'].split(':'))) + 300) } } + # YYYYMMDDhhmmss if match['match']['name'] == '': match['match']['name'] = f"{match['away_team']['name']} vs {match['home_team']['name']}" match['match']['img_location'] = game_info.generate_img(match, lg)