mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
Fix old bug
This commit is contained in:
@@ -11,7 +11,8 @@ import random
|
||||
import re
|
||||
import threading
|
||||
import time
|
||||
from flask_autoindex import AutoIndex
|
||||
|
||||
# from flask_autoindex import AutoIndex
|
||||
from datetime import datetime
|
||||
from logging import handlers
|
||||
from pathlib import Path
|
||||
@@ -182,7 +183,8 @@ def scan_tracks():
|
||||
|
||||
|
||||
app = Flask(__name__)
|
||||
#AutoIndex(app, browse_root="/")
|
||||
# AutoIndex(app, browse_root="/")
|
||||
|
||||
|
||||
# TODO: Odpalić wyszukiwarki w wątkach i dopiero po wszystkim zsumować wyszukiwanie.
|
||||
def wyszukaj(word_list, how_many, _logger=None, return_to_bot=True):
|
||||
@@ -486,7 +488,7 @@ def create_priority_playlist():
|
||||
return_data = wyszukaj(
|
||||
record["lista_slow"], record["dlugosc_plejlisty"], app.logger, False
|
||||
)
|
||||
return_data = random.shuffle(return_data)
|
||||
random.shuffle(return_data)
|
||||
with open("/home/pi/Conjurer/request.playlist", "a", encoding="utf-8") as s_file:
|
||||
for item in return_data:
|
||||
s_file.write(item[1] + "\n")
|
||||
|
||||
Reference in New Issue
Block a user