[-] Karyoplasma@discuss.tchncs.de 13 points 2 days ago* (last edited 2 days ago)

New Year's is my favorite holiday. Just gonna chill with a friend with beer, crackers and some chess/video games. My Christmas present from my dad was to go buy some fireworks with him, so I got a bunch of stuff to do at midnight.

Way better than Christmas or Easter or other baloney festivities. New Year's is at least somewhat tangible even tho I do concede, it makes no difference.

[-] Karyoplasma@discuss.tchncs.de 4 points 2 days ago

"Not for consumption?" Don't you tell me what to do, I'll eat what I want!

[-] Karyoplasma@discuss.tchncs.de 2 points 2 days ago* (last edited 2 days ago)

I wrote myself a Chrome add-on that adds a context menu entry to play or download links.

background.js

chrome.runtime.onInstalled.addListener(() => {
		
    chrome.contextMenus.create({
        id: "processLink",
        title: "Download as...",
        contexts: ["link"]
    });

    chrome.contextMenus.create({
        id: "720p",
        parentId: "processLink",
        title: "720p",
        contexts: ["link"]
    });

    chrome.contextMenus.create({
        id: "music",
        parentId: "processLink",
        title: "MP3",
        contexts: ["link"]
    });

    chrome.contextMenus.create({
        id: "maxQual",
        parentId: "processLink",
        title: "Maximum quality video",
        contexts: ["link"]
    });
	
    chrome.contextMenus.create({
        id: "separator1",
        parentId: "processLink",
        type: "separator",
        contexts: ["link"]
    });

    chrome.contextMenus.create({
        id: "piQual",
        parentId: "processLink",
        title: "30 fps for RPi",
        contexts: ["link"]
    });
	
    chrome.contextMenus.create({
        id: "separator2",
        parentId: "processLink",
        type: "separator",
        contexts: ["link"]
    });
	
    chrome.contextMenus.create({
        id: "streamLink",
        parentId: "processLink",
        title: "Stream to VLC...",
        contexts: ["link"]
    });
});

chrome.contextMenus.onClicked.addListener((info, tab) => {
    let linkUrl = info.linkUrl;

    if (info.menuItemId === "720p") {
        sendLinkToNativeApp(linkUrl, "video720");
    } else if (info.menuItemId === "music") {
        sendLinkToNativeApp(linkUrl, "music");
    } else if (info.menuItemId === "maxQual") {
        sendLinkToNativeApp(linkUrl, "videomp4");
    } else if (info.menuItemId === "piQual") {
        sendLinkToNativeApp(linkUrl, "video720p30");
    } else if (info.menuItemId === "streamLink") {
        sendLinkToNativeApp(linkUrl, "stream");
    }
});

function sendLinkToNativeApp(link, action) {
    console.log("Sending link to native app with action:", action, link);
    chrome.runtime.sendNativeMessage(
        'com.example.ytlink_processor',
        { link: link, action: action },
        function(response) {
            if (chrome.runtime.lastError) {
                console.error("Error:", chrome.runtime.lastError.message);
            } else {
                console.log("Received response from native app:", response.output);
            }
        }
    );
}

native_host.py (chatGPT wrote this because I can't Python)

import sys
import subprocess
import json
import struct

def log_to_file(message):
    with open("log.txt", "a") as log_file:
        log_file.write(message + "\n")

def get_message():
    raw_length = sys.stdin.read(4)
    if len(raw_length) == 0:
        sys.exit(0)
    message_length = struct.unpack('I', raw_length)[0]
    message = sys.stdin.read(message_length)
    return json.loads(message)

def send_message(message_content):
    message = json.dumps(message_content)
    sys.stdout.write(struct.pack('I', len(message)))
    sys.stdout.write(message)
    sys.stdout.flush()

def process_link(link, action):
    if action == "stream":
        cmd = 'yt-dlp --stream "{}" -o - | "D:/Programme/VLC/vlc.exe" -'.format(link)
    else:
        cmd = 'yt-dlp --{} "{}"'.format(action, link)
    result = subprocess.Popen('start cmd /c "{}"'.format(cmd), shell=True)
    return result.stdout + result.stderr

if __name__ == "__main__":
    message = get_message()
    link = message.get("link")
    action = message.get("action")
    if link and action:
        output = process_link(link, action)
        send_message({"output": output})

The actions are just aliases for different qualities (old pi, so 720p60 stutters at times), audio extraction, etc.

[-] Karyoplasma@discuss.tchncs.de 2 points 3 days ago

Awesome, works with VLC as well. Thanks.

[-] Karyoplasma@discuss.tchncs.de 2 points 3 days ago

TAA, motion blur, depth of field. Why do "technologies" to turn a good looking game into a trash looking game even exist?

[-] Karyoplasma@discuss.tchncs.de 7 points 4 days ago

yt-dlp

Downside is that you'll have to regularly delete all the videos you've downloaded.

[-] Karyoplasma@discuss.tchncs.de 135 points 1 week ago

That is not a horn. Purple correctly identified it as a trumpet.

[-] Karyoplasma@discuss.tchncs.de 253 points 4 weeks ago* (last edited 4 weeks ago)

Yeah, on all platforms I've been to I've seen nothing but bitter jokes and snarky comments about the situation. Imagine being such a massive shitbag that nobody gives a damn when you are literally murdered in public and in broad daylight.

If your legacy is feeding off people's misfortune and suffering then I'd say this outcome is part of the risk you took. What goes around, comes around. I don't expect the leeches to learn from that tho.

69

This community, under the guise of Christianity and discussion thereof, is just a place filled with conspiracy theories and hatred.

Exhibit 1: Bigoted, trans- and homophobic video. The comment section shows heavy mod abuse.

Exhibits 2 and 3: Conspiracy theory. Again comment section is heavily "moderated".

All of those posts are mod-posts because the community locked for non-moderators to create posts in. Is this really the kind of community that tchncs wants to foster?

[-] Karyoplasma@discuss.tchncs.de 146 points 7 months ago* (last edited 7 months ago)

Mammals use boob-juice to raise their offspring. That's why they are called that.

As opposed to e.g. birds that don't use boob-juice and instead elect to vomit in their offspring's ingestion orifices.

[-] Karyoplasma@discuss.tchncs.de 164 points 7 months ago

US politics are so wild that it's really hard for me to distingish satire from reality.

[-] Karyoplasma@discuss.tchncs.de 144 points 9 months ago

Is there any hope for me?

Yes, public transport.

4

Hey,

I'm noticing that I get many broken comment chains and comments failing to load. Is that just for me or does anybody else experience issues. I guess, it started when I was updating the mail address linked to this account a couple weeks back. The token I got with the email to verify my address was rejected (Invalid token) and since then, I'm having issues. My settings show the correct email and I cannot send a new token to verify (it says nothing about verification status). It was, probably incidentally, at the evening of when the lemmy update got installed onto this instance, so maybe I've chosen a bad time for the mail change.

Here is a thread that showcases my problem:

Logged out:

Logged in:

(Clicking on more comments does nothing)

Maybe someone knows what's wrong.

Thanks in advance!

view more: next ›

Karyoplasma

joined 2 years ago