Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download: Add a stage to import all channels #580

Merged
merged 1 commit into from
Jun 12, 2023

Conversation

dylanmccall
Copy link
Collaborator

After the APPLYING_EXTERNAL_TAGS stage, the DownloadManager will enter a new IMPORTING_EXTRA_CHANNELS stage. In this stage, it should download metadata for any channels which are listed in another content collection.

Issue #548


The parent issue here wants this stage to happen in the background, and I took a look at that in #579. But I think there's some overlap with #568, so I'm opting for something quick and dirty in this pull request and we can deal with downloading channel metadata in the background separately.

Copy link
Collaborator

@manuq manuq left a comment

Choose a reason for hiding this comment

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

I think this is a good first approach, as long as the extra collections is not a ridiculous download like Khan channel metadata.

@dylanmccall dylanmccall force-pushed the issue-548-download-all-collection-channels branch from 4e40d5f to 942406c Compare June 9, 2023 22:45
@dylanmccall dylanmccall requested a review from manuq June 9, 2023 22:45
@dylanmccall
Copy link
Collaborator Author

I made a small change here based on our talk earlier, so the progress bar updates correctly as additional channels are downloaded (and that part of the operation is between 90% and 100%). It could do with another quick look to be sure it's still all right :)

elif self._stage == DownloadStage.COMPLETED:
progress = 1
progress = PROGRESS_STEPS["completed"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

kolibri_explore_plugin/collectionviews.py Outdated Show resolved Hide resolved
kolibri_explore_plugin/collectionviews.py Outdated Show resolved Hide resolved
Comment on lines +609 to +613
def _get_channel_ids_for_all_content_manifests():
channel_ids = set()
for content_manifest in _content_manifests:
channel_ids.update(content_manifest.get_channel_ids())
return channel_ids
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

After the `APPLYING_EXTERNAL_TAGS` stage, the DownloadManager will enter
a new `IMPORTING_EXTRA_CHANNELS` stage. In this stage, it should
download metadata for any channels which are listed in another content
collection.

Issue #548
@dylanmccall dylanmccall force-pushed the issue-548-download-all-collection-channels branch from 16afe2b to 6041906 Compare June 12, 2023 18:25
@dylanmccall
Copy link
Collaborator Author

Thanks for reviewing, @manuq! I'll go ahead and merge this now :)

@dylanmccall dylanmccall merged commit 000f5e7 into master Jun 12, 2023
@erikos erikos added this to the Ladybug milestone Jun 13, 2023
@erikos erikos added the enhancement New feature or request label Jun 13, 2023
@erikos
Copy link
Contributor

erikos commented Jun 13, 2023

Available in Ladybird 6.8-338

@wjt wjt deleted the issue-548-download-all-collection-channels branch June 13, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants