VTGare / boe-tea-go

Source image bot for Discord
MIT License
20 stars 7 forks source link

Direct image link/attachments favorite support #12

Closed Ryu1845 closed 1 year ago

Ryu1845 commented 2 years ago

Add support for adding direct image link / attachments to your favorites

VTGare commented 2 years ago

This has become even harder to implement after changes made in https://github.com/VTGare/boe-tea-go/commit/4fe03e0e8a5fea358c2cf6c7c3cfaeed2ec450bf. If someone has an idea how to implement this with the current user/artwork/bookmark relation schema, please let me know.

Ryu1845 commented 2 years ago

What's the problem, actually? I read the code, but I'm not sure that I understand.

VTGare commented 2 years ago

User bookmarks are just references to artworks, they don't contain any data about themselves except an artwork ID and NSFW boolean. See https://github.com/VTGare/boe-tea-go/blob/master/store/bookmarks.go.

I don't want to flood artworks collection with singular, potentially unrelated images, each artwork should come from one of supported sources.

Ryu1845 commented 2 years ago

Not really a fix but if you can change artworkId to str instead of int, you can just store the url

Ryu1845 commented 2 years ago

Short of that, I don't see any way of doing it and you might as well close the issue imo.

VTGare commented 1 year ago

Not feasible, favorites are already clogging up the database as is.

Ryu1845 commented 1 year ago

OK :+1: