Skip to content

Commit

Permalink
Fix favicon url
Browse files Browse the repository at this point in the history
  • Loading branch information
leonghui committed Mar 12, 2024
1 parent 9a4d4a2 commit acdcff5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gwr_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,14 @@ def get_top_level_feed(query, feed_items):
title_strings = [query.config.domain, query.journey]

base_url = query.config.base_url
favicon_url = query.config.favicon_url

json_feed = JsonFeedTopLevel(
version=JSONFEED_VERSION_URL,
items=feed_items,
title=" - ".join(title_strings),
home_page_url=base_url,
favicon=base_url + "/favicon.ico",
favicon=favicon_url,
)

return json_feed
Expand Down
2 changes: 2 additions & 0 deletions gwr_feed_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
LOCATIONS_SEARCH_URI = "/rail/locations"
JOURNEY_SEARCH_URI = "/rail/journeys/search"
BASKET_URI = "/customer/basket"
FAVICON_URI = "/img/favicons/favicon.ico"

request_headers = {
"User-Agent": "",
Expand All @@ -31,6 +32,7 @@ class FeedConfig:
session_token: str = ""
url: str = GWR_API_URL
base_url: str = GWR_BASE_URL
favicon_url: str = GWR_BASE_URL + FAVICON_URI
domain: str = GWR_DOMAIN
locations_uri: str = LOCATIONS_SEARCH_URI
journey_uri: str = JOURNEY_SEARCH_URI
Expand Down

0 comments on commit acdcff5

Please sign in to comment.