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

[DA Beta?] Tag and Category Filters do not Work #48

Closed
rthaut opened this issue Jun 13, 2018 · 0 comments
Closed

[DA Beta?] Tag and Category Filters do not Work #48

rthaut opened this issue Jun 13, 2018 · 0 comments
Labels

Comments

@rthaut
Copy link
Owner

rthaut commented Jun 13, 2018

This is also from a user report (like #46), but I'm assuming they are closely related.

With the new URL structure used by thumbnail links, the metadata is probably not being applied to thumbnails, causing tag and category filtering to not work.

Presumably the URL for deviations returned by the APIs is still the old format, but if the DOM is using the new format, then the script cannot "apply" the metadata to the thumbnails (since it has to use the URL to match metadata to thumbnails).

Additionally, the cached metadata is stored/indexed by URL, so that will require some rework as well.

I think the proper solution is going to be to match by the deviation's slug, which is basically the deviation's title and some unique numeric ID appended to that. That should work for both the old and the new URL formats without having to actually check for both formats (thus looping through the metadata twice).

This means that the metadata cache could also be adjusted to just store that slug (rather than the full URL); doing so would not only save a few bytes, but would also prevent the script from having to extract the slug from each URL before applying, thus improving performance a bit. We should increment the IndexedDB version, and then use the UpgradeDB Callback to migrate/modify all existing items.

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

No branches or pull requests

1 participant