holdings: a member of a Space publishes what they hold as room-salted album keys, sealed to the room, so "who has this" is answered while they are offline

This commit is contained in:
KeelrLeek committed 2026-09-08 12:10:49 -05:00
1 parent 08ca09586a
commit a98c750908
12 files changed
+2955 -8

No files matched your search

+3 -3
View File
@@ -90,7 +90,7 @@ fn key(username: &str) -> String {
/// Bracketed chunks go — "(2019)", "[FLAC]", "{web}" — then only letters and
/// digits remain, lowercased; a leading "the" goes too. "Sigur Rós" and
/// "sigur ros" are not the same string here, and that is a known miss.
fn norm(s: &str) -> String {
pub(crate) fn norm(s: &str) -> String {
let mut out = String::with_capacity(s.len());
let mut depth = 0i32;
for c in s.chars() {
@@ -127,7 +127,7 @@ fn is_disc_folder(s: &str) -> bool {
false
}
fn is_audio(f: &soulseek_proto::types::File) -> bool {
pub(crate) fn is_audio(f: &soulseek_proto::types::File) -> bool {
let ext = if f.extension.is_empty() {
f.filename.rsplit('.').next().unwrap_or_default()
} else {
@@ -138,7 +138,7 @@ fn is_audio(f: &soulseek_proto::types::File) -> bool {
}
/// The (artist, album) a share folder names, with display spellings.
fn pair_of(dir: &str) -> Option<(String, String)> {
pub(crate) fn pair_of(dir: &str) -> Option<(String, String)> {
let segs: Vec<&str> = dir
.split(['\\', '/'])
.map(str::trim)