Instructions downloader #54

Merged
FrederikBaerentsen merged 19 commits from instructions into master 2025-01-26 19:17:42 +01:00
Showing only changes of commit 48ad7b5f02 - Show all commits

View File

@ -111,11 +111,14 @@ class BrickInstructions(object):
url = current_app.config['REBRICKABLE_LINK_INSTRUCTIONS_PATTERN'].format( # noqa: E501 url = current_app.config['REBRICKABLE_LINK_INSTRUCTIONS_PATTERN'].format( # noqa: E501
path=path path=path
) )
trimmed_url = current_app.config['REBRICKABLE_LINK_INSTRUCTIONS_PATTERN'].format( # noqa: E501
path=path.partition('/')[0]
)
# Request the file # Request the file
self.socket.progress( self.socket.progress(
message='Requesting {url}'.format( message='Requesting {url}'.format(
url=url, url=trimmed_url,
) )
) )
@ -133,7 +136,7 @@ class BrickInstructions(object):
# Downloading the file # Downloading the file
self.socket.progress( self.socket.progress(
message='Downloading {url} ({size})'.format( message='Downloading {url} ({size})'.format(
url=url, url=trimmed_url,
size=self.human_size(), size=self.human_size(),
) )
) )