From 710f74a4229e1908ff7dbe428986b8d5af64ea83 Mon Sep 17 00:00:00 2001 From: Axel Date: Fri, 14 Jan 2022 10:51:24 -0500 Subject: [PATCH] 1.0.5 --- Dockerfile | 2 +- setup.cfg | 2 +- setup.py | 2 +- sportyfin/sportyfin.py | 2 +- sportyfin/util/scraping.py | 10 +++++++--- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9fbcd2a..fd697f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,6 @@ FROM python:3.8-slim-buster WORKDIR /sportyfin -RUN pip install sportyfin==1.0.4 --no-binary=sportyfin +RUN pip install sportyfin==1.0.5 --no-binary=sportyfin CMD [ "python3", "-m" , "sportyfin", "run", "-a", "-o", "/sportyfin/output"] diff --git a/setup.cfg b/setup.cfg index d81a1bd..9ba48e7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ # https://github.com/axelmierczuk/sportyfin [metadata] name = sportyfin -version = 1.0.4 +version = 1.0.5 author = Axel Mierczuk author_email = axelmierczuk@gmail.com url = https://github.com/axelmierczuk/sportyfin diff --git a/setup.py b/setup.py index f07fb34..810910b 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='sportyfin', - version='1.0.4', + version='1.0.5', author='Axel Mierczuk', author_email='axelmierczuk@gmail.com', packages=['sportyfin', 'sportyfin.util'], diff --git a/sportyfin/sportyfin.py b/sportyfin/sportyfin.py index f5955f2..8b79612 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.4") + print(f"{colours.OKGREEN} Version: 1.0.5") 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 bb66480..e76b0d4 100644 --- a/sportyfin/util/scraping.py +++ b/sportyfin/util/scraping.py @@ -195,11 +195,15 @@ def make_match(api_res, hosts, lg) -> list: "name": g.get('name', ''), "img_location": "", "url": f"{hosts[0]}{host_id}{hosts[1]}", - "start": ''.join(g['formatedStartDate'].split('-')) + ''.join(g['startTime'].split(':')) + " GMT", - "stop": ''.join(g['formatedStartDate'].split('-')) + str(int(''.join(g['startTime'].split(':'))) + 300) + " GMT" + "start": "", + "stop": "" } } - # YYYYMMDDhhmmss + try: + match['match']['start'] = ''.join(g['formatedStartDate'].split('-')) + ''.join(g['startTime'].split(':')) + " GMT" + match['match']['stop'] = ''.join(g['formatedStartDate'].split('-')) + str(int(''.join(g['startTime'].split(':'))) + 300) + " GMT" + except: + pass 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)