Skip to content
This repository has been archived by the owner on Dec 5, 2021. It is now read-only.

Commit

Permalink
Fixing bug#2 - program content per channel runs out before the cron j…
Browse files Browse the repository at this point in the history
…ob. unfortunately it seems like plutos api for viewing schedules is a bit limited from my testing. So I changed the cron timer to 8 hours
  • Loading branch information
chris102994 committed Mar 1, 2021
1 parent 199366d commit 5bc9a12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN echo "##### Downloading Runtime Packages #####" && \
yes | python3 -m pip uninstall wheel setuptools && \
echo "##### Cron setup #####" && \
# Execute the cron job every 2 hours at 15 mins after.
echo "0 */12 * * * root /app/ta-wrapper.sh" >> /etc/crontab && \
echo "0 */8 * * * root /app/ta-wrapper.sh" >> /etc/crontab && \
echo "##### Removing Unnecessary NGINX Files#####" && \
rm -rf \
/etc/init.d/* \
Expand Down
7 changes: 4 additions & 3 deletions rootfs/app/PlutoTV/PlutoTV/pluto_tv.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from xsdata.models.xsd import Any

from PlutoTV import ptvChannels
import ssl
import urllib
from urllib.request import urlopen

Expand Down Expand Up @@ -60,10 +59,12 @@ class PlutoTv:
TV_OBJECT: xmltv.Tv

def main(self):
_start_time = datetime.now().replace(minute=0, second=0, microsecond=0)
_stop_time = _start_time + timedelta(days=1)
self.GUIDE_URL =\
self.GUIDE_URL + \
'?start={}'.format(self.get_proper_date_time(datetime.today(), _URL_TIME_FORMAT)) + \
'&stop={}'.format(self.get_proper_date_time(datetime.today() + timedelta(days=1), _URL_TIME_FORMAT)) + \
'?start={}'.format(self.get_proper_date_time(_start_time, _URL_TIME_FORMAT)) + \
'&stop={}'.format(self.get_proper_date_time(_stop_time, _URL_TIME_FORMAT)) + \
'&appName={}'.format('web') + \
'&appVersion={}'.format('unknown') + \
'&appStoreUrl={}'.format('unknown') + \
Expand Down

1 comment on commit 5bc9a12

@chris102994
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing #2

Please sign in to comment.