Skip to content

Commit

Permalink
Merge pull request #3 from samuelgrf/patch-2
Browse files Browse the repository at this point in the history
Fix sending message for already open betas
  • Loading branch information
jacopo-j authored Jan 13, 2024
2 parents 24dc055 + 7ac36c7 commit eee554b
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions testflight_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ def watch(watch_ids, callback, notify_full=True, sleep_time=900):
headers={"Accept-Language": "en-us"})
page = html.fromstring(req.text)
free_slots = page.xpath(XPATH_STATUS)[0] not in FULL_TEXTS
if tf_id not in data:

if (tf_id not in data or data[tf_id] != free_slots):
if free_slots or notify_full:
title = re.findall(
TITLE_REGEX,
page.xpath(XPATH_TITLE)[0])[0]
callback(tf_id, free_slots, title)
data[tf_id] = free_slots
else:
if data[tf_id] != free_slots:
if free_slots or notify_full:
title = re.findall(
TITLE_REGEX,
page.xpath(XPATH_TITLE)[0])[0]
callback(tf_id, free_slots, title)
data[tf_id] = free_slots
sleep(sleep_time)

0 comments on commit eee554b

Please sign in to comment.