A simple API for downloading music/audio from YouTube using NYouTubeDL.
This was originally developed as a way to download music for transfer to my plex server.
The songs are downloaded to a folder called "Songs", and are organized by artist and album ,
Songs/Test Artist/Test Album/Song.mp4.
Each song will have be tagged with the artist, album, and song title as well.
As of now, it is up to the user to properly use the program and populate
all fields on the main webpage.
- Install youtube-dl
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/bin/youtube-dl
sudo chmod a+rx /usr/bin/youtube-dl
- Ensure ASP.NET Core and dotnet 6.x is installed
- Clone the repository
git clone https://github.com/GT3CH1/YouTubeMusicDownloader-Api
- Build the project
cd YouTubeMusicDownloader-Api
dotnet build
- Run the project
dotnet ./YouTubeDownloader/bin/Debug/net6.0/YouTubeDownloader.dll
- Done!
Navigate to the URL that is shown in your terminal when you start the application.
At the top of the webpage, there is four fields you will have to input.
- The title of the song
- The artist of the song
- The album of the song
- The YouTube URL of the song
Once you have filled out the fields, click the "Add Song" button. The song is stored in a database, and is ready to be downloaded. Please see the "Downloading a Song" section for more information.
POST /api/Song/Add
{
"Url": "https://www.youtube.com/watch?v=some-url",
"Title": "Test Video",
"Artist": "Test Artist",
"Album": "Test Album"
}
POST /api/Song/AddList
[
{
"Url": "https://www.youtube.com/watch?v=some-url",
"Title": "Test Video",
"Artist": "Test Artist",
"Album": "Test Album"
},
{
"Url": "https://www.youtube.com/watch?v=some-url",
"Title": "Test Video",
"Artist": "Test Artist",
"Album": "Test Album"
}
]
GET /api/Song/GetList
GET /api/Song/Get/{id}
DELETE /api/Song/Delete/{id}
DELETE /api/Song/DeleteAll
PUT /api/Song/Edit/{id}
{
"Url": "https://www.youtube.com/watch?v=some-url",
"Title": "Test Video",
"Artist": "Test Artist",
"Album": "Test Album",
}
GET /api/Song/Download/{id}
GET /api/Song/DownloadAll
- Add a way to get a list of songs
- Add a way to remove a song/list of songs
- Add a way to download ONE song.
- Add a way to download all of the songs.
- Add a way to set the artist/album/title of a song.
- Add a way to edit songs
If you run into any bugs, or would like to request/add a feature, please open an issue on the GitHub repository. Any and all help is appreciated.