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 metadata of additional collections #548

Closed
wjt opened this issue May 26, 2023 · 7 comments
Closed

Download metadata of additional collections #548

wjt opened this issue May 26, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@wjt
Copy link
Member

wjt commented May 26, 2023

On first launch, the app downloads the metadata, and content, for the collection the user selects.

In order to make it possible to browse the other content in the Endless Key universe (and later, download it), we will make the app go on to download (in the background) the metadata for the other collections.

Check if there is already API in Kolibri to check for and update metadata of channels.

@wjt wjt added this to the Ladybug milestone May 26, 2023
@erikos erikos added the enhancement New feature or request label Jun 5, 2023
@dylanmccall
Copy link
Collaborator

I've been working on this one today. Should have something ready to test by the end of the week. The way I'm hooking this up for now is an additional stage in our ek-collections download API that runs after APPLYING_EXTERNAL_TAGS and before COMPLETED (along with some small adjustments so the frontend understands it can start showing things for any stage after APPLYING_EXTERNAL_TAGS).

At some point we'll need to come back over here and add a system for checking for / applying updates to content manifests. At that point it would probably make more sense to stick this functionality over there, but there could be some other fluctuation before then so I figure I can glue it into the same machinery for now :)

dylanmccall added a commit that referenced this issue Jun 8, 2023
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 added a commit that referenced this issue Jun 9, 2023
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
Copy link
Collaborator

Some technical limitations mean that my initial solution (#580) does not download channel metadata in the background. It looks like background downloading is being explored via #568, but I'll follow up on Slack about where that is going. In theory, #579 is my attempt to do what we want here before realizing it won't work without rewriting stuff.

@manuq
Copy link
Collaborator

manuq commented Jun 9, 2023

Is it too bad to download the metadata of additional collections in the foreground? As a first approximation. Ideally we would move all the collections download to use the task manager (it is creating tasks directly now) which will move all to the background. Regardless of the collections progress bar being shown in the frontend or not.

dylanmccall added a commit that referenced this issue Jun 9, 2023
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
Copy link
Collaborator

dylanmccall commented Jun 9, 2023

Is it too bad to download the metadata of additional collections in the foreground? As a first approximation. Ideally we would move all the collections download to use the task manager (it is creating tasks directly now) which will move all to the background. Regardless of the collections progress bar being shown in the frontend or not.

In my testing it doesn't take long to download these extra channels, to the point that it's probably better if we don't do it in the background here: if we do, we have to deal with the frontend having a stale channels list while that information rapidly changes in the backend. (That is less of an issue for thumbnails as in #549 since individual thumbnails don't get polled as often). So let's solve background downloads elsewhere and circle back here after that, but perhaps as a broader effort of making content updates happen :)

@manuq
Copy link
Collaborator

manuq commented Jun 12, 2023

I gave it another review, only a suggestion left, looks good to merge: #580 (review)

dylanmccall added a commit that referenced this issue Jun 12, 2023
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 added a commit that referenced this issue Jun 12, 2023
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
Copy link
Collaborator

dylanmccall commented Jun 12, 2023

I created a follow-up task for the background download:

And a follow-up task to expand the set of extra channels we download:

@erikos
Copy link
Contributor

erikos commented Jun 14, 2023

Deployed with Ladybird 6.9-338. The metadata of the catalog is available after the download in the onboarding finishes.

@wjt wjt closed this as completed Jul 31, 2023
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

No branches or pull requests

4 participants