mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Fixed local playlists for Linux
glob module gave different results on Linux. Most likely fixed
This commit is contained in:
parent
2e78a3f829
commit
761bd7eb2c
8
red.py
8
red.py
@ -935,10 +935,10 @@ async def playLocal(message):
|
|||||||
if localplaylists and ("/" not in msg[1] and "\\" not in msg[1]):
|
if localplaylists and ("/" not in msg[1] and "\\" not in msg[1]):
|
||||||
if msg[1] in localplaylists:
|
if msg[1] in localplaylists:
|
||||||
files = []
|
files = []
|
||||||
if glob.glob("localtracks\\" + msg[1] + "\\*.mp3"):
|
if glob.glob("localtracks/" + msg[1] + "/*.mp3"):
|
||||||
files.extend(glob.glob("localtracks\\" + msg[1] + "\\*.mp3"))
|
files.extend(glob.glob("localtracks/" + msg[1] + "/*.mp3"))
|
||||||
if glob.glob("localtracks\\" + msg[1] + "\\*.flac"):
|
if glob.glob("localtracks/" + msg[1] + "/*.flac"):
|
||||||
files.extend(glob.glob("localtracks\\" + msg[1] + "\\*.flac"))
|
files.extend(glob.glob("localtracks/" + msg[1] + "/*.flac"))
|
||||||
stopMusic()
|
stopMusic()
|
||||||
data = {"filename" : files, "type" : "local"}
|
data = {"filename" : files, "type" : "local"}
|
||||||
currentPlaylist = Playlist(data)
|
currentPlaylist = Playlist(data)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user