mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 03:38:53 -05:00
[Audio] Fix local loop, ordered local playlists' list (#441)
Fix #405 and #413
This commit is contained in:
parent
4ecbd1e8f2
commit
a8cf519b2d
@ -630,12 +630,13 @@ class Audio:
|
|||||||
|
|
||||||
def _local_playlist_songlist(self, name):
|
def _local_playlist_songlist(self, name):
|
||||||
dirpath = os.path.join(self.local_playlist_path, name)
|
dirpath = os.path.join(self.local_playlist_path, name)
|
||||||
return os.listdir(dirpath)
|
return sorted(os.listdir(dirpath))
|
||||||
|
|
||||||
def _make_local_song(self, filename):
|
def _make_local_song(self, filename):
|
||||||
# filename should be playlist_folder/file_name
|
# filename should be playlist_folder/file_name
|
||||||
folder, song = os.path.split(filename)
|
folder, song = os.path.split(filename)
|
||||||
return Song(name=song, id=filename, title=song, url=filename)
|
return Song(name=song, id=filename, title=song, url=filename,
|
||||||
|
webpage_url=filename)
|
||||||
|
|
||||||
def _make_playlist(self, author, url, songlist):
|
def _make_playlist(self, author, url, songlist):
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user