SpotiFile/main.py

23 wiersze
586 B
Python

2023-01-05 12:31:44 +00:00
from config import *
from webgui import app
import spotify_mass_download
from spotify_mass_download import full_download, save_globals_save_file
from threading import Thread
2023-01-05 12:53:09 +00:00
import webbrowser
2023-01-05 12:31:44 +00:00
def main():
2023-01-05 12:53:09 +00:00
print(f'=== SpotiFile ===')
2023-01-05 12:31:44 +00:00
spotify_mass_download.g_keep_saving += 1
save_globals_save_file_thread = Thread(target=save_globals_save_file)
save_globals_save_file_thread.start()
2023-01-05 12:53:09 +00:00
webbrowser.open('http://127.0.0.1:8888/')
2023-01-05 12:31:44 +00:00
app.run(host='127.0.0.1', port=8888, debug=False)
spotify_mass_download.g_keep_saving -= 1
if __name__ == '__main__':
main()