mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-16 06:42:10 +00:00
Fix 9
This commit is contained in:
@@ -166,8 +166,10 @@ logger.info("Playlist generation")
|
|||||||
# *=========================================== Load Data files
|
# *=========================================== Load Data files
|
||||||
|
|
||||||
class MusicFileList(object):
|
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:
|
def __init__(self, uplogger) -> None:
|
||||||
self.music_file_list = []
|
self.music_file_list = []
|
||||||
self.file_service_active = False
|
self.file_service_active = False
|
||||||
@@ -202,8 +204,7 @@ class MusicFileList(object):
|
|||||||
def update_file_list(self,item):
|
def update_file_list(self,item):
|
||||||
self.music_file_list.append(item)
|
self.music_file_list.append(item)
|
||||||
post_data = {"item" : 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 = []
|
||||||
music_file_list = MusicFileList(logger)
|
music_file_list = MusicFileList(logger)
|
||||||
|
|||||||
Reference in New Issue
Block a user