Skip to content

Commit

Permalink
allow urls in repos
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaKnijn committed Aug 30, 2024
1 parent e152254 commit dd0eef7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions musicify.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ for i in pairs(index.songs) do
end

local function play(songID)
if type(songID) == "table" then
if string.find(songID.file,"flac") or string.find(songID.file,"wav") or string.find(songID.file,"mp3") or string.find(songID.file,"aac") or string.find(songID.file,"opus") or string.find(songID.file,"ogg") then
songID.file = "https://cc.alexdevs.me/dfpwm?url=" .. textutils.urlEncode(songID.file)
end
end
if type(songID) == "string" then
local newSongID = {}
newSongID.file = songID
Expand Down

0 comments on commit dd0eef7

Please sign in to comment.