Skip to content

Added YouTube Downloader extension - #173

Closed
Froxcey wants to merge 12 commits into
raycast:mainfrom
Froxcey:main
Closed

Froxcey wants to merge 12 commits into
raycast:mainfrom
Froxcey:main

Conversation

@Froxcey

@Froxcey Froxcey commented Oct 22, 2021

Copy link
Copy Markdown

Description

Runs YouTube-dl directly from Raycast, allowing you to download YouTube content quickly. Supports video, audio, description, and thumbnail. Dependent on youtube-dl.

Type of change

  • New extension

Screencast

Screen Shot 2021-10-22 at 5 01 15 PM

Checklist

Many bug fixes, code clean up, automatic YouTube-dl installation, thumbnail and description download support, and playlist support.
@pernielsentikaer

Copy link
Copy Markdown
Contributor

Hi @Froxcey 👋

Looking good with this extension, however, I can't get it to work - see attached video:

yUWklJIELz4WKVr6.mp4

The console gives me this output:

2EV4lJuBpJXoqMQd

I'm running a MacBook m1 is that helps anything, feel free to find me in the official slack channel for debugging.

@pernielsentikaer pernielsentikaer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few text corrections were found while going through the extension.

if (err.message.includes("ENOENT")) {
// try to install youtube-dl
toast.title = "Installing";
toast.message = "An utility is installing nessesary dependecies.";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
toast.message = "An utility is installing nessesary dependecies.";
toast.message = "A utility is installing necessary dependencies.";

youtubeDlInstaller.on("error", (err) => {
toast.style = ToastStyle.Failure;
toast.title = "Installation failed";
toast.message = "You can manuelly install by visiting youtube-dl.org";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
toast.message = "You can manuelly install by visiting youtube-dl.org";
toast.message = "You can manually install by visiting youtube-dl.org";

}
});
videoDownload.on("spawn", () => {
toast.message = "Estabolising connection";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
toast.message = "Estabolising connection";
toast.message = "Establishing connection";

@pernielsentikaer

Copy link
Copy Markdown
Contributor

Let me know when you're ready for another test run 💪

@Froxcey

Froxcey commented Oct 22, 2021 •

Copy link
Copy Markdown
Author

Okay I think the code is getting messy, especially with the console. Sorry I'm still kind of a beginner (especially to Github) and a student. I did a test run and everything seems to be working fine. I cannot try the installation since I already got YouTube-dl installed on my computer, but it should work since I imported it from YouTube-dl. Still, it needs a test run. Also, I speak two languages, so sorry for those misspelled words and thank you for fixing it.
Edit: I forgot to mention, please do a test run.

@pernielsentikaer

Copy link
Copy Markdown
Contributor

Great @Froxcey 💣

I was asked to accept a script with my password, guess it was the installation of the youtube-dl. After this there was another prompt (Will see if I can reproduce what it said) - I'm not sure what the guidelines are about this, maybe @thomaspaulmann or @PitNikola can enlighten us with some feedback.

Seems like I'm able to start a download now, ifs its running and I'm hitting escape it still shows the toast (also after closing the raycast window) but the download is "dead" so I think you'll need to find a way to cancel the download and toast if the extension is closed.

Also, there is something you need to look at about the naming conventions - "Youtube-dl" could maybe be called YouTube Downloader

@Froxcey

Froxcey commented Oct 22, 2021 •

Copy link
Copy Markdown
Author

After this there was another prompt

I'm not vary sure about why that happens, and it's somewhat unexpected. In install.sh under the assets directory, there's two lines of bash code. One downloads the library using curl, and the other make it executable. Two lines of code probably need two time of authentication. I ran it on my machine, and it only request for installation for once.

I'm not sure what the guidelines are about this

If it goes against the guideline, I can implement a back up method. I can open the download page on the user's browser and let them download dependencies themself. I mean that's kind of annoying, and I'm the kind of person who like to make computer automate everything with minimum amount of steps as possible (this is the reason I made this extension). I'm willing to explain everything related to this extension. I'm considering adding a new UI for dependency downloading, which gives the user more clue about what's happening, but that would take some time.

@Froxcey Froxcey changed the title Added YouTube-dl extension Added YouTube Downloader extension Oct 22, 2021
@PitNikola PitNikola added the new extension Label for PRs with new extensions label Oct 22, 2021
@pernielsentikaer

Copy link
Copy Markdown
Contributor

Hi @Froxcey 👋 Sorry for the very late reply, I had to discuss different approaches with the team.

We like the idea behind this extension, but our API is not yet ready to handle it, since there is no support for background processes.

Because of the lacking support for background processes is the extension terminated as soon as it loses focus.

This is not ideal, since we can't force end-users to have the extension open at all times in order to get the file downloaded.

Unfortunately, for now, we have to set it on hold until it's possible to have background processes.

I'm very sorry for the late call about this, I was not fast enough to spot the potential problem and hoping that as soon as possible to solve it in a good way that you'll wanna continue.

Feel free to contact me here or at Slack in the #extension channel if you have any questions or concerns about this.

@Froxcey

Froxcey commented Oct 28, 2021 •

Copy link
Copy Markdown
Author

I fully and understand, and honestly, I 100% agree with holding onto this extension until the API is ready. Having a download process automatically quit is quite annoying, especially when it cannot have an indicator about it. Releasing this extension early messes user experience up, and not having it is totally better. Hey, I can even improve the extension during this time. I mean I made this extension originally for myself to stop typing YouTube-do command in console and make my friend think I'm hacking(I'm not that good), and I cleaned up some stuff for other people to use it since I found this fit neatly with Raycast(of course except for the end process thingy). It's not really that big of a deal, and you don't need to be sorry about it.

Edit: if this extension gets a release, that's great. If it doesn't, it fine. At least I got this extension on my computer and I can use it.

@PitNikola

Copy link
Copy Markdown
Member

Thanks for your understanding @Froxcey! Let's get back to it once we have appropriate API. Gonna close this PR for now.

@PitNikola PitNikola closed this Oct 28, 2021
gitbook-com Bot pushed a commit that referenced this pull request Jan 12, 2022
@vimtor vimtor mentioned this pull request Mar 29, 2023
5 tasks done
jfox85 added a commit to jfox85/raycast-extensions that referenced this pull request Sep 19, 2025