hono4kami

joined 2 weeks ago
[–] hono4kami@slrpnk.net 5 points 1 week ago* (last edited 1 week ago) (7 children)

So I take a peek at the Lemmy's source code.

When you see a thumbnail and title of a URL (including YouTube video links) on Lemmy, what happens is that Lemmy server fetched the website HTML file and get the og:title and og:image (this convention is called OpenGraph protocol ^1) located inside <head> HTML tag.

For example, for this video https://www.youtube.com/watch?v=MbYuEEU5e50, the OpenGraph metadata inside the HTML looks like this:

<meta property="og:title" content="Flume - Lose It feat. Vic Mensa">
<meta property="og:image" content="https://i.ytimg.com/vi/MbYuEEU5e50/maxresdefault.jpg">

Try opening the "Create Post" page, then enter URL of a YouTube video. You might notice that a loading spinner will appear. During this, the frontend of Lemmy is actually creating a request to /api/v3/post/site_metadata?url=[insert your URL]. When the backend side of Lemmy receives the request from front end, it will run this code ^2 to fetch the HTML and parse it to find the OpenGraph metadata. If the metadata is found, the backend will return it to front end, and you willl see recommended title and the "Thumbnail URL" field should be filled.

In theory, this should work fine, regardless of any website. I personally tried to view the HTML code of a YouTube video and the HTML file indeed contains OpenGraph metadata.

But it doesn't for YouTube videos in Lemmy somehow. And I'm not sure.

I'm suspecting YouTube thought that Lemmy servers are bots and because of that instead of receiving the HTML file of a YouTube video, instead it received a HTML file of a captcha page. I think I'm gonna try contacting admins of my instance to see whether YouTube URL works or not.

[–] hono4kami@slrpnk.net 11 points 1 week ago (8 children)

It's because Lemmy can't fetch YouTube thumbnails. I swear it used to fetch thumbnail and title automatically before, hmm

[–] hono4kami@slrpnk.net 3 points 1 week ago (5 children)

Oh wow I completely forgot lol

[–] hono4kami@slrpnk.net 2 points 1 week ago (1 children)

i kinda want to upload all my shitposts gallery on PeerTube but i can't even find a single instance that is open for registration lol

[–] hono4kami@slrpnk.net 2 points 1 week ago (1 children)

Let me give you my opinion, specifically as a React developer, if you don't mind.

And let's be clear: I intend this to be a constructive criticism. I hope you understand and don't take it the wrong way.

To be honest, I don't know how good or bad federating one-way is. This is more of a "people" problem rather than a technical problem.

But, to be honest, what I am bothered by, is the fact that the website doesn't give an attribution in the UI about which instance certain users are from and which instance certain certain community are from.

Take a look at this post: https://clubsall.com/posts/theyre-trying-to-charge-luigi-with-terrorism-imagine-that-qfF82

The UI says that the post was posted by u[slash]BytesOnBikes. If I didn't know better, I'd have assumed this was from a user from clubsall. But if you click the username, you realize that the link says u[slash]BytesOnBikes[at]slrpnk.net. I think this would be confusing as a user. What if there is the same user under the username BytesOnBikes from clubsall? At least if you include the instance name, user would know right away that both users are different. But if you didn't include the instance name, I feel like this can be abused to impersonate user. This is a bad thing to happen to your website, don't you agree?

Now that we both understand that lack of attribution is a bad thing to clubsall... What's stopping you from adding an instance name to the username? I'm sure the app has a way to know which instance certain users are from. From what I gather, I feel like this is as easy as appending a string in the code.

I haven't even talked about the community name on the UI. Or the ethicality of misleading attribution.

[–] hono4kami@slrpnk.net 2 points 1 week ago (1 children)

The things redditors mentioned are very good already. Primarily screenshots. Please, please always add screenshots to let me have a general idea of the UI.

I've read this mentioned many times. Is it really that bad XD

[–] hono4kami@slrpnk.net 2 points 1 week ago

Syncthing is one of the best software I used. I use it to sync my notes.

[–] hono4kami@slrpnk.net 1 points 1 week ago (2 children)

separate the data-directory from the appdata-directory

Would you mind explaining more about this?

[–] hono4kami@slrpnk.net 2 points 1 week ago (3 children)

To me, good documentation is the number one thing that makes a selfhostable application good.

I agree. If you don't mind: what are your qualifications for good documentation? Do you have some good examples of good docs?

[–] hono4kami@slrpnk.net 1 points 1 week ago

A lot of stuff tend to end up trying to be too easy and you can’t scale up, or stuff so unbelievably complicated you can’t scale it down.

I see, it's probably good to have some balance between those. Noted

[–] hono4kami@slrpnk.net 6 points 1 week ago (9 children)

No, I don’t want a second container for a database.

Unless you're talking about using SQLite:

Isn't the point of Docker container is to only have one software/process running? I'm sure you can use something like s6 or other lightweight supervisor, but I feel like that's seems counterintuitive?

[–] hono4kami@slrpnk.net 2 points 1 week ago

Crumb is GOAT

Locket is my favorite EP from them

view more: ‹ prev next ›