• 7 Posts
  • 35 Comments
Joined 2 years ago
cake
Cake day: June 5th, 2023

help-circle

  • but often lead developers to just display them in the frontend

    Oh boy I feel this one.
    My API is meant for scripting (i.e. it’s for developers and the errors are for developers), but the UI team uses it and they just straight display the error from their HTTP request for none technical people which might also not get to know all the parameters actually needed for the request.
    And even when the error is in fact in my code, and I sent all the data I need to debug and replicate the error, the users can’t tell me because the UI truncates the response, so the user only sees something like Error in pe1uca's API: {"error":"bad request","message":"Your request has an error, please check th... (truncated). So the message gets truncated and the link to the documentation is also never shown .-.





  • Ah, then no, the last thing I knew about it you can’t migrate accounts from one server to another, which is what you’re trying to do here.
    As I mentioned if you were able to move the keys which identify your account it would be easy for someone to impersonate you.
    Also, your public keys are shared among all the instances you’ve interacted, so this might break your interactions there.


  • Do you still have the old database? You should be able to move your instance around as long as you have a dump of your DB, that’s where all the keys of each community and user in your instance are. Those are the ones telling other instances you’re actually you, if you loose those I don’t know what can be done so other instances flush your old content and treat you as a new account. But I would count on thi s being a feature since it could lead to people impersonating someone else if they get a hold of the domain without the DB.

    EDIT: amm, maybe I didn’t understand correctly, are you trying to move to a new domain? Or to a new server with the same domain?
    What’s re-home?



  • How torrents validate the files being served?

    Recently I read a post where OP said they were transcoding torrents in place and still seeding them, so their question was if this was possible since the files were actually not the same anymore.
    A comment said yes, the torrent was being seeded with the new files and they were “poisoning” the torrent.

    So, how this can be prevented if torrents were implemented as a CDN?
    An in general, how is this possible? I thought torrents could only use the original files, maybe with a hash, and prevent any other data being sent.


  • I’m just annoyed by the regions issues, you’ll get pretty biased results depending in what region you select.
    If you try to search for something specific to a region with other selected you’ll find sometime empty results, which shows you won’t get relevant results about a search if you don’t properly select the region.

    Probably this is more obvious with non technical searches, for example my default region is canada-en and if I try “instituto nacional electoral” I only get a wiki page, an international site and some other random sites with no news, only when I change the region I get the official page ine.mx and news. For me this means kagi hides results from other regions instead of just boosting the selected region’s ones.







  • I want instances that block as few other users as possible so I can decide for myself what content I see.

    Then you want to selfhost, otherwise you’ll always be at the will of someone else to decide which instances they want to federate with.

    Even then, you’ll still want to have in mind instances known for spam, bots, or shady content have been blocked.


  • The last time I checked postgres gets big becouse of a log activity table used for deduplication, it stores the data of 6 months. The devs mentioned you could be deleting it up to some point (IIRC they said 3 months, but confirm first).

    As for pictrs, lemmy caches a lot of stuff, so it copies a lot of data from other instances even when it’s advertised only media from your instance is stored in your server.
    My solution was to disable pictrs since I don’t upload media.
    Other solutions I’ve heard about are to ask users of your instance to upload media to any other media hosting service, the images uploaded to lemmy are just seen as urls, so it wouldn’t be any different.



  • That’s exactly what 1:a:0 does, from the first stream, from the audio streams, select the first stream.
    In this case since the audio is the second stream 1:a:0 is the same as 1:1

    I just tried it the other way, moving the audio from the mkv to the mp4 and it works properly.
    Probably I can try to bundle the video of the mkv into an mp4 since Jellyfin is going to be doing it anyway when I try to stream to most devices.




  • Thanks for all the information and advises!

    So in theory basic auth is enough when sent through HTTPS, right?
    If this is the case then the user would need to handle their password and my API can keep storing just the hash.

    In another comment JWT was suggested, maybe this could also be a solution?
    I’m thinking the user can worry about generating and signing the token and we could only be storing the public key , which requires less strictness when handling it, this way we can validate the token has been signed by who we expect and the user will worry about the private key.