clean TODO comment//already done

This commit is contained in:
codey 2025-04-12 10:07:22 -04:00
parent 4506714d0a
commit 96add377df
2 changed files with 4 additions and 14 deletions

View File

@ -15,11 +15,6 @@ from fastapi import (FastAPI, BackgroundTasks, Request,
Response, HTTPException)
from fastapi.responses import RedirectResponse, JSONResponse
"""
TODO:
- Radio request typeahead
"""
class Radio(FastAPI):
"""Radio Endpoints"""
def __init__(self, app: FastAPI,

View File

@ -148,8 +148,6 @@ class RadioUtil:
db_query: str = """SELECT distinct(LOWER(TRIM(artist)) || " - " || LOWER(TRIM(song))), (TRIM(artist) || " - " || TRIM(song)) AS artistdashsong, id, artist, song, album, genre, file_path, duration FROM tracks\
WHERE (genre LIKE "%metalcore%"\
OR genre LIKE "%rock%"\
OR genre LIKE "%pop punk%"\
OR genre LIKE "%math rock%"\
OR genre LIKE "%punk rock%"\
OR genre LIKE "%metal%"\
@ -171,13 +169,10 @@ class RadioUtil:
OR genre LIKE "%hardcore%"\
OR genre LIKE "%hair metal%"\
OR genre LIKE "%horror punk%"\
OR genre LIKE "%folk punk%"\
OR genre LIKE "%breakcore%"\
OR genre LIKE "%post-rock%"\
OR genre LIKE "%deathcore%"\
OR genre LIKE "%hardcore punk%"\
OR genre LIKE "%synthwave%"\
OR genre LIKE "%trap%"\
OR genre LIKE "%indie pop%"\
OR genre LIKE "%dnb%")\
GROUP BY artistdashsong ORDER BY RANDOM()"""
@ -186,15 +181,15 @@ class RadioUtil:
LIMITED TO ONE/SMALL SUBSET OF GENRES
"""
# db_query = 'SELECT distinct(artist || " - " || song) AS artistdashsong, id, artist, song, album, genre, file_path, duration FROM tracks\
# WHERE (artist LIKE "%bad omens%") AND (NOT song LIKE "%(live%") ORDER BY artist DESC, album ASC, song ASC'
db_query = 'SELECT distinct(artist || " - " || song) AS artistdashsong, id, artist, song, album, genre, file_path, duration FROM tracks\
WHERE (artist LIKE "%winds of plague%" OR artist LIKE "%acacia st%" OR artist LIKE "%suicide si%" OR artist LIKE "%in dying%") AND (NOT song LIKE "%(live%") ORDER BY RANDOM()' #ORDER BY artist DESC, album ASC, song ASC'
"""
LIMITED TO ONE/SOME ARTISTS...
"""
db_query = 'SELECT distinct(artist || " - " || song) AS artistdashsong, id, artist, song, album, genre, file_path, duration FROM tracks\
WHERE (artist LIKE "%we butter%" OR artist LIKE "%eisbrecher%" OR artist LIKE "%black ang%" OR artist LIKE "%madison affair%") AND (NOT song LIKE "%%stripped%%" AND NOT song LIKE "%(2022)%" AND NOT song LIKE "%(live%%" AND NOT song LIKE "%%acoustic%%" AND NOT song LIKE "%%instrumental%%" AND NOT song LIKE "%%remix%%" AND NOT song LIKE "%%reimagined%%" AND NOT song LIKE "%%alternative%%" AND NOT song LIKE "%%unzipped%%") GROUP BY artistdashsong ORDER BY RANDOM()'# ORDER BY album ASC, id ASC'
# db_query = 'SELECT distinct(artist || " - " || song) AS artistdashsong, id, artist, song, album, genre, file_path, duration FROM tracks\
# WHERE (artist LIKE "%we butter%" OR artist LIKE "%eisbrecher%" OR artist LIKE "%black ang%" OR artist LIKE "%madison affair%") AND (NOT song LIKE "%%stripped%%" AND NOT song LIKE "%(2022)%" AND NOT song LIKE "%(live%%" AND NOT song LIKE "%%acoustic%%" AND NOT song LIKE "%%instrumental%%" AND NOT song LIKE "%%remix%%" AND NOT song LIKE "%%reimagined%%" AND NOT song LIKE "%%alternative%%" AND NOT song LIKE "%%unzipped%%") GROUP BY artistdashsong ORDER BY RANDOM()'# ORDER BY album ASC, id ASC'
async with sqlite3.connect(self.active_playlist_path,
timeout=2) as db_conn: