$ luarocks install copyright-free-songs luarocks install copyright-free-songs
local cfs = require("copyright-free-songs")
local playlist = cfs.generate_playlist(10) -- Generate a playlist of 10 songs
for i, song in ipairs(playlist) do
print(i .. ": " .. song.title .. " by " .. song.artist)
end
local cfs = require("copyright-free-songs")
local song_id = 123 -- Replace with a valid song ID
local song = cfs.get_song_metadata(song_id)
if song then
print("Title: " .. song.title)
print("Artist: " .. song.artist)
print("Genre: " .. song.genre)
print("License: " .. song.license)
else
Versions
Dependencies
lua >= 5.1