Skip to content

Koshroy/yt-nncp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yt-nncp

Queue up Youtube downloads through youtube-dl over NNCP.

Building

Go 1.13 or higher is necessary to build yt-nncp. In order to build yt-nncp simple run:

make

This invokes the Go compiler to generate a binary, then strips debug information from the binary.

Usage

yt-nncp -pipe <fifo>

yt-nncp will open the named pipe <fifo> for reading from. Each line that is read from the named pipe is parsed as the following:

<dest node> <media url> <<quality>>

where <quality> is optional and can be either best, worst, medium, or bestaudio. An optional parameter -max can be passed which controls the maximum number of simultaneous downloads ongoing. By default this is set to 3 but can be changed.

Make sure to set the environment varables if needed:

  1. NNCP_PATH for the path to nncp-file if it is not already in your path.
  2. NNCP_CFG_PATH for the path to your NNCP node config if it's not at the default path.

Further flags are available by running yt-nncp -h

Using with NNCP

This bot requires a named pipe to exist which it can read from to queue up media downloads. fifo-recv.sh is a simple script which first appends the value of the envar NNCP_SENDER onto the start of the line and then takes stdin, as fed by NNCP, and appends that to the line. This should allow NNCP nodes which can run exec handles to be able to call this script and queue up downloads.

Limitations

No status updates are sent about whether the download has started or what progress has elapsed during the download. It should be fairly simple to incorporate an NNCP sendmail handle to periodically send progress updates, but as of yet, this does not exist.

About

A Media Downloader over NNCP using youtube-dl

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published