• 0 Posts
  • 26 Comments
Joined 1 year ago
cake
Cake day: June 5th, 2023

help-circle





  • I wonder if letting people pick their own items really reduces waste more than the hamper system? What happens to items left on the shelf that no one takes? That’s probably the same stuff that would be ignored from a hamper? I’m admittedly pretty ignorant of food banks generally, but I would think that the hamper system would be trying to encourage people to eat whatever they get, to both reduce waste by making sure all items get out there from the bank, and to ensure there’s enough of everything coming in to go around evenly? I can see this maybe resulting in the better items going first, and a bunch of less desirable items always being left behind to rot. Does that tend to happen in this type of system or not?






  • You could sandbox it into a work profile that doesn’t have access to your main profile. Storage is completely segregated, and the work profile can be easily disabled when you’re not using it.

    The best solution is obviously to choose another platform and convince your girlfriend to use that, explaining how this little extra effort on her part to use another app goes a long way with you in terms of appreciation and understanding of a partner’s boundaries and comfort zone.





  • I use Clipious, an Android client for Invidious, on my phone. I selfhost my own Indivious instance so this is perfect in that my phone never connects to YouTube directly, and I can save all my subscriptions in one place without a YouTube account.

    On my Android TV I use Smart Tube Next. If I really need to cast, I also have YouTube ReVanced on my phone for just that, but I barely use it.

    As soon as Clipious gets a proper Android TV interface, I’ll be set, as both devices can just connect to Invidious and let it do all the work.




  • Ah sorry, just remembered I put my entire instance behind authentication except for the API endpoints required for federation. The comment I was linking to is in this thread. Just describes how all the info you need to properly transform the links is right there in the database records of the entities you want to transform, so this functionality can easily be added without much work.



  • It’s actually easy, here’s an explanation for one simple way you could do it.

    On my instance, this post has the URL: https://lm.williampuckering.com/post/171615

    On the instance the post originated on, the URL is: https://lemmings.world/post/175809

    So on my instance, the post has the ID: 171615

    On the originating instance, the ID is: 175809

    In the database on my instance, this query will retrieve the post: select * from post where id = 171615

    Also in the database on my instance, this query will retrieve the post: select * from post where ap_id = 'https://lemmings.world/post/175809'

    Using the second query and finding the post by URL, I can see if the post is federated to my own instance or not. If so, I can look at the id field in the database and merely swap it out with the originating instance’s ID, and form the URL to access the post as it exists on my own instance. If the post isn’t federated on my own instance, then of course this won’t work. But that makes total sense, since you won’t be able to transform links for external instances to the corresponding entity on your own instance, because it doesn’t exist there.

    tl;dr - You can look up local entities by ID, and you can lookup remote entities by original URL. Then you just need to swap the ID in the URL to the ID (primary key in the table) in the database, if it exists, to convert a remote link to a local link. If a link can’t be converted, you can just leave it as-is.

    The capability needed to add this functionality is already there. Someone just needs to decide how to handle it on the frontend elegantly from a UI perspective, and decide how the backend will pass what’s required to the frontend to drive the functionality. But the plumbing is already there.

    One practical way to go about this would be to add one or more API endpoints to transform remote entities (URLs) to local entities, if they exist. Whenever posts/comments/whatever are loaded into the client’s browser, Lemmy UI can have code that takes any links that match patterns for Lemmy entities, and use the API endpoints to transform the remote URLs to local URLs, if it can be done. For those that can be done, swap the remote URLs on the frontend for the local ones (at this point it’s essentially just find/replace). That’s one quick and simple way to do it that shouldn’t be all that performance-impacting. There might be more elegant and efficient ways I can think of if I put more effort into thinking about this, but that for sure would work and be a decent first-cut solution. You could even add a caching mechanism (or maybe even a new database table) to persist the mapping as it happens so that you don’t need to do it on each request for a given entity, only the first time. Also, doing it this way allows for content that is not yet federated to work if one day it becomes federated (ie. try to do this mapping or each entity, everytime, if it never works, until one day it does).