mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-18 07:42:09 +00:00
Tag: 1.0
Intermediate commits (oldest → newest): - New files for flask services - Service - Minor fix 2 - Waitress - Linux conf files - Service - Bugfixing - Waitress - Install options - Work on deployment - Bugfixes - Work on deployment - name change and othre bugfixes - Installer - Test
This commit is contained in:
@@ -706,6 +706,8 @@ async def get_file(ctx, source, link):
|
||||
"force_keyframes": True,
|
||||
},
|
||||
]
|
||||
#TODO: Make sponsorblock work
|
||||
sponsorblock_postprocessor = []
|
||||
if platform == "win32":
|
||||
dir_path = "G:\\Muzyka\\Youtube"
|
||||
else:
|
||||
@@ -714,7 +716,6 @@ async def get_file(ctx, source, link):
|
||||
"proxy": "",
|
||||
"default_search": "ytsearch",
|
||||
"format": "bestaudio/best",
|
||||
"postprocessors": sponsorblock_postprocessor,
|
||||
"noplaylist": True,
|
||||
"no_color": False,
|
||||
"paths": {"home": dir_path},
|
||||
@@ -824,7 +825,7 @@ async def wyszukaj(ctx, how_many=0, slowa_kluczowe=None):
|
||||
It is an optional parameter with a default value of 0, which means that if no value is provided for
|
||||
how_many, the function will return all search results, defaults to 0 (optional)
|
||||
"""
|
||||
# TODO: Potem dorobić wyszukiwania po kawałkach słów
|
||||
#TODO: Przerobić na webservice
|
||||
# i sieć neuronową z możliwością wyrażenia opinii o dopasowaniu.
|
||||
if slowa_kluczowe:
|
||||
word_list = slowa_kluczowe
|
||||
@@ -1299,7 +1300,8 @@ async def zagraj_mi_kawalek(ctx):
|
||||
async with ctx.typing():
|
||||
search_time_glob = datetime.now()
|
||||
logger.info("Zaczynam szukać timestamp %s", datetime.now())
|
||||
file = await wyszukaj(ctx=ctx)
|
||||
coro = asyncio.to_thread(wyszukaj,ctx=ctx)
|
||||
file = await coro
|
||||
logger.info(
|
||||
"Koniec szukania(timestamp %s zajęło %s",
|
||||
datetime.now(),
|
||||
|
||||
Reference in New Issue
Block a user