mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
Installer
This commit is contained in:
@@ -203,6 +203,14 @@ class MusicFileList(object):
|
||||
"""
|
||||
return self.music_file_list
|
||||
def update_file_list(self,item):
|
||||
"""
|
||||
The `update_file_list` function appends an item to a music file list and sends a POST request with
|
||||
the item data to a file service address.
|
||||
|
||||
:param item: The `item` parameter in the `update_file_list` method is the file that you want to add
|
||||
to the `music_file_list` attribute of the class instance. It is then sent as a JSON payload in a
|
||||
POST request to a file service address along with the endpoint `SEND_MP3`
|
||||
"""
|
||||
self.music_file_list.append(item)
|
||||
post_data = {"item" : str(item)}
|
||||
requests.post(f'{FILE_SERVICE_ADDRESS}{SEND_MP3}', json=post_data, timeout = 360)
|
||||
|
||||
Reference in New Issue
Block a user