dsoskey / cogwork-librarian

local-capable mtg brainstorming tool that extends scryfall syntax
https://coglib.sosk.watch/
GNU General Public License v3.0
6 stars 1 forks source link

offline image support #4

Open dsoskey opened 1 year ago

dsoskey commented 1 year ago

Is your feature request related to a problem? Please describe. while CogLib's query runner runs offline, images are still loaded from scryfall. this means offline searches need a local image source. at the bare minimum, local should support full card text rendering.

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Some quick math about storage requirements medium quality image: ~93KB number of unique prints: ~80k and rapidly growing number of oracle cards: ~28k and growing slower than prints

estimated oracle size: 2.5 GiB estimated print size: 7.2 GiB

RojjaCebolla commented 4 months ago

i wonder if there could be like, a cache, where images expire based on number of times they've been accessed, and recency of that access?

so that if you have a burst of heavy use, you don't have to repeatedly load the cards you're interacting with, but if you drop or finish the project, those'll slowly phase out unless they're part of your regular activities/cubes

dsoskey commented 4 months ago

LRU Caching is a good thought and could be tuned per device. Offline might be achieved through a desktop version of cogwork librarian, which opens the door for a much more robust backend redesign that would include this feature