Hide hidden live ids on the clear rate page

This commit is contained in:
Ethan O'Brien
2026-07-21 22:21:57 -05:00
parent 50ccecd821
commit b6cbfd0713
3 changed files with 24 additions and 0 deletions

View File

@@ -247,6 +247,10 @@ pub fn get_music_ids_for_user(user_id: i64) -> JsonValue {
ORDER BY music_id", params!(user_id)).unwrap_or(array![])
}
pub fn non_public_music_ids() -> JsonValue {
DATABASE.lock_and_select_all("SELECT music_id FROM songs WHERE visibility!='public' ORDER BY music_id", params!()).unwrap_or(array![])
}
// Which of these candidate ids no longer exist in the catalog. Only the custom
// range is ever considered, so official songs can't come back from this. A song
// that's merely private/shared still has its row - only genuinely deleted ids