Giter Site home page Giter Site logo

Comments (12)

madkarmaa avatar madkarmaa commented on June 12, 2024 1

this is my current idea, I'll put it in the works

Picsart_24-01-07_12-11-07-655.png

from youtube-downloader.

madkarmaa avatar madkarmaa commented on June 12, 2024

so implement a way to retrieve all the video metadata?

from youtube-downloader.

madkarmaa avatar madkarmaa commented on June 12, 2024

such as creating an external API module that retrieves the video metadata

from youtube-downloader.

oSumAtrIX avatar oSumAtrIX commented on June 12, 2024

The downloader part can be abstracted so

a. You can specify your own downloader API link.
b. You can open a URL with a custom protocol and allow to build the URL using template variables. An example input in the settings of the extension could look like this: my-downloader://{{videoId}}. Once you press the Download button it'll replace the template variable with the current video id and open the URL

from youtube-downloader.

madkarmaa avatar madkarmaa commented on June 12, 2024

ok, I understand now, but each API could use a different request method and request body. Cobalt, which is the API used in this case, uses a POST request with a request body containing the download url and other data

from youtube-downloader.

oSumAtrIX avatar oSumAtrIX commented on June 12, 2024

I'd say you can provide a dropdown of HTTP requests.

Alternatively you can provide an input area where you can paste your custom handler code and your extension will eval it, like a plugin. Then every case is covered and the possibilities are limitless

from youtube-downloader.

madkarmaa avatar madkarmaa commented on June 12, 2024

huge security risk tho, especially eval()

from youtube-downloader.

oSumAtrIX avatar oSumAtrIX commented on June 12, 2024

That's intended. The script in the area field is added by the user.

from youtube-downloader.

madkarmaa avatar madkarmaa commented on June 12, 2024

I can make a "video API" module to provide them video metadata, then add a settings page with an input for the url, a dropdown for the request type and another input for the request body which gets passed into JSON.stringify(), how does that sound to you?

from youtube-downloader.

oSumAtrIX avatar oSumAtrIX commented on June 12, 2024

Personally, I am satisfied as long as I can press the download button and it opens the URL myprotocol://{{video title}}. See why.

from youtube-downloader.

madkarmaa avatar madkarmaa commented on June 12, 2024

@oSumAtrIX you now have the possibility to write your own code to execute when left clicking the download button. placeholders are supported, see a full list here

from youtube-downloader.

madkarmaa avatar madkarmaa commented on June 12, 2024

the menu opens by clicking the download button using middle mouse button

image

from youtube-downloader.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.