Merge pull request #3005 from brentru/update-matrixportal-scroll-guide

Update Matrix Portal New Guide Scroller Code.py
This commit is contained in:
Brent Rubell 2025-04-01 12:22:07 -04:00 committed by GitHub
commit 83809937b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,7 +13,7 @@ from adafruit_matrixportal.matrixportal import MatrixPortal
DISPLAY_NUM_GUIDES = 5
# Data source URL
DATA_SOURCE = (
"https://learn.adafruit.com/api/guides/new.json?count=%d" % DISPLAY_NUM_GUIDES
"https://learn.adafruit.com/api/guides.json?count=%d" % DISPLAY_NUM_GUIDES
)
TITLE_DATA_LOCATION = ["guides"]
@ -65,7 +65,7 @@ def get_guide_info(index):
print("Obtaining guide info for guide %d..." % index)
# Traverse JSON data for title
guide_count = matrixportal.network.json_traverse(als_data.json(), ["guide_count"])
guide_count = matrixportal.network.json_traverse(als_data.json(), ["guides_total_count"])
# Set guide count
matrixportal.set_text(guide_count, 0)