fixed akarpov dependecies, minor changes

This commit is contained in:
Alexander Karpov 2023-12-27 01:52:57 +03:00
parent 8f19d51410
commit fc1a1ec7ed
6 changed files with 728 additions and 632 deletions

View File

@ -29,8 +29,10 @@ def get_track_info(name: str) -> dict:
"artist": "", "artist": "",
"title": "", "title": "",
} }
try:
res = search(name)["tracks"]["items"] res = search(name)["tracks"]["items"]
except TypeError:
return info
if not res: if not res:
return info return info
res = res[0] res = res[0]

View File

@ -29,6 +29,7 @@ def search_ym(name: str):
info = { info = {
"artists": [artist.name for artist in best.artists], "artists": [artist.name for artist in best.artists],
"title": best.title, "title": best.title,
"album": best.albums[0].title,
} }
# getting genre # getting genre

View File

@ -134,7 +134,7 @@
</div> </div>
</main> </main>
<footer class="row bg-light py-1 mt-auto text-center"> <footer class="row bg-light py-1 mt-auto text-center">
<div class="col"> Writen by <a href="/about">sanspie</a>, find source code <a href="https://github.com/Alexander-D-Karpov/akarpov">here</a> </div> <div class="col"> Writen by <a href="https://akarpov.ru/about">sanspie</a>, find source code <a href="https://github.com/Alexander-D-Karpov/akarpov">here</a>. Copyleft akarpov 2023</div>
</footer> </footer>
<div id="toastContainer" class="toast-container position-fixed bottom-0 end-0 p-3"> <div id="toastContainer" class="toast-container position-fixed bottom-0 end-0 p-3">

View File

@ -29,6 +29,7 @@ class User(AbstractUser, BaseImageModel, ShortLinkModel):
"Left file upload(in bites)", default=0, validators=[MinValueValidator(0)] "Left file upload(in bites)", default=0, validators=[MinValueValidator(0)]
) )
theme = models.ForeignKey("themes.Theme", null=True, on_delete=models.SET_NULL) theme = models.ForeignKey("themes.Theme", null=True, on_delete=models.SET_NULL)
agree_data_to_be_sold = models.BooleanField(default=False)
def get_theme_url(self): def get_theme_url(self):
if self.theme_id: if self.theme_id:

1347
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -95,7 +95,6 @@ yt-dlp = "^2023.7.6"
pytube = "^15.0.0" pytube = "^15.0.0"
urllib3 = ">=1.26" urllib3 = ">=1.26"
requests = ">=2.25" requests = ">=2.25"
extract-msg = "0.28.7"
pytest-factoryboy = "2.3.1" pytest-factoryboy = "2.3.1"
pytest-xdist = "^3.3.1" pytest-xdist = "^3.3.1"
pytest-mock = "^3.11.1" pytest-mock = "^3.11.1"
@ -103,7 +102,6 @@ pytest-asyncio = "^0.21.1"
pytest-lambda = "^2.2.0" pytest-lambda = "^2.2.0"
pgvector = "^0.2.2" pgvector = "^0.2.2"
pycld2 = "^0.41" pycld2 = "^0.41"
textract = "^1.6.5"
uuid6 = "^2023.5.2" uuid6 = "^2023.5.2"
uvicorn = "^0.24.0.post1" uvicorn = "^0.24.0.post1"
nltk = "^3.8.1" nltk = "^3.8.1"
@ -115,6 +113,7 @@ django-elasticsearch-dsl = "^8.0"
elasticsearch-dsl = "^8.11.0" elasticsearch-dsl = "^8.11.0"
numpy = "1.25.2" numpy = "1.25.2"
deep-translator = "1.4.2" deep-translator = "1.4.2"
textract = {git = "https://github.com/Alexander-D-Karpov/textract.git"}
[build-system] [build-system]