Skip to content

paltze/music.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

music.sh

music.sh is a simple Bash script that allows you to download, manage, and play music tracks from YouTube using yt-dlp and mpv. It provides a minimalist command-line interface for music management.

music.sh downloads or streams tracks from YouTube and allows you to list, search, play and delete downloaded tracks.

Prerequisites

Ensure you have the following dependencies installed:

  • yt-dlp
  • mpv
  • jq
  • grep

Installation

Clone the repository and make the script executable. The script, by default, stores the music files and other data alongside itself, you can change this my editing the DIR variable at line 5.

Usage

music.sh [option] [argument]

Options:

  • list: Lists all downloaded tracks in {id}. {title} format
  • play <id>: Plays downloaded tracks, explained below in detail
  • add <keyword>:Downloads music track, explained below in detail
  • delete <id>: Deletes the track corresponding to <id>
  • search <keyword>: Lists all tracks matching the keyword in {id}. {title} format
  • stream <keyword>: Streams music track, explained below in detail
  • help: Shows this usage information.

music.sh play <keyword>: Plays the track corresponding to <id>. Otherwise searches for <keyword> in library. If only one match is found, plays directly else lists and gives option to play. A number qualifies as <id> while everything else qualifies as <keyword>.

music.sh add/stream <search term>: Searches and lists the top five search results on YouTube for the given , numbered 1 to 5. Enter the serial number of the track you wish to download/stream in the prompt that follows

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages