This commit is contained in:
2024-03-29 12:35:53 +01:00
parent 6a33fd07c5
commit f700e45eef
+5 -4
View File
@@ -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)