mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 03:38:53 -05:00
Merge branch 'develop' into cog-changes
This commit is contained in:
commit
e0edfedde3
@ -451,14 +451,6 @@ class Audio:
|
||||
|
||||
return song
|
||||
|
||||
def _list_local_playlists(self):
|
||||
ret = []
|
||||
for thing in os.listdir(self.local_playlist_path):
|
||||
if os.path.isdir(os.path.join(self.local_playlist_path, thing)):
|
||||
ret.append(thing)
|
||||
log.debug("local playlists:\n\t{}".format(ret))
|
||||
return ret
|
||||
|
||||
def _is_queue_playlist(self, server):
|
||||
if server.id not in self.queue:
|
||||
return False
|
||||
@ -481,6 +473,14 @@ class Audio:
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
def _list_local_playlists(self):
|
||||
ret = []
|
||||
for thing in os.listdir(self.local_playlist_path):
|
||||
if os.path.isdir(os.path.join(self.local_playlist_path, thing)):
|
||||
ret.append(thing)
|
||||
log.debug("local playlists:\n\t{}".format(ret))
|
||||
return ret
|
||||
|
||||
def _list_playlists(self, server):
|
||||
try:
|
||||
server = server.id
|
||||
@ -490,18 +490,13 @@ class Audio:
|
||||
old_playlists = [f[:-4] for f in os.listdir(path)
|
||||
if f.endswith(".txt")]
|
||||
path = os.path.join(path, server)
|
||||
if os.path.exists(path):
|
||||
new_playlists = [f[:-4] for f in os.listdir(path)
|
||||
if f.endswith(".txt")]
|
||||
else:
|
||||
new_playlists = []
|
||||
return list(set(old_playlists + new_playlists))
|
||||
|
||||
def _list_local_playlists(self):
|
||||
ret = []
|
||||
for thing in os.listdir(self.local_playlist_path):
|
||||
if os.path.isdir(os.path.join(self.local_playlist_path, thing)):
|
||||
ret.append(thing)
|
||||
log.debug("local playlists:\n\t{}".format(ret))
|
||||
return ret
|
||||
|
||||
def _load_playlist(self, server, name, local=True):
|
||||
try:
|
||||
server = server.id
|
||||
|
||||
@ -5,6 +5,7 @@ from .utils import checks
|
||||
from __main__ import send_cmd_help, settings
|
||||
import os
|
||||
import logging
|
||||
import asyncio
|
||||
|
||||
|
||||
class Mod:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user