From f700e45eef11c97b6821b9cbc52eb28e03eb85d5 Mon Sep 17 00:00:00 2001 From: Migatu Date: Fri, 29 Mar 2024 12:35:53 +0100 Subject: [PATCH] Fix 9 --- bot.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bot.py b/bot.py index 307103f..95fc0a9 100644 --- a/bot.py +++ b/bot.py @@ -166,8 +166,10 @@ logger.info("Playlist generation") # *=========================================== Load Data files class MusicFileList(object): -# The `MusicFileList` class manages a list of music files, refreshing the list by connecting to a -# file service or scanning a local directory if the service is unavailable. + """ + The `MusicFileList` class manages a list of music files, with the ability to refresh the list from a + file service or local directory and update the list with new items. + """ def __init__(self, uplogger) -> None: self.music_file_list = [] self.file_service_active = False @@ -202,8 +204,7 @@ class MusicFileList(object): def update_file_list(self,item): self.music_file_list.append(item) post_data = {"item" : item} - requests.post(f'{FILE_SERVICE_ADDRESS}{GET_MP3}', post_data, timeout = 360) - + requests.post(f'{FILE_SERVICE_ADDRESS}{SEND_MP3}', post_data, timeout = 360) music_file_list = [] music_file_list = MusicFileList(logger)