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

Fix favIcons of opened ZIM files (not added via catalog download) #811

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

BPerlakiH
Copy link
Collaborator

Fixes: #789

@BPerlakiH BPerlakiH requested review from rgaudin and kelson42 June 16, 2024 10:50
@BPerlakiH BPerlakiH linked an issue Jun 16, 2024 that may be closed by this pull request
@kelson42
Copy link
Contributor

@BPerlakiH CI does not pass

@kelson42
Copy link
Contributor

@BPerlakiH What isnthenlogic of usage between the remote URL and the local illustration?

@BPerlakiH
Copy link
Collaborator Author

BPerlakiH commented Jun 16, 2024

@kelson42 I have updated the code, it seems that empty string to empty data was not handled properly.

What is the logic of usage between the remote URL and the local illustration?

We can create these instances / entities 2 ways:

  • via catalog download, where it will take the favicon URL from the catalog, and as it is rendered (when browsing the catalog) it will update the entity with the favicon image data downloaded from that URL (network request).
    Once we have this ZIM file from the catalog the favicon URL and the image data is stored in the local DB and we are good.
  • via adding the ZIM file from local disk. In this case it will read the image data from the ZIM file itself, and "upsert" that into the DB, and that will be used to render the favicon.

@kelson42
Copy link
Contributor

AFAP usenonline catalogue metadata (even in local library) and otherwise the local (from ZIM file).

@BPerlakiH
Copy link
Collaborator Author

If the url is set, that will be displayed, if not it will fallback to the image data, so that covers the scenario you mentioned.

@kelson42 kelson42 merged commit 16a1320 into main Jun 17, 2024
4 checks passed
@kelson42 kelson42 deleted the 789-zim-metadata-illustration-is-not-read-properly branch June 17, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ZIM metadata „illustration“ is not read properly
2 participants