?mode=readonly -> ?mode=ro, got some bad info from stackexchange *grumble*
This commit is contained in:
parent
6c88c23a4d
commit
4e3940e297
@ -155,36 +155,36 @@ class RadioUtil:
|
|||||||
LIMITED GENRES
|
LIMITED GENRES
|
||||||
"""
|
"""
|
||||||
|
|
||||||
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\
|
# 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%"\
|
# WHERE (genre LIKE "%metalcore%"\
|
||||||
OR genre LIKE "%math rock%"\
|
# OR genre LIKE "%math rock%"\
|
||||||
OR genre LIKE "%punk rock%"\
|
# OR genre LIKE "%punk rock%"\
|
||||||
OR genre LIKE "%metal%"\
|
# OR genre LIKE "%metal%"\
|
||||||
OR genre LIKE "%punk%"\
|
# OR genre LIKE "%punk%"\
|
||||||
OR genre LIKE "%electronic%"\
|
# OR genre LIKE "%electronic%"\
|
||||||
OR genre LIKE "%nu metal%"\
|
# OR genre LIKE "%nu metal%"\
|
||||||
OR genre LIKE "%EDM%"\
|
# OR genre LIKE "%EDM%"\
|
||||||
OR genre LIKE "%post-hardcore%"\
|
# OR genre LIKE "%post-hardcore%"\
|
||||||
OR genre LIKE "%pop rock%"\
|
# OR genre LIKE "%pop rock%"\
|
||||||
OR genre LIKE "%experimental%"\
|
# OR genre LIKE "%experimental%"\
|
||||||
OR genre LIKE "%post-punk%"\
|
# OR genre LIKE "%post-punk%"\
|
||||||
OR genre LIKE "%death metal%"\
|
# OR genre LIKE "%death metal%"\
|
||||||
OR genre LIKE "%electronicore%"\
|
# OR genre LIKE "%electronicore%"\
|
||||||
OR genre LIKE "%hard rock%"\
|
# OR genre LIKE "%hard rock%"\
|
||||||
OR genre LIKE "%psychedelic rock%"\
|
# OR genre LIKE "%psychedelic rock%"\
|
||||||
OR genre LIKE "%grunge%"\
|
# OR genre LIKE "%grunge%"\
|
||||||
OR genre LIKE "%house%"\
|
# OR genre LIKE "%house%"\
|
||||||
OR genre LIKE "%dubstep%"\
|
# OR genre LIKE "%dubstep%"\
|
||||||
OR genre LIKE "%hardcore%"\
|
# OR genre LIKE "%hardcore%"\
|
||||||
OR genre LIKE "%hair metal%"\
|
# OR genre LIKE "%hair metal%"\
|
||||||
OR genre LIKE "%horror punk%"\
|
# OR genre LIKE "%horror punk%"\
|
||||||
OR genre LIKE "%breakcore%"\
|
# OR genre LIKE "%breakcore%"\
|
||||||
OR genre LIKE "%post-rock%"\
|
# OR genre LIKE "%post-rock%"\
|
||||||
OR genre LIKE "%deathcore%"\
|
# OR genre LIKE "%deathcore%"\
|
||||||
OR genre LIKE "%hardcore punk%"\
|
# OR genre LIKE "%hardcore punk%"\
|
||||||
OR genre LIKE "%indie pop%"\
|
# OR genre LIKE "%indie pop%"\
|
||||||
OR genre LIKE "%dnb%")\
|
# OR genre LIKE "%dnb%")\
|
||||||
GROUP BY artistdashsong ORDER BY RANDOM()"""
|
# GROUP BY artistdashsong ORDER BY RANDOM()"""
|
||||||
|
|
||||||
"""
|
"""
|
||||||
LIMITED TO ONE/SMALL SUBSET OF GENRES
|
LIMITED TO ONE/SMALL SUBSET OF GENRES
|
||||||
@ -200,14 +200,14 @@ class RadioUtil:
|
|||||||
# db_query = 'SELECT distinct(artist || " - " || song) AS artistdashsong, id, artist, song, album, genre, file_path, duration FROM tracks\
|
# db_query = 'SELECT distinct(artist || " - " || song) AS artistdashsong, id, artist, song, album, genre, file_path, duration FROM tracks\
|
||||||
# WHERE (artist LIKE "%rise against%" OR artist LIKE "%i prevail%" OR artist LIKE "%volumes%" OR artist LIKE "%movements%" OR artist LIKE "%woe%" OR artist LIKE "%smittyztop%" OR artist LIKE "%chunk! no,%" OR artist LIKE "%fame on fire%" OR artist LIKE "%our last night%" OR artist LIKE "%animal in me%") 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'
|
# WHERE (artist LIKE "%rise against%" OR artist LIKE "%i prevail%" OR artist LIKE "%volumes%" OR artist LIKE "%movements%" OR artist LIKE "%woe%" OR artist LIKE "%smittyztop%" OR artist LIKE "%chunk! no,%" OR artist LIKE "%fame on fire%" OR artist LIKE "%our last night%" OR artist LIKE "%animal in me%") 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\
|
db_query = 'SELECT distinct(artist || " - " || song) AS artistdashsong, id, artist, song, album, genre, file_path, duration FROM tracks\
|
||||||
# WHERE (artist LIKE "%%" OR artist LIKE "%belmont%" OR artist LIKE "%in dying arms%" OR artist LIKE "%iwrestleda%" OR artist LIKE "%winds of p%") 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'
|
WHERE (artist LIKE "%sullivan king%" OR artist LIKE "%kayzo%" OR artist LIKE "%adventure club%") 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\
|
# db_query = 'SELECT distinct(artist || " - " || song) AS artistdashsong, id, artist, song, album, genre, file_path, duration FROM tracks\
|
||||||
# WHERE (artist LIKE "%akira the don%") 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'
|
# WHERE (artist LIKE "%akira the don%") 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(
|
async with sqlite3.connect(
|
||||||
f"file:{self.active_playlist_path}?mode=readonly", uri=True, timeout=2
|
f"file:{self.active_playlist_path}?mode=ro", uri=True, timeout=2
|
||||||
) as db_conn:
|
) as db_conn:
|
||||||
db_conn.row_factory = sqlite3.Row
|
db_conn.row_factory = sqlite3.Row
|
||||||
async with await db_conn.execute(db_query) as db_cursor:
|
async with await db_conn.execute(db_query) as db_cursor:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user