Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Implement file downloading under g3pylib.recordings.recording #92

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

albertna
Copy link

@albertna albertna commented Jul 19, 2023

Implement Recording.download_files() that downloads all recording files and metadata files to a specified local directory.

Resolves #90.


# workaround for making subsequent aiohttp clientsessions
# TODO: find a more appropriate solution
await asyncio.sleep(0.5)
Copy link
Author

Choose a reason for hiding this comment

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

This is a workaround to #91.

# decode returned string if it is base64 encoded, otherwise write it raw
try:
value = base64.b64decode(encoded_value).decode()
except ValueError:
Copy link
Author

Choose a reason for hiding this comment

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

I found that the default metadata like HuSerial, RuSerial and RuVersion are base64-encoded as described in the developer guide, but custom ones, like the ones tests/api_components/test_recording.py::test_meta_data created, are plain text. Is this intended behavior?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Download Recordings
1 participant