An open-source music playing software for ComputerCraft, and Computronics' tape drives.
If you are not on SwitchCraft, please refer to the plethora
branch.
Tested on:
Debian 10.2
PHP 7.0
nginx 1.14.2
ffmpeg 4.1.4
youtube-dl 2020.01.01
Lionray commit 725032428bfcbd503e53c5cafdd68f14810d0e9a
- Install a server that supports PHP. This could be Apache, nginx, or any other server that supports PHP.
- Install JRE 8 to your server, and ffmpeg. Then, go to /var/www/html or where your server's files are located.
- Download the latest version of youtube-dl, and download the latest version of [LionRay] (https://github.com/gamax92/LionRay).
- Download https://raw.githubusercontent.com/znepb-cc/zMusic/master/index.php to your server. (It does not have to be /index.php on the server, but it is recommended.
- If needed, change
$file
,$webm
, and$out
in your PHP file. - Move youtube-dl to the folder where your php file is located, and same with LionRay. Rename LionRay to
lionray.jar
. - Create a directory named
files
- Change permissions to allow your PHP file, lionray, ffmpeg, and youtube-dl to write to the files directory.
All you need is a tape drive, a tape (32 mins recommended), and a computer.
- Run
wget https://raw.githubusercontent.com/znepb-cc/zMusic/master/zMusic.lua zmusic.lua
to download zMusic. - Run
wget https://github.com/znepb-cc/zMusic/raw/master/config.lua config.lua
to download the config. - Run
edit config.lua
to edit the config. - In the config, there are several values you must change.
- Change
ip
to the IP of your server, or it's domain. - Change
api-key
to your YouTube Data API v3 key. You can get one here - Change
primary-user
to yourself (you will recieve notifications if an eror occurs) - Change the first value in
trustedUsers
to your username. This table is a list of users that can run zmusic commands.
Now that you're done, try playing some music. Run zmusic.lua
to get the party started!
\zmusic play [song]
- Searches YouTube for the song, and adds it to the queue. If the queue is empty, the song will play. Passing no arguments will play the music if the queue is not empty and the music is stopped.\zmusic stop
- Stops the current song playing. You can restart the music by running\zmusic play
\zmusic skip
- Skips the current song, if there is another song in the queue.\zmusic queue
- Tells the user what songs are in the queue.\zmusic clear
- Clears the queue.\zmusic volume <volume, 1-10>
- Sets the volume of the music, where 1 is the lowest and 10 is the highest.
If you want your friends to be able to add their own songs to the queue, do the following:
- Run
edit config.lua
to the the config. - Add a comma to the quote after your name, and then add type
"your friend's name",
below that line. - Restart zMusic