https://github.com/queenoworld/musiclib
An abstraction layer over YouTubeExplode and SpotifyExplode
https://github.com/queenoworld/musiclib
csharp csharp-lib csharp-library dotnet downloader
Last synced: 3 months ago
JSON representation
An abstraction layer over YouTubeExplode and SpotifyExplode
- Host: GitHub
- URL: https://github.com/queenoworld/musiclib
- Owner: QueenOworld
- License: gpl-3.0
- Created: 2024-01-20T04:34:57.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-20T04:53:34.000Z (almost 2 years ago)
- Last Synced: 2025-04-12T04:46:24.824Z (9 months ago)
- Topics: csharp, csharp-lib, csharp-library, dotnet, downloader
- Language: C#
- Homepage:
- Size: 43 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MusicLib
Simple C# library with a MusicTrack class and a Playlist class
## Features
Playlist inherits IEnumerable and can be indexed
```c#
public struct Playlist : IEnumerable { ... }
```
---
Tracks and playlists can be fetched directly from URLs from either Spotify or Youtube
```c#
MusicTrack track = await MusicTrack.FromUrlAsync("https://www.youtube.com/watch?v=OR6olLu61u8");
```
```c#
Playlist playlist = await Playlist.FromUrlAsync("https://open.spotify.com/playlist/5vTqAr4UQ6i2JSa5P3Mjk0");
```
---
Playlists can be imported and exported as a file
```c#
Playlist playlist = await Playlist.FromUrlAsync("https://www.youtube.com/watch?v=L5q4uYj-gyg&list=PLGPnvYCC8I1Wu3zIL2rsM6PLwLCtU6Gsp");
playlist.Export("./playlist");
Playlist newPlaylist = new Playlist();
newPlaylist.Import("./playlist");
```
---
Download tracks
```c#
MusicTrack track = await MusicTrack.FromUrlAsync("https://open.spotify.com/track/0k6cQBcTYYxRp5gXsjDtAY?si=e07ef9d0c4054cc2");
await track.DownloadAsync("./music/intense/");
```